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.

Problem with FormEditMode

Thread ID:

Created:

Updated:

Platform:

Replies:

66717 Aug 1,2007 11:52 AM Aug 3,2007 09:14 AM ASP.NET Web Forms (Classic) 1
loading
Tags: GridGroupingControl
Vladymyr
Asked On August 1, 2007 11:52 AM

I want to create custom form edit.
And I create EditControl . How can I integrate my edit control into Form template.
Where I must set and get data of my EditControl.
PLEASE HELP.

Melba Winshia [Syncfusion]
Replied On August 3, 2007 09:14 AM

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.htm

If 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

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.

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.

;