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
Regarding assigning UltraDataSource to UltraGrid and Events


   I am handling a fairly complex application where in I am trying to do expand and collapse functionality for rows as well as columns. I have developed the functionality to expand / collapse the columns but I am yet to implement it for rows. The thing is, I have a hierarchical data in a flat 2d array. I do not want to use separate child bands to paint the hierarchy in the Ultra Grid. I just want to show (+/-) bitmaps in the Left most column on the LHS of the cell's TextUIElement. Since the parent child relationship is dynamic, I need a mechanism to include the clickable (+/-) images and different indentation for all the rows, based on the level in the hierarchy. Please let me know how can this be achieved. 

   Now the data part. I see that there are 2 different sets of events for a row objects for UltraDataSource and UltraGrid objects. For instance, InitializeDataRow and InitializeRow are two such events that deal with the corresponding datasource and grid objects. Similarly, InitializeRowCollection exists. What shall these event handlers implement as per the norms to take the advantage of subscribing to them. In other words, what is the difference between handling these event handlers and just creating a method of our own and calling it to populate the data source. There are another set of events for UltraDataSource viz. CellDataRequested, CellDataUpdating and CellDataUpdated. Do these methods work only in virtual mode when the LoadStyle is set to OnDemand? 

I have some doubts as to when to assign the datasource to the grid as depending on when the data binding is done, some of the events may be fired or not. For instance, if UltraDataSource is assigned in the beginning, then along with the events for InitializeDataRow and InitializeDataRowCollection, InitializeRow and InitializeRowCollection may be triggered. But if it is bound early, sometimes unwanted events also get fired. Ofcourse we have the option of adding and removing the handlers. But a better approach is what I seek. I am planning to do the operations on UltraDataSource and UltraGrid separately and then bind them as late as possible. 

Typically when shall I apply the styles / appearances, if I am using LoadOnDemand option? The problem is, I am having ValueBasedAppearances sort of situation. 



Parents Reply Children
No Data