- Home
- Forum
- ASP.NET Web Forms (Classic)
- GripGroupingControl Export to Excel without the column of Table: (number) items
GripGroupingControl Export to Excel without the column of Table: (number) items
- Sep 22, 2014 03:58 AM UTC
- Oct 28, 2014 05:04 PM 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
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?
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
- 3 Replies
- 2 Participants
-
SI Siang
- Sep 22, 2014 03:58 AM UTC
- Oct 28, 2014 05:04 PM UTC