Hi
I am using UltraGrid control and i need some help with it.
I have 10 columns and from them one column is Bounded with UltraDataSource and rest 9 columns are unbounded columns.
I assign the data source to grid and used ultraGridView.UltraWinDataSource.Rows.SetCount(Count) to add rows.
Then i got ultraDataSource_CellDataRequested call
I used celldataRequested to update bounded column data but can't use it to fill unbounded column data beacuse till now no row is added in grid
So i tried other event "InitializeRow" but there i got "-1" row index for each row.
i want to fill unbounded column data after my Bounded coulmn data is filled but i can't find any specific event which is invoked when rows are added.
Other thing is i want to set UltraGridRow tag in ultraDataSource_CellDataRequested event but it sets the row tag of dataSource not ultraGrid row,
so is there any other place where it can be done?
Hi,
Have you been able to resolve your issue ? Please send us a feedback.
Regards
The InitializeRow event is the best place to populate an unbound column.
avlindia said: So i tried other event "InitializeRow" but there i got "-1" row index for each row.
If every row is returning in index of -1 in the InitializeRow event, then that's either a bug or there's a proble in your code.
Are you able to duplicate this behavior in a small sample project so we can check it out?
Another option you might consider, since you are loading the data on-demand, anyway, is to add all of the columns to your UltraDataSource and populate all of the fields in CellDataRequested. That way all of your implementation is in one place.
avlindia said: Other thing is i want to set UltraGridRow tag in ultraDataSource_CellDataRequested event but it sets the row tag of dataSource not ultraGrid row, so is there any other place where it can be done?
There's no way to get the grid row from within CellDataReqested, because the UltraDataSource doesn't know anything about the grid. The rows you get in the CellDataRequested event are UltraDataRow objects.
If you need to apply a value to the tag of a grid row, then again, the InitializeRow event would be the best place to do it.
May be one possible solution is to use the event InitializeRow() of your UltraWinGrid. In this event you can set data to your unbound columns. I think that you can use the same event also for your UltraGridRow.tag. Please look at the attached sample and if you have any questions do not hesiate to ask me