Hello,
I have 1 datepicker, a button and a WHDG on a page. the WHDG is behind a Update Panel. When i do a search, the grid displays the data as expected. When i go to another date, the grid doesn't refresh. I have debugged the function and i can see that the correct data is coming back from the server into th WHDG datasource but for some reason it isn't rebinding the data when instructed.
The function looks like this:
public void search(Object sender, EventArgs e){
using (XMLDataSource xmlDataSource = new XMLDataSource()) { xmldataSource.XPath = @"/List/User"; xmldataSource.EnabledCaching = false; xmldataSource.Data = GetCases(WebDateStart.Text); whdg1.DataSource = xmlDataSource; whdg1.DataBind(); }}
what i'm expecting is to use this as a report where the users can drill down to a certain level and then change dates and redisplay the current structure with new data in the child records.
Based on the details provided, I understand webDatePicker, Button and WebHierarchicalDataGrid are not in the same update panel. If that is the case due to partial(Ajax) post back WebHierarchicalDataGrid will not be refreshed.
If they are in the same update panel, I would recommend you to set EnableAjax property of WebHierarchicalDataGrid to "false". EnableAjax” property is used to control if the gird will use its own Ajax functionality (the grid is built upon our Ajax Framework - Aikido) and will generate Async Post backs to the Server or will make full Post backs to the Server – when property is set to “false”. This option is useful when “UpdatePanel” is used and the grid is in its content template.
You will find more details on the below links:
<http://help.infragistics.com/Help/NetAdvantage/ASPNET/2011.2/CLR4.0/html/Infragistics4.Web.v11.2~Infragistics.Web.UI.GridControls.WebDataGrid~EnableAjax.html>
<http://blogs.infragistics.com/forums/t/64272.aspx>
I hope this helps.
Hi,
The Date Picker and Button are outside of the Update Panel. Only the WHDG is inside the update panel. On clicking the button, a AsynPostBack is fired from the UpdatePanel and the code from the earlier post is run. I tried the EnableAjax = False and it didn't change anything. Still only shows the same 1 day of information unless i pick a date where there is no data. Then the grid will be cleared out and then when i select another day with data then it populates it with that days data. Its like it isn't getting the message to clear out the old data before populating the new data and is just keeping the old data.
Additionally, i removed the update panel and just left he date picker, button and WHDG in the page and got the exact same result. So its not the UpdatePanel that is the problem. Something isn't telling the WHDG to rebind the new data even though it was instructed to.