Hi, I am getting the exception while performing drag drop on multiband grid. I am dragging a row on to the other row and deleting the dragged row. I am attaching the sample project which has the issue. In the sample just drag "Employee 3" over to "Employee 1" you will get the exception. Can some one pls help?
Hi,
The error message you are getting here is coming from the BindingManager. Basically, your data source is rejecting the deletion - it's nothing to do with the grid.
It's probably because your data source and the Children property are using List<T> instead of BindingList<T>. List<T> is very limited as a data source.
Thanks Mike. That did the trick. But I have a follow up questions. I am having the data in the following manner:-Band 0 (Profit) | Column Total
Band 1(Services) | Column Total
Band 2(Software) | Column Total Band 2(Hardware) | Column TotalI want the Sum of Total Column of Band 2 to be the Total of Band 1. And the total of Band 1 to be the total of Band 0. Provided that I have recursive Data structure so I dont have any control on number of bands (the depth will not be more than 8). Will it be possible in the grid using Formulas or WinCalcManager? If yes, Can you pls provide a sample or a link for me to get started ? Thanks
This is discussed here: sum cell from band[1] into cell in band[0] - Infragistics Community
Thanks Mike. I did read that link before. But as I mentioned in the post that my data is recursive. I will not know how many child bands will be created. So I will not be able to write the formula like this Sum([Band 1/Column 0]). Is there any way I can write a formula that every parent row calculates its child rows and show the sum at the parent row.? My requirement is like a bottom up Sum of nodes in a Tree.
Wow!! Thanks that did the trick. I dint event ried that before as I was wondering when I will have the same Summary key , ultragrid will blow up. But it worked. Thanks Mike for the sample. Can you please take this conversation out to separate thread so that some one else might get the answer as this thread title is about drag drop problem? Anyways, Thanks for the sample.
The fact that you have an unknown number of bands is not a problem, You simply have to loop through the Bands collection inside InitializeLayout and apply the same formula to the same column in each band. You could even give the summaries different keys - perhaps by appending the band index in the summary key.
I don't think that the duplicate band keys will be an issue, either. The formula syntax is not ambiguous, and it's pretty clear that you are referencing a summary of a child band. So the grid should be able to find the right summary.
So I don't see anything that will prevent you from doing this in InitializeLayout just as my sample does.
Thanks Mike for the sample and Thanks for following up.Sample works well *only* when you know how many bands you will be having in your grid. Like in the sample a grand parent band, parent band and child band. But as I said that my data is recursive in nature and I will not know how many band will I be having(I do have the MaxBandDepth set to 8 though) .I guess I have to write a recursive routine in initialzerow or seomwhere to calculate the summary myself and put it on a cell. But I would still use the summary or Formulas and let ultragrid calculate for me. Let me know if you guys have any more question or if I have missed something.
Hello ajayk2k1,
Did you have the time to look at the sample? Is it fine for you? Please let me know, I will be waiting for your feedback.
I responded to your request for a sample on the other thread.
WinCalcManager formulas in WinGrid with hierarchical data - Infragistics Community