I am using UltraWebGrid V10.3. On my page, I have 2 AJAX update panels. The first ajax update panel contains 2 asp dropdowns and a search button. The second ajax update panel contains the UltraWebGrid and a message label. There is no overlap between the 2 update panels. I am retrieving data based on values in the dropdown and binding data to the grid in InitializeDataSource. The problem I am having is that the InitializeDataSource is fired even when a partial postback occurs when I select a value in the first drowpdown from the first update panel. Is there a way to not update the grid when the dropdown changes? Per my requirement, the data in the grid should only change when I click on the search button. Hope that makes sense.
Hello DJ,
Thank you for the sample provided. I noticed some things in this sample. When you use OnInitializeDataSource this will cause an async post back and in this way you need to remove the grid from the update panel or to set the DS in different way. Also Browser="Auto" should be set like this. InitializeDataSource of the grid will be hit before page load. Try to set the DS like this:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
// Populate the drop downs
for (int i = 0; i < 20; i++)
DropDownList1.Items.Add("item" + i.ToString());
DropDownList2.Items.Add("item" + i.ToString());
}
this.UltraWebGrid1.DataSource = GetData();
this.UltraWebGrid1.DataBind();
I hope this information helps.
Looking forward to hear from you.
Sincerely,
Georgi Sashev
Developer Support Engineer
Infragistics, Inc.
http://es.infragistics.com/support
Attached is a sample app. When the first dropdown is selected, it should only update the second dropdown and refresh UpdatePanel1. But you will see that it triggers InitializeDataSource for the Grid that is in Panel2 and update the time in Panel3.
Would it be possible for you to attach me a simple sample that demonstrates this. I will investigate this behavior and assist you further.
Hello Georgi,
Yes. Both UpdatePanels are set to Conditional mode. The ChildrenAsTrigger is set to false in the one with dropdown and set to true in the one with Grid (for paging and sorting). On postback of the dropdown, I am not updating the panel, just updating the second dropdown and refreshing that panel only. The Grid panel is only updated using Update() on postback of the Button which is in the dropdown panel. But for some reason, the grid panel is being updated and grid is refreshed even during postback of the dropdown.
Thanks
-DJ
Hello Dj,
Did you try to set the UpdateMode to Conditional and to trigger updating of this update panel from the drop down?