Sometimes we require to show a two line display in a grid cell. This usually happens when we have columns like OrderNo and Order Code and we want to display both in one cell. It is also a useful practice when we have too many columns and we want to display all the details. So the values can be shown using a line seperator in the cell.

This can be achieved using ” InitializeRow” event. This event is fired for every row. So we can set the details here like this:

Visual Basic .NET Code:

e.row.cells.fromKey(“OrderNo”).Text=e.row.cells.fromKey(“OrderNo”).Text +”
” + e.row.cells.fromKey(“OrderCode”).Text

e.row.cells.fromKey(“OrderNo”).Text=e.row.cells.fromKey(“OrderNo”).Text +ControlChars.crlf + e.row.cells.fromKey(“OrderCode”).Text

The fromkey collection can be used or you can also use the cell index to find the appropriate cell. Offcourse, you have to hide OrderCode column in the “InitializeLayout” event.


Thoughts on Life, Events and Current Happenings
Sandeep Joshi
Enterprise Agility, DevOps Practitioner āœ” Scaling Digital, AI, IOT, RPA and Cognitive Initiatives
An accomplished agile leader with a successful track record for building high growth engineering organizations, transforming traditional teams to be agile and scaling operations.

A change leader with rich experience in defining enterprise vision, strategy in alignment with business roadmap, articulating to ā€œCā€ level executives, and taking charge for end to end delivery (inception to design to deploy and support).

Known for delivery excellence, product focus and technical leadership. An enterprise products guy who enjoys putting disruptive technology and tools to transform legacy teams.


IT Directions | Strategy | Innovation | Design thinking
Agile transformations | Coaching | Scaling
DevOps | Continuous delivery | Application Lifecycle
AI | Cognitive Computing | IOT | RPA
Lean Product Management | Program Management
IT Leadership | Strategy | Innovation | Mentoring
High Scale Enterprise Architecture | API Development
Cloud Computing (Azure, AWS, Private Cloud)
Containers | Microservices | Test Automation
Data Analytics | Machine Learning | Cognitive
Audit, Compliance and Data Privacy (SOX, PCI)

Share this:

Leave a Reply

Your email address will not be published. Required fields are marked *