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
640
Refresh Grids rowselector
posted

Hi,

my grids datasourse is a list of objects (with serveral properties)

dim myList as new myList (of MyObject)

myList.add(myOb)

myList.add(myOb2)

UltraGrid1.DataSource = myList

Now, if  one Property in an Object is changed, the grid changes too. Thats perfect. BUT in the "InitializeRow"-Event i set the Image of the Rowselector.  This works only for the first time, when the datasource is set, not if only one property of an object is changed.

How can i set the RowSelector-Image? Which Event is fired, when my object has changed?

(The Problem is, at the Moment, the property changed, i don't have the effected row! (if yes, i know that i could fire the initializeRow Event again....)

Thanks so much and sorry for my bad english!

Parents
  • 1980
    Offline posted

    Hello BBK_JB,

    The Ultra Grid control displays default images in the Row Selectors to indicate certain states of a row like active row, state for adding new row, etc. You can replace these default images by using the RowSelectorImages property of the grids DisplayLayout object. Please find attached a sample windows forms project where I have demonstrated this in the grid’s InitializeLayout event handler.

    If you need to be able to add and delete rows in the grid, then a List is not a good DataSource to use. It is recommended when you want the grid only to display the data in the list as it does not notify the grid when you add or remove rows. In my sample project I use a BindingList<T> instead, which will allow you to update the grid’s rows. You can find more information about this here: http://es.infragistics.com/help/winforms/wingrid-ilist-and-ibindinglist.

    Let me know if you need any further assistance regarding this matter.

    UltraGridRowSelector.zip
Reply Children
No Data