Hi All,
I have a Grid bound to a Dictionary<> in C# (Actually bound to Dictionary.Values). I am doing this because I am editing the values of the grid pretty often and have a large data set, so using the dictionary allows me to find the exact element I am trying to change without looping through the entire collection.
This is working pretty well. I realize that a Dictionary doesn't provide notification when the collection is changed, so to show changes in the Grid I call the following 2 lines of code when I change any Dictionary element:
This shows all updates! Horray! However, it does not resort the grid correctly. So, if one of the fields that is being sorted changes, the rows do not move accordingly. I was hoping that I could determine when I might need to resort and call a "Resort()" type method, but it seems like I can't.
How can I get the Grid to resort in this scenario?
Thanks All!
I have a Grid bound to a Dictionary<> in C# (Actually bound to Dictionary.Values). I am doing this because I am editing the values of the grid pretty often and have a large data set, so using the dictionary allows me to find the exact element I am trying to change without looping through the entire collection.
This is working pretty well. I realize that a Dictionary doesn't provide notification when the collection is changed, so to show changes in the Grid I call the following 2 lines of code when I change any Dictionary element:
grid.TableElement.Update(GridUINotifyAction.DataChanged);
grid.TableElement.Update(GridUINotifyAction.StateChanged);
This shows all updates! Horray! However, it does not resort the grid correctly. So, if one of the fields that is being sorted changes, the rows do not move accordingly. I was hoping that I could determine when I might need to resort and call a "Resort()" type method, but it seems like I can't.
How can I get the Grid to resort in this scenario?
Thanks All!