We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Refreshing the GGC at runtime ASP.NET

Hi,

I am using web GGC in asp.net2.0 environement. Now I have an issue with summary rows. My grid has summary row and I am changing grid's datasource at run-time. To re-produce this issue:
Step 1: When I bind DataTable with some/one row(s) as datasource for grid, its showing data with summary row.
Step 2: Next when I bind "null" as datasource for grid, its showing "no records to display". That's correct.
Step 3: Next when I try to bind DataTable with some/one row(s) as datasource for grid, its showing data only. But summary row is missing :(

Can you please let me know, what I am missing? Please find the attached file for more details

Thanks,
Perry



Summary Row is Gone Error_7aa3db5.zip

3 Replies

RS Rajarajeswari S Syncfusion Team November 1, 2008 05:49 AM UTC

Hi Pery,

Thanks for using Syncfusion products.

Please refer the attached sample, which illustrates, changing the DataSource will not affect the SummaryRows:

SummaryRows can be removed, by resetting the TableDescriptor. Once if you reset the TableDescriptor, it will remove the SummaryRow which is added previously from the Grid.

Could you please check this once again? if still the issue exists, could you please try reproduce it with the attached sample and send us? so that we could sort out the reals cause of the issue, and provide you a better solution.

Regards,
Raji



SummaryRow_25eeb255.zip


PW Perry Way November 3, 2008 07:13 PM UTC

Hi Raji,

It's working fine, when you assign "empty array" to grid. But If you try to assign "null", it's making the same issue. I can understand that the TableDescriptor is removed when try to assign "null". It would be nice if we have funcnality like, do not reset the TableDescriptor though "null" as a datasource. I tried like this from your sample code:

protected void Button2_Click(object sender, EventArgs e)
{
//ArrayList array = new ArrayList();
//this.GridGroupingControl1.DataSource = array;

this.GridGroupingControl1.DataSource = null;
}
Thanks,
Perry



RS Rajarajeswari S Syncfusion Team November 6, 2008 09:27 AM UTC

Hi Perry,

Sorry for the delay in response.

Here we need to set the DataSourceCachingMode property to None like below:

this.GridGroupingControl1.DataSourceCachingMode=DataSourceCachingMode.None;

In the sample it is set as "ViewState", when viewstate is set, for each and every postback the Grid will refer the old datasource from the viewstate. To avoid this we have to set this property as "None".

The important thing should be noted here is, when the DataSourceCachingMode is set to none we have to we have to manually update the DataSource of the Grid for all the postbacks.

Please try this and let me know if you have any other concerns.

Regards,
Raji



Loader.
Live Chat Icon For mobile
Up arrow icon