Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1284
Binding values to Unbound columns
posted

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

  • 469350
    Verified Answer
    Offline posted

    Hi Ashok,

    You should check the e.ReInitialize property inside InitializeRow to see if the row is being initialized for the first time or not. So only set the unbound cell value when e.ReInitialize is false.