Hi ,
I am using a parent child relation in ultragrid.Data shows fine when I expand the child rows and when i update one of the columns it works fine, . But when I expand 2-3 child rows and update a particular column of a child row ....same value if visible in almost all the expanded rows. I am calling CellDataRequested once i update the column ...and after that it shows same value for that column in all expanded child rows in the column. i have checked the table , view......such data is not there.....
Does anybody faced similar issue???
Any help will be greatly appriciated.
Thanks,
ashish.
Hi Ashish,
I'm afraid I am not sure what you are asking. I don't see any reason why InitializeRow should be firing on any rows but the ones you are explicitly refreshing here. But on the other hand, InitializeRow fires a lot for all sorts of reasons, so there is probably a reason why it needs to fire in this case.
Hi Mike ,
Thanks for your quick response on this. I have figured out the issue , was fecthing wrong data in CellDataRequested .
But i still have a question. Lets say we have 3 parent rows expanded (A,B and C with their child rows A1,B1 and C1) and now we did some update on A1. So ideally when we call FireInitialise row operation on A .....corresponsing opeartion should be fired on A and A1 only.......
But I have obsever this operation takes place on all the expanded child rows like B1 and C1.
I am using following line of code for firing CellDataRequested event.
_historyGrid.Selected.Rows.Cast<UltraGridRow>() .Select(r => r.Index) .ToList() .ForEach ( index => { _HistoryBindingSource.Rows[index].ResetCachedValues(); _historyGrid.Rows[index].Refresh(RefreshRow.FireInitializeRow); } );
Let me know your thoughts on this as I have poor understanding of CellDataRequested event .
Thanks,Ashish.
My guess is there's something wrong with your implementation of CellDataRequested. The grid is probably asking for data for each row and your code may be handing back the data for a single row to all of them.
Of course, that's just a wild guess, there's really not enough information here to be sure.
If you can post a small sample project demonstrating this issue, I'd be happy to take a look at it and try to figure out what's wrong.