or
class
PagerTemplate : ITemplate
{
public void InstantiateIn(Control container)
{
Button First = new Button();
First.ID =
"btnFirst";
First.Text =
"|<<";
container.Controls.Add(First);
}
}
| protected void rgRaidMembers_ItemDataBound(object sender, GridItemEventArgs e) { |
| if (e.Item is GridEditableItem && e.Item.IsInEditMode) { |
| GridEditFormItem eeditedItem = e.Item as GridEditFormItem; |
| GridEditManager editMan = editedItem.EditManager; |
| GridDropDownListColumnEditor editor = (GridDropDownListColumnEditor)(editMan.GetColumnEditor("ClassID")); |
| DropDownList ddList = editor.DropDownListControl; |
| string[] strA = ddList.SelectedItem.Text.Split(' '); |
| if (strA.Length < 2) { |
| return; |
| } |
| for (int nX = 0; nX < ddList.Items.Count; nX++) { |
| if (!ddList.Items[nX].Text.StartsWith(strA[0])) { |
| ddList.Items.RemoveAt(nX); |
| nX--; |
| } |
| } |
| } |
| } |
((
RadComboBox)this.FindControl(controlName)).SelectedValue = controlValue;
In debug mode I can see that SelectedValue, SelectedItem and SelectedIndex are all set correctly and stay correctly set in the Page_Load method.
Despite this, always, the first item is displayed in the textbox area of the combobox.
Any idea what I am missing here?
Thanks,
Lina