Hi,
My grid has a column on which if the the column cell has null value i want to show some text depending on flag e.g. My grid has column1, column2, column3. Grid has 4 records of which two has null value for column1.
I want to show if column1 cell has null value and flag = true (this flag value is getting from the data source which i bound to the ultragrid ) then show cell value = 'Completed (Some status)' or
if column1 cell has null value and flag = false then show cell value = "N/A"
How can I achieve this, I unable to decide on which event I have to write the code. May be cell related event will be helpful so that I can set the value.
Thanks & Regards,
Pramod Pawar
Hi Pramod,
It's not clear to me where you want the text to display. It would be difficult to show text in a cell whose value is null without changing the value of that cell to a string.
What I would do is hide the column that contains the real data and then add an unbound column to the grid which can display the text or not depending on the value in the real column.
You would do hide the real column and add the unbound column in the grid's InitializeLayout event.
Then you would use the InitializeRow event to examine the value in the real hidden column and set the Value on the unbound column cell to whatever you want.
Thanks Mike for your instant reply.
Actually, I just want manupulate with the cell value and then need to display on the grid.
Say, Column1.nullText ='some text' will set the text wherever we have null value. But, for some reason, I want to do write some business logic if there is null value. Hence, Column1.nullText will not work in this case.
How do I change cell data if I want to set some logic for it.