I have a formtemplate, inside i have a listbox with id of PriorityType and a textbox with ID = title
so I thought I could populate these when you press the edit button with the itemdatabound event, but this doesn't seem to do anything. Do I need to somehow hook up the databinding elsewhere besides here? Does ajax through a wrinkle with the databinding? I'm at a loss as to why nothing shows up when I hit edit. Are there examples on custom forms that don't use usercontrols?
so I thought I could populate these when you press the edit button with the itemdatabound event, but this doesn't seem to do anything. Do I need to somehow hook up the databinding elsewhere besides here? Does ajax through a wrinkle with the databinding? I'm at a loss as to why nothing shows up when I hit edit. Are there examples on custom forms that don't use usercontrols?
protected
void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
{
if (e.Item is GridEditFormItem && e.Item.IsInEditMode)
{
GridEditFormItem editFormItem = (GridEditFormItem)e.Item;
TextBox tb = editFormItem.FindControl("Title") as TextBox;
tb.Text =
"HELLO";
ListBox lb = editFormItem.FindControl("PriorityType") as ListBox;
lb.Items.Add(
"HELLO");
}
}