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
920
Cell Style in condition to value of cell
posted

Hi,

 

I have a grid and a string column in it. If the value is not Empty I will set the Style to Button else to Default.

The reason is the string defines the text of the button an an empty string meants no button.

 

so long no real problem.

 

i use a BindingList<> as Datasource

if the value of the string changes (also some other things in the grid change) the new value is drawn in the grid.

That's fine.

But the

AfterCellUpdate, AfterRowUpdate and also the AfterRowInsert Event is not fiering.
but the Cell Value Change and a "child" row is added.

So I'm looking for a event that indicates the BindingList<> has changed and is new displayed. At the moment I use the Paint event ... it woks cause i have a very small grid but I think this is no good way.

 

Is there a event on the grid that I can use? In what cases does the value of a cell changed whitout firing a AfterCellUpdate event.

Or is there something else to change the style of a cell depending on the content of the cell?

 

Thanks

  Wolfgang

 

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    Hi Wolfgang,

    The InitializeRow event is perfect for what you want here. It fires the first time the row is created and also any time a value in the row changes.

Children