Hi
I using UltraWinGrid in my VB.NET windows application. I have two unbound columns in my Grid.
I have written code in Grid_InitializeLayout event to add unbound columns.
I want to set values in the unbound columns based on the values in the others cells of every row.
I have used Grid_Initializerow event to do this. This event is fired when i set the Datasource to the grid and the values are set in the unbound cells as per the condition given.
But this event is fired again when i change the values in the unbound columns and the values are set again.
Can i prevent the Initializerow event from firing when user edits the unbound columns?
What is the best way to bind values to unbound columns based on the values in the other cells?
Ashok
that got me thinking and it helped, thanks
Hi Chris,
The grid cell will display whatever it's current value is. If the value you are setting is not showing up, then either you are not setting it correctly, or something else is setting it to the value that is being displayed after you set it.
Unfortunatly, the functionality im trying to create cannot be accomplished in the initializerow event.
I have tried updating the value of the unbound column in a foreach loop going through the grid, and while debugging the value gets stored in the column's value property. But when viewing the grid the value is not displayed. I have guaranteed that the columns allow update property is true, and i set it in the initializerow event as well as the initializelayout event.
Any ideas what could be causing this behavior?
No, that's not the only way, but it's usually the best way. You can also loop through the rows or get a reference to a row in any number of other ways and update the value directly.
Hi Mike,
Is the only way to update cell values on an unbound column throught the InitializeRow event?