hi
i have a RadGrid control with template edit form implementation, i need to have a subset of controls in edit mode template different from the subset of controls in the add mode template, I've found a way to do that scenario but i'm not sure cause i'm new to Telerik Rad Controls and i did that by setting the controls in panels, at the code behind I've checked the type of the form and depending on the condition these controls turned on or off by setting the visibility property using this snippet:
another option i found is creating my own custom editor, please i need an advice, any help !!
i have a RadGrid control with template edit form implementation, i need to have a subset of controls in edit mode template different from the subset of controls in the add mode template, I've found a way to do that scenario but i'm not sure cause i'm new to Telerik Rad Controls and i did that by setting the controls in panels, at the code behind I've checked the type of the form and depending on the condition these controls turned on or off by setting the visibility property using this snippet:
protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
{
if (e.Item is GridEditFormInsertItem && RadGridConferences.MasterTableView.IsItemInserted)
{
Panel UploadConferenceImage = e.Item.FindControl("UploadConferenceImage") as Panel;
Panel UploadConferenceNewsletter = e.Item.FindControl("UploadConferenceNewsletter") as Panel;
Panel ConferenceImagePanel = e.Item.FindControl("ConferenceImagePanel") as Panel;
RadEditor RadEditorConferenceTxtBody = e.Item.FindControl("RadEditorConferenceTxtBody") as RadEditor;
if (UploadConferenceImage != null && UploadConferenceNewsletter != null && ConferenceImagePanel != null)
{
UploadConferenceImage.Visible = true;
UploadConferenceNewsletter.Visible = true;
ConferenceImagePanel.Visible = false;
}
else
return;
if (RadEditorConferenceTxtBody != null)
{
RadEditorConferenceTxtBody.Style.Add("margin-top", "55px");
}
else
return;
}
}
another option i found is creating my own custom editor, please i need an advice, any help !!