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