Hi,
Thank you for your interest in Syncfusion Products.
If your intention is to to integrate your control in to Grid control, it can be achieved by using 'ItemTemplate'.
[C#]
protected void GridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
//Look for the RecordField and AlternateField Cell.
if (e.TableCellIdentity.TableCellType == GridTableCellType.RecordFieldCell || e.TableCellIdentity.TableCellType == GridTableCellType.AlternateRecordFieldCell)
{
//Look for the Column Name "Column2" in the GridGroupingControl when it get rendered
if (e.TableCellIdentity.Column.Name == "City")
{
//Changes the EditItem template of the column specified as DropDownListBox
DropDownList dropdown = new DropDownList();
dropdown.Items.Add("USA");
dropdown.Items.Add("UK");
dropdown.Items.Add("London");
dropdown.AutoPostBack = true;
dropdown.SelectedIndexChanged += new EventHandler(dropdown_SelectedIndexChanged);
//Here we adding the DropDownListBox programatically using ITemplate Interface
TemplateClass mytemp = new TemplateClass(dropdown);
e.TableCellIdentity.Column.ItemTemplate = mytemp;
}
}
}
public class TemplateClass : ITemplate
{
private Control m_ctrlChildControl = null;
public TemplateClass(Control ctrlChildControl)
{
m_ctrlChildControl = ctrlChildControl;
}
public void InstantiateIn(Control container)
{
container.Controls.Add(m_ctrlChildControl);
}
}
Please refer the sample in the below link which illustrates the above.
http://websamples.syncfusion.com/samples/Grid.Web/5.1.0.51/F66717/main.htmIf I have misunderstood your requirement, could you please explain me in detail, so that I can work in depth and try to send a better solution?
Thanks,
Melba