0
votes

I have a GridPanel and store that is created in code-behind dynamically. The gridpanel has a tool bar with a button "Search" that calls back a function "Search_Click"

If the data is bound from the Page_Load() everything is displayed fine. But if the data is bound from the Search_Click call I can see the store is updated correctly and that it is set on the GridPanel (from the debugger) but the page does not render this data?

Do I need to do something to force a refresh?

1

1 Answers

0
votes

The method I find best for keeping things like grid panels updated is to use databinding. ASP isn't something I've used, but in C# if you wanted to bind to a simple list of strings your code would be something like follows:

BindingSource bs = new BindingSource();
bs.DataSource = MyDataObject;
GridPanel.DataSource = bs;

Then any changes to MyDataObject should be reflected in the GridPanel