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
close icon

GripGroupingControl Export to Excel without the column of Table: (number) items

Is there anyway to export the gripgroupingcontrol to excel without the column of Table: (number) items?

3 Replies

SI Silambarasan I Syncfusion Team September 23, 2014 06:25 AM UTC

Hi Siang,

 

Thank you for using Syncfusion Products.

 

We would like to let you know that your requirement (“GridGroupingControl export to excel without the caption column- Table: (number) items”) can be achieved by setting showCaption as false under TopLevelGroupOptions in GridGroupingControl. Please refer the below code snippets.

 

CODE SNIPPET:

 

[ASPX]

 

<Syncfusion:GridGroupingControl ID="GridGroupingControl1" runat="server" ShowGroupDropArea="false" PostBackOnFocusedChanged="true" AutoFormat="Office 2007 Blue" Width="700"

DataSourceCachingMode="ViewState">

<TableDescriptor AllowFilter="False" AllowNew="false" AllowEdit="false">TableDescriptor>

Syncfusion:GridGroupingControl>

 

<asp:Button ID="Button1" runat="server" Text="Excel Export" OnClick="Button1_Click" />

 

 

[ASPX.CS]

 

protected void Button1_Click(object sender, EventArgs e)

{

GridExcelExport excel = new GridExcelExport(this.GridGroupingControl1, "excel.xls");

 

excel.GridGroupingControl.TopLevelGroupOptions.ShowCaption = false;

excel.Export();

}

 

For your convenience, we have prepared a simple sample to demonstrate this and the same can be downloaded from the below link.

 

Link: SampleProject.zip

 

If we misunderstood your requirement please get back to us with more information so that we can analyse based on your scenario and provide you better solution quickly?

 

The information provided would be a great help for us to resolve this issue.

 

Please let us know if you need any further assistance.

 

Regards,

 

Silambarasan I



SI Siang replied to Silambarasan I October 27, 2014 03:20 AM UTC

Hi Siang,

 

Thank you for using Syncfusion Products.

 

We would like to let you know that your requirement (“GridGroupingControl export to excel without the caption column- Table: (number) items”) can be achieved by setting showCaption as false under TopLevelGroupOptions in GridGroupingControl. Please refer the below code snippets.

 

CODE SNIPPET:

 

[ASPX]

 

<Syncfusion:GridGroupingControl ID="GridGroupingControl1" runat="server" ShowGroupDropArea="false" PostBackOnFocusedChanged="true" AutoFormat="Office 2007 Blue" Width="700"

DataSourceCachingMode="ViewState">

<TableDescriptor AllowFilter="False" AllowNew="false" AllowEdit="false"></TableDescriptor>

</Syncfusion:GridGroupingControl>

 

<asp:Button ID="Button1" runat="server" Text="Excel Export" OnClick="Button1_Click" />

 

 

[ASPX.CS]

 

protected void Button1_Click(object sender, EventArgs e)

{

GridExcelExport excel = new GridExcelExport(this.GridGroupingControl1, "excel.xls");

 

excel.GridGroupingControl.TopLevelGroupOptions.ShowCaption = false;

excel.Export();

}

 

For your convenience, we have prepared a simple sample to demonstrate this and the same can be downloaded from the below link.

 

Link: SampleProject.zip

 

If we misunderstood your requirement please get back to us with more information so that we can analyse based on your scenario and provide you better solution quickly?

 

The information provided would be a great help for us to resolve this issue.

 

Please let us know if you need any further assistance.

 

Regards,

 

Silambarasan I


Thank you for the information, it help me solved my problem.

I have another issue, is there anyway to disable the display of the column Table: (number) items in GripGroupingControl?


SI Silambarasan I Syncfusion Team October 28, 2014 05:04 PM UTC

Hi Siang,

 

Thanks for your update.

 

We are glad to let you know that your requirement (“Disable the Caption column - Table: (number) items in GridGroupingControl”) can be achieved by setting TopLevelGroupOptions-ShowCaption property as false.  Please refer the below code snippets.

 

CODE SNIPPET:

 

Method #1

 

ASPX

 

<Syncfusion:GridGroupingControl ID="GridGroupingControl1" runat="server" AutoFormat="Office 2007 Blue"

DataSourceCachingMode="ViewState" TopLevelGroupOptions-ShowCaption="false">

<TableDescriptor AllowFilter="False" AllowNew="false" AllowEdit="false">

<Columns>

//...

</Columns>

</TableDescriptor>

</Syncfusion:GridGroupingControl>

 

Method #2

 

ASPX.CS

 

protected void Page_Load(object sender, EventArgs e)

{

if (!IsPostBack)

{

//Bind data to GridGroupingControl.

GetData();

this.GridGroupingControl1.TopLevelGroupOptions.ShowCaption = false;

}

}

 

 

For your convenience, we have prepared a simple sample to demonstrate this and the same can be downloaded from the below link.

 

Link: SampleProject.zip

 

Please let us know if you need any further assistance.

 

Regards,

 

Silambarasan I

 


Loader.
Live Chat Icon For mobile
Up arrow icon