I have two grids bound to seperate BindingSource objects. The BindingSource objects are bound to two seperate BindingList<T> objects. The idea is that in Grid A, the user can check a box called "Watch" will add the underlying business object to the BindingList<T> bound to Grid B. Both grids have the same schema which includes a percent complete column. Each grids has its PercentComplete column's EditorControl set to a seperate instance of UltraProgressBar (so there are two of these).
If a row in Grid A was %Complete = 50% then the cell shows 50% and the visual feedback shows the cell 50% filled. If the user checks the Watch checkbox, the object is added to the bindinglist of Grid B and displays in Grid B as a new row. The problem is that the %Complete cell for the row says 50 with no visual feedback from the progress bar. Its as though the EditorControl reference is lost. What am I doing wrong?
Thanks,
Paul
Hi Paul,
It's hard to say without seeing it in action. There could be any number of reasons why it's not working.
You say "Its as though the EditorControl reference is lost". If that's true, then you would be able to click on the cell and enter edit mode like a regular text cell. Is that the case?
Also, I'm not really clear on what you mean by "If the user checks the Watch checkbox, the object is added to the bindinglist of Grid B and displays in Grid B as a new row."I guess the Watch checkbox is a column in Grid A and you mean the same row object is being copied from one BindingList to the other. Is that right?
Mike Saltzman"] You say "Its as though the EditorControl reference is lost". If that's true, then you would be able to click on the cell and enter edit mode like a regular text cell. Is that the case?
I just tested again and, no, I don't enter edit mode when the cell is selected.
Mike Saltzman"] Also, I'm not really clear on what you mean by "If the user checks the Watch checkbox, the object is added to the bindinglist of Grid B and displays in Grid B as a new row."I guess the Watch checkbox is a column in Grid A and you mean the same row object is being copied from one BindingList to the other. Is that right?
Sorry for not being more clear. Yes, you are correct. The underlying business object has a bool property called Watch. When checked the set accessor of the property fires an event that tells the UI to take the object reference and add it to the BindingList bound to Grid B. The object then appears as a row in Grid B.
Well, I can't see how the checkbox in the first grid or the fact that the object is coming from the first grid to the second could have anything to do with the issue, then. Basically, you have a grid (Grid B) and the progress bar is not showing up. Where that row comes from is of no relevance to the second grid.
Without seeing the code or a sample, I'm afraid I can't say why it's not working. As a completely wild guess, maybe the data type of the column is wrong or non-numeric. Or maybe you have not set the MinValue/MaxValue properly on the column.