Hi,
My Web Hierarchical Data Source, WHDS, is from two SQL datatables and defined entirely in C#. I'm using .NET 2.0.
Does anyone know how to force the WHDG to refresh/reload when I want, on a postback? I'm changing the database from the page, adding and removing rows, but I can't figure out how to get the WHDG to reload and show current data. All of my inserts/deletes are outside the grid: no direct editing is being done.
Any assistance would be terrific! Thx.
Charles
// in a method that I call in page_load and selectively on a postback
// ... just reloaded my two datatables from SQL stored procedures // Declare the datatables as the datasources of the parent and child dataviews of my WHDS myWebHierarchicalDataSource.DataViews.FindByID("parent").DataSource = myDataTable; myWebHierarchicalDataSource.DataViews.FindByID("child").DataSource = myDataTable2; // Now force a rebind of my WHDG this.myWHDG.Rows.Clear(); this.myWHDG.DataBind();