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. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Create GridGroupingControl at runtime

Thread ID:

Created:

Updated:

Platform:

Replies:

76732 Sep 22,2008 07:10 AM UTC Nov 1,2008 02:02 AM UTC ASP.NET Web Forms (Classic) 5
loading
Tags: GridGroupingControl
Administrator [Syncfusion]
Asked On September 22, 2008 07:10 AM UTC

Hi,
Is it possible to create GridGroupingControl in code behind page?




Rajarajeswari S [Syncfusion]
Replied On September 23, 2008 08:22 AM UTC

Hi Satish,

Thanks for using Syncfsuion products.

Yes, you can create GridGroupingControl at runtime. Please refer the below code snippet which illustrates this:

protected void Page_Load(object sender, EventArgs e)
{
Syncfusion.Web.UI.WebControls.Grid.Grouping.GridGroupingControl ggc = new Syncfusion.Web.UI.WebControls.Grid.Grouping.GridGroupingControl();
ggc.ID = "GridGroupingControl1";
ggc.DataSource = emp1;
this.form1.Controls.Add(ggc);

}

Please refer the sample from the below link, which illustrates the above:

http://www.syncfusion.com/support/user/uploads/GGC_4bdf93b9.zip

Please let me know if this helps you out.

Regards,
Raji




Administrator [Syncfusion]
Replied On September 23, 2008 10:32 AM UTC

Hi,
If record cell value is NULL , How to set NULL value for particular cell.

Thank you
Satish


Rajarajeswari S [Syncfusion]
Replied On September 29, 2008 07:04 AM UTC

Hi Satish,

Sorry for the delay in getting back to you.

We are going to bind the GridGroupingControl with a datasource, which is a collection of records. The below code snippet is used for it:

ggc.DataSource = emp1;

If the DataSource contains null values for the records, Grid is automatically binded with null record. then it shows empty values for those record.

emp1.Add(new Empclass1(001, "xxx", "USA", 23456));
emp1.Add(new Empclass1(002, "www", "USA", 21436));
emp1.Add(new Empclass1(003, "yyy", "UK", 35456));
emp1.Add(new Empclass1(004, "zzz", "USA", 53456));
emp1.Add(null);
emp1.Add(new Empclass1(006, "aaa", "UK", 73756));


In the above snippet, the 5th record contains null value. while binding this with Grid. it shows empty for the 5th record.

Could you please try this with the previously updated sample? and let us know if this helps you out.

Regards,
Raji



Muneeb Younsi
Replied On October 29, 2008 04:33 PM UTC

Hi,

I am working in Deutsche Bank and using SyncFusion. I want to change the cell value at run time. Could you tell me how to do it?

thanx

regards

Muneeb Youns.

>Hi Satish,

Sorry for the delay in getting back to you.

We are going to bind the GridGroupingControl with a datasource, which is a collection of records. The below code snippet is used for it:

ggc.DataSource = emp1;

If the DataSource contains null values for the records, Grid is automatically binded with null record. then it shows empty values for those record.

emp1.Add(new Empclass1(001, "xxx", "USA", 23456));
emp1.Add(new Empclass1(002, "www", "USA", 21436));
emp1.Add(new Empclass1(003, "yyy", "UK", 35456));
emp1.Add(new Empclass1(004, "zzz", "USA", 53456));
emp1.Add(null);
emp1.Add(new Empclass1(006, "aaa", "UK", 73756));


In the above snippet, the 5th record contains null value. while binding this with Grid. it shows empty for the 5th record.

Could you please try this with the previously updated sample? and let us know if this helps you out.

Regards,
Raji





Mohamed Suhaib Fahad A. [Syncfusion]
Replied On November 1, 2008 02:02 AM UTC

Hi Muneeb,

Thanks for using Syncfusion products.

You can use the QueryCellStyleInfo event that gets trigerred for each element / cell when it gets generated. Use the Style parameter to modify your inner text value.

e.Style.Text = "Hello";
e.Handled = true;

Please let me know if you want any more details.

Thanks,
Fahad
ASP.NET Grid Team
Syncfusion Inc.,


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;