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

GridGroupingControl: how to cover columns of a single from the parent table

Using GridGroupingControl: i want the result as in the attached doc.

Thanks
Vivek

test45.zip

9 Replies

AD Administrator Syncfusion Team October 3, 2006 08:55 AM UTC

Hi Vivek,

Please refer to the attached sample which demonstrates the way to add the summary row descriptor in the grid. Kindly try it and let us know if you need any further assistance.

Sample : http://www.syncfusion.com/Support/user/uploads/GGCSummary_344681fa.zip

Best Regards,
Haneef


UB UBS October 4, 2006 10:46 AM UTC

Hi,
Thanks for solution, one more problem, Summary Row Title is not coming properly. which property have to set.
also can refer attachment to see problem.

>Hi Vivek,

Please refer to the attached sample which demonstrates the way to add the summary row descriptor in the grid. Kindly try it and let us know if you need any further assistance.

Sample : http://www.syncfusion.com/Support/user/uploads/GGCSummary_344681fa.zip

Best'>http://www.syncfusion.com/Support/user/uploads/GGCSummary_344681fa.zip''>http://www.syncfusion.com/Support/user/uploads/GGCSummary_344681fa.zip

Best Regards,
Haneef

summary0.zip


AD Administrator Syncfusion Team October 4, 2006 01:00 PM UTC

Hi Vivek,

You can handle the QueryCoveredRange event and set the covered range for the summary cell. Below is a code snippet

//Form load event..
this.grid.TableModel.QueryCoveredRange +=new GridQueryCoveredRangeEventHandler(TableModel_QueryCoveredRange);

private void TableModel_QueryCoveredRange(object sender, GridQueryCoveredRangeEventArgs e)
{
GridTableModel model = sender as GridTableModel;
Element el = model.Table.DisplayElements[e.RowIndex];

if( el.Kind == DisplayElementKind.Summary )
{
GridSummaryRow row = el as GridSummaryRow;
int index = row.SummaryRowDescriptor.SummaryColumns[0].ColInRecord;
GridTableCellStyleInfo info = model[e.RowIndex,e.ColIndex] as GridTableCellStyleInfo;

if( info.TableCellIdentity.TableCellType == GridTableCellType.SummaryTitleCell)
{
e.Range = GridRangeInfo.Cells(e.RowIndex,e.ColIndex ,e.RowIndex,e.ColIndex + index - 1);
e.Handled = true;
}
}
}

Sample : http://www.syncfusion.com/Support/user/uploads/GGCSummary_e60b68e7.zip

Best Regards,
Haneef


UB UBS October 10, 2006 04:05 AM UTC

there is 3 queries:

query 1: Negative values are coming for "TotalOutright" column, i don''t want values like {97,731} but -93,731.
i m doing like this: pls see below code
GridColumnDescriptor col = new GridColumnDescriptor();

col.Name = name;
col.HeaderText = displayText;
col.MappingName = mappingName;

col.Appearance.AnyRecordFieldCell.CellType = "Currency";
col.Appearance.AnyRecordFieldCell.HorizontalAlignment = GridHorizontalAlignment.Right;
col.Appearance.AnyRecordFieldCell.CurrencyEdit.CurrencySymbol = "";
col.Appearance.AnyRecordFieldCell.CurrencyEdit.CurrencyDecimalDigits = 0;
col.Appearance.AnyRecordFieldCell.CurrencyEdit.NegativeSign = "-";
col.Appearance.AnyRecordFieldCell.CurrencyEdit.CurrencyGroupSeparator = ",";

query 2: "TotalCollaterate" column cell values should be "blue" not black.
i am doing like this, pls see the below code, and i don''t want to use event "gridGroupingControl1_QueryCellStyleInfo"

GridColumnDescriptor col = new GridColumnDescriptor();

col.Name = name;
col.HeaderText = displayText;
col.MappingName = mappingName;

col.Appearance.AnyRecordFieldCell.CellType = "Currency";
col.Appearance.AnyRecordFieldCell.HorizontalAlignment = GridHorizontalAlignment.Right;
col.Appearance.AnyRecordFieldCell.CurrencyEdit.CurrencySymbol = "";
col.Appearance.AnyRecordFieldCell.CurrencyEdit.CurrencyDecimalDigits = 0;
col.Appearance.AnyRecordFieldCell.CurrencyEdit.NegativeSign = "-";
col.Appearance.AnyRecordFieldCell.CurrencyEdit.CurrencyGroupSeparator = ",";
col.Appearance.AnyRecordFieldCell.Control.ForeColor = Color.Blue;

