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
315
Refresh Datasource
posted

Hi,

I have a Collection bound to a Grid. I have formatted the Grid row's Backcolor on a particular property of the object.

As soon as the property changes its Value, i listen the Grid's Initialize Row event, and then color the Row.

InitializeRow event fires automotically as soon as the PropertyChanged event fires from the Set method of the property in the object.

Now i have a situation where, i am changing the value of the property using its variable (i.e. the field) and not directly using the property. So the PropertyChanged doesnt fire and in turn InitializeRow doesnt fire. So even though my object has changed, i am not being able to color the row properly.

So is there a way by which i can force the Grid to re bind its Datasoure, or i can make the Grid refresh its underlying datasource.

 

I have aready tried following:

Grid.Refresh

Grid.Databind

Grid.UpdateDate

Grid.Update

 

None of the them worked.

Regards,

Hemesh

Parents
No Data
Reply
  • 1590
    posted

    You can force OnInitizeRow event to be raised manually via

         grid.Rows.Refresh(RefreshRow.FireInitializeRow, true);

    Alex.

Children
No Data