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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Cell control is null right after i instantiate it

Thread ID:

Created:

Updated:

Platform:

Replies:

74541 Jun 18,2008 04:23 PM UTC Jun 25,2008 12:57 PM UTC Windows Forms 1
loading
Tags: GridControl
test
Asked On June 18, 2008 04:23 PM UTC

Could someone explain me why the cell control is null after the following operations?

grd.TableDescriptor.Columns[SOME_COLUMN_HEADER].Appearance.AnyRecordFieldCell.CellType = "Control";
grd.TableDescriptor.Columns[SOME_COLUMN_HEADER].Appearance.AnyRecordFieldCell.VerticalAlignment = Syncfusion.Windows.Forms.Grid.GridVerticalAlignment.Middle;
grd.TableDescriptor.Columns[SOME_COLUMN_HEADER].Appearance.AnyRecordFieldCell.HorizontalAlignment = Syncfusion.Windows.Forms.Grid.GridHorizontalAlignment.Center;

grdGroupingControl.Rows[rowIndex].Cells[colIndex].Control = new MyCustomControl();

thx


SubhaSheela R [Syncfusion]
Replied On June 25, 2008 12:57 PM UTC

Hi Jack,

Sorry for the long delay in getting back to you.

You need to handle QueryCellStyleInfo event of GridGrouping Control to set the CellType. Below is the code snippet:


private void gridGroupingControl1_QueryCellStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventArgs e)
{
if (e.TableCellIdentity.RowIndex >= 4 && e.TableCellIdentity.ColIndex == 2)
{
e.Style.CellType = "Control";
e.Style.Control = CB;
System.Collections.Specialized.StringCollection sc = new System.Collections.Specialized.StringCollection();
sc.Add("Australia");
sc.Add("Canada");
sc.Add("London");
sc.Add("Swiz");
e.Style.ChoiceList = sc;
}
}


Here is the sample that illustrates the same:

GGCContrrolCellType.zip

Please let me know if it helps.

Regards,
Subhasheela R









CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;