Hi Rizwan,
Thank you for your interest in Syncfusion Products.
1. Add Multiple Header RowsGridGroupingControl allows the user to span a column across multiple grid rows or columns. This is possible through the GridColumnSpanDescriptor, which provides information about a column that can span multiple grid rows or columns. GridColumnSpanDescriptor Collection Editor is used to span the columns, which are returned by the ColumnSets property from the TableDescriptor.
Please refer a code snippet below to achieve this.
This feature has also been illustrated in the online sample,
http://samples.syncfusion.com/ASPNET/7.2.0.37/web/grid.grouping.web/samples/3.5/MergedRows/MultiEmployeeRecords/cs/multiemprecords.aspx2. Auto-Resize Columns to fit contentsBy default, GridGroupingControl fits with the column contents by enabling the property AutoFit. If this property is set to false (AutoFit="False"), then Grid contents are displayed with 100% width dependent on the browser. You can also set column width for the Grid columns dynamically like,
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.GridGroupingControl1.AutoFit=true;
}
foreach (GridColumnDescriptor gcd in this.GridGroupingControl1.TableDescriptor.Columns)
{
gcd.Width = 90;
}
}
3. Right Align Numeric ColumnsThe property HorizontalAlignment is used to specify horizontal alignment (Right, Left, Center) of text in the cell using QueryCellStyleInfo event handler, as it occurs for each cell before this control renders it and lets users customize the display of cells.. Please refer the code snippet below to achieve this.
void GridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
if (e.TableCellIdentity.TableCellType == GridTableCellType.RecordFieldCell ||
e.TableCellIdentity.TableCellType == GridTableCellType.AlternateRecordFieldCell ||
e.TableCellIdentity.TableCellType == GridTableCellType.AnyGroupCell ||
e.TableCellIdentity.TableCellType == GridTableCellType.RowHeaderCell)
{
if (e.TableCellIdentity.Column.Name == "Total")
{
e.Style.HorizontalAlignment = Syncfusion.Windows.Forms.Grid.GridHorizontalAlignment.Right;
e.Handled = true;
}
}
}
4. I have add summary but it is not summarizing first two columnsI am afraid that I am unable to reproduce this reported issue. I have created a simple sample to test this issue and the sample is available from below link.
http://files.syncfusion.com/support/GGC.Web/7.2.0.37/57259/main.htmCode Snippet:
SummaryType="Count">
SummaryType="DoubleAggregate">
Format="{Sum}" Name="Value 3" SummaryType="DoubleAggregate">
Have a look at the above sample and if still the issue exists, could you please try reproducing it in the above sample and send us the modified sample so that we could sort out the cause of the issue and provide you a solution?
Also, please find the above sample illustrating the solutions for first three queries and let me know if these helps you out.
5. When there is no data in Grid, The GGC Moves at bottom of pageI am afraid that I am unable to reproduce the reported issue. I have created a simple sample to test this issue and I am able to export the Grid data successfully and the sample is available from below link.
http://files.syncfusion.com/support/GGC.Web/7.2.0.37/F83042/main.htm6. I am trying to export GGC to excel, word and it is not workingI am afraid that I am unable to reproduce the reported issue. I have created a simple sample to test this issue and I am able to export the Grid data successfully and the sample is available from below link.
http://files.syncfusion.com/support/GGC.Web/7.2.0.37/57257/main.htmPlease have a look at the above sample and if still the issue exists, could you please try reproducing it in the above sample and send us the modified sample so that we could sort out the cause of the issue and provide you a solution?
7. I also want to Print grid from my own command button, is there any to do it?We regret to let you know that currently we do not provide support for this feature and it is achieved only through ButtonBars Navigation item in our code library. This feature has been already confirmed as a feature request and we have logged a request in our feature management system. We will get back to you once this feature is implemented.
Please let me know if you have any other concerns.
Thanks,
Rekha