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

ggc refresh when click on it

Hi,

I have a ggc and when I change the dataSource
and click on the grid, it returns to the first dataSourse.

why is it?
and why is the grid refreshed on each click?



3 Replies

RB Ragamathulla B Syncfusion Team November 17, 2011 01:18 PM UTC

Hi Michal,

Thank you for your interest in Syncfusion products.

After data bind we calling 'Invalidate' method so its shown like refersh.

Regret for the inconvenience caused. I have created a simple sample to reproduce the issue. But I am

afraid that I was not able to see the reported issue. It is hard to trace why this issue is arising

without having a look at the sample. We have searched our support database for any such similar

issues and found no similar issues.

Refer the sample from below link:
http://www.syncfusion.com/downloads/Support/DirectTrac/77699/GGCDatasource-389448490.zip

Is there any possible way for you to provide us with a sample that shows this issue? or reproduce

the issue in above sample. It will be easier for us to have a closer look into the problem and

resolve it. Thanks for providing additional information if any.

Regards,
Ragamathullah B.



MI Michal November 28, 2011 11:23 AM UTC

I am working with a web application.
My problem is that when I change the grid dataSourse,
the grid does not behave normally.
For example: when opening child table,
it can't be closed. only if I open another child table,
the old table is closed.




YO Yogeshwaran Syncfusion Team December 3, 2011 12:01 PM UTC

Hi Michal,

Thanks for your update.

Query1:Grid binds first data source after refresh

We are Sorry for the inconvenience caused.Your Reported query is " Data source automatically
changing after click event" actual reason of the error is because of post back. If we click
plus/minus button it triggers post back event. I think your grid binds first data source in on load event.Then in every post back event your grid bind first data source only. You need to check "ispostback" condition in on load to avoid this error.

Please refer the following code snippet:
[Code behind]

protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
{
bindDataSource();
bindDataSource1();

GridRelationDescriptor childrelationdescriptor = new GridRelationDescriptor();
childrelationdescriptor.ChildTableName = "Product";
childrelationdescriptor.RelationKind = RelationKind.RelatedMasterDetails;
childrelationdescriptor.RelationKeys.Add("ID", "ID");

GridGroupingControl1.TableDescriptor.Relations.Add(childrelationdescriptor);


this.GridGroupingControl1.Engine.SourceListSet.Add("details", list);
this.GridGroupingControl1.Engine.SourceListSet.Add("Product", list1);

this.GridGroupingControl1.DataMember = "DefaultView";
this.GridGroupingControl1.DataSource = list;
this.GridGroupingControl1.TableDescriptor.Name = "details";


}
this.ChangeDatasource.Click +=new EventHandler(Serialize_Click);
}

Query 2: strange behavior with child table.if I open another child table,the old table is closed.

Your second query is also related with first query. IsPostBack is the resolution for this two query.


For your convenience, We have created the sample and the same it can be download from below link:

datasourcechang1772136206.zip

Please let us know if any other concerns.


Regards.

Yogesh R.



Loader.
Live Chat Icon For mobile
Up arrow icon