query 3: In "RecDate" column, i made column type "datetime", but if there is null data coming for any row, it is showing 01-01-0001, i don''t want that if data is null nothing will come as well as i don''t want dropdown sign.
i am doing like this: pls see below code and i don''t want to use event "gridGroupingControl1_QueryCellStyleInfo"

GridColumnDescriptor col = new GridColumnDescriptor();

col.Name = name;
col.HeaderText = displayText;
col.MappingName = mappingName;

col.Appearance.AnyRecordFieldCell.Format = "dd-MM-yyyy";
col.Appearance.AnyRecordFieldCell.CellValueType = typeof (DateTime);
col.Appearance.AnyRecordFieldCell.HorizontalAlignment = GridHorizontalAlignment.Right;

untitled24.zip


AD Administrator Syncfusion Team October 10, 2006 08:45 AM UTC

Hi,

Query 1: NegativePattern

Use CurrencyEdit.CurrencyNegativePattern property specifies the pattern to use when the value is negative.
col.Appearance.AnyRecordFieldCell.CurrencyEdit.CurrencyNegativePattern = 1;

Query 2: ForeColor of the CurrencyEdit.

Use CurrencyEdit.NegativeColor property specifies the ForeColor to use when the value is negative.
col.Appearance.AnyRecordFieldCell.CurrencyEdit.NegativeColor = Color.Blue;

Use CurrencyEdit.PositiveColor property specifies the ForeColor to use when the value is positive.
col.Appearance.AnyRecordFieldCell.CurrencyEdit.PositiveColor = Color.Blue;

Query 3:

Try these code snippet to resolve this.

GridColumnDescriptor col = new GridColumnDescriptor();

col.Name = name;
col.HeaderText = displayText;
col.MappingName = mappingName;

col.Appearance.AnyRecordFieldCell.Format = "dd-MM-yyyy";
col.Appearance.AnyRecordFieldCell.CellType = "TextBox";
col.Appearance.AnyRecordFieldCell.CellValueType = typeof (DateTime);
col.Appearance.AnyRecordFieldCell.HorizontalAlignment = GridHorizontalAlignment.Right;

Best Regards,
Haneef


UB UBS October 10, 2006 11:56 AM UTC

Hi Haneef,

Thanks.. little more help..
i need linklable column for query 3. but only those record where value is not null

Query 3:

Try these code snippet to resolve this.

GridColumnDescriptor col = new GridColumnDescriptor();

col.Name = name;
col.HeaderText = displayText;
col.MappingName = mappingName;

col.Appearance.AnyRecordFieldCell.Format = "dd-MM-yyyy";
col.Appearance.AnyRecordFieldCell.CellType = "TextBox";
col.Appearance.AnyRecordFieldCell.CellValueType = typeof (DateTime);
col.Appearance.AnyRecordFieldCell.HorizontalAlignment = GridHorizontalAlignment.Right;

>Using GridGroupingControl: i want the result as in the attached doc.

Thanks
Vivek

test45.zip


AD Administrator Syncfusion Team October 10, 2006 01:28 PM UTC

Hi,

Please refer to the below attached sample for LinkLabel cell.
http://www.syncfusion.com/Support/user/uploads/GGCLink_45c6b655.zip

Thanks,
Haneef


UB UBS October 11, 2006 11:25 AM UTC

For "LinkLableCell" if data is coming null then it is populating 01/01/0001, it should not happen, pls suggest any solution without using event gridGroupingControl1_QueryCellStyleInfo
Thanks


>Using GridGroupingControl: i want the result as in the attached doc.

Thanks
Vivek

test45.zip

untitled25.zip


UB UBS October 12, 2006 04:17 AM UTC

Hello any body there


>For "LinkLableCell" if data is coming null then it is populating 01/01/0001, it should not happen, pls suggest any solution without using event gridGroupingControl1_QueryCellStyleInfo
Thanks


>Using GridGroupingControl: i want the result as in the attached doc.

Thanks
Vivek

test45.zip

untitled25.zip

Loader.
Live Chat Icon For mobile
Up arrow icon