protected
void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
BLL.DealflowCompany dfCompany = null;
string idString ="";
if (e.Item.ItemType== GridItemType.EditItem)
{
GridEditableItem editedItem = e.Item as GridEditableItem;
GridEditManager editMan = editedItem.EditManager;
GridDropDownListColumnEditor editor =
editMan.GetColumnEditor("BusinessAreaKey") as GridDropDownListColumnEditor;
try{// Exception for new Item
idString = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ID"].ToString();
if (!string.IsNullOrEmpty(idString))
{
dfCompany = BLL.DealflowCompany.FromID(Convert.ToInt32(idString));
editor.DropDownListControl.SelectedValue = dfCompany.BusinessAreaKey;
}
}
catch{}
if(editor!=null)
{
editor.DataSource = LBOffice.Website.Language.GetBusinessAreas(Session["language_path"].ToString());
editor.DataTextField="Area";
editor.DataValueField = "Key";
editor.DataBind();
if(dfCompany!=null)
editor.SelectedValue = dfCompany.BusinessAreaKey;
}
}
I will appreciate if you can help me in resolving this issue.
Thanks.

| <telerik:RadFormDecorator runat="server" ID="rad" DecoratedControls="All"/> |
| <asp:DropDownList ID="ddlTest" runat="server"> |
| <asp:ListItem Text="11212122"></asp:ListItem> |
| <asp:ListItem Text="1121fd122"></asp:ListItem> |
| <asp:ListItem Text="1121fs122"></asp:ListItem> |
| <asp:ListItem Text="1121sdf22"></asp:ListItem> |
| <asp:ListItem Text="1121f2122"></asp:ListItem> |
| <asp:ListItem Text="1121f2122"></asp:ListItem> |
| <asp:ListItem Text="112121df"></asp:ListItem> |
| <asp:ListItem Text="11212d22"></asp:ListItem> |
| <asp:ListItem Text="112df122"></asp:ListItem> |
| <asp:ListItem Text="112sgh22"></asp:ListItem> |
| <asp:ListItem Text="1121gh22"></asp:ListItem> |
| <asp:ListItem Text="112er122"></asp:ListItem> |
| <asp:ListItem Text="11er2122"></asp:ListItem> |
| <asp:ListItem Text="11er2122"></asp:ListItem> |
| <asp:ListItem Text="112erer2"></asp:ListItem> |
| <asp:ListItem Text="11212e22"></asp:ListItem> |
| <asp:ListItem Text="11e1e122"></asp:ListItem> |
| <asp:ListItem Text="112e2h22"></asp:ListItem> |
| <asp:ListItem Text="11e1h122"></asp:ListItem> |
| <asp:ListItem Text="1121h122"></asp:ListItem> |
| <asp:ListItem Text="1121e122"></asp:ListItem> |
| <asp:ListItem Text="11w1h122"></asp:ListItem> |
| <asp:ListItem Text="112h2122"></asp:ListItem> |
| <asp:ListItem Text="1121e122"></asp:ListItem> |
| <asp:ListItem Text="11sh2122"></asp:ListItem> |
| <asp:ListItem Text="11212122"></asp:ListItem> |
| <asp:ListItem Text="112f2122"></asp:ListItem> |
| <asp:ListItem Text="11212fg2"></asp:ListItem> |
| <asp:ListItem Text="1121dfg2"></asp:ListItem> |
| <asp:ListItem Text="11212122"></asp:ListItem> |
| <asp:ListItem Text="1dfg2122"></asp:ListItem> |
| <asp:ListItem Text="1121dfg2"></asp:ListItem> |
| <asp:ListItem Text="1121d122"></asp:ListItem> |
| </asp:DropDownList> |
http://demos.telerik.com/aspnet-ajax/input/examples/common/orderform/defaultcs.aspx
On that page try paste some text into any textbox and then lose focus (click somewhere) and then again set focus on textbox. The text disappear! Why is that happening and how to avoid that?
It happens in FF and Opera. In IE 8 not.

| protected void RadGridSubjectArea_PreRender(object sender, EventArgs e) |
| { |
| Trace.Write("Event", this.ToString() + ": " + "RadGridSubjectArea_PreRender"); |
| RadGrid grid = (RadGrid)sender; |
| bool editAllowed = this.isEditAllowed; |
| grid.AllowAutomaticInserts = editAllowed; //Added safety since controls should be hidden |
| grid.AllowAutomaticDeletes = editAllowed; |
| grid.AllowAutomaticUpdates = editAllowed; |
| GridTableView view = grid.MasterTableView; //Top-level view |
| //Set editability of this view and child views at any level |
| this.GridTableHierarchySetEditability(view, editAllowed); |
| //Try to force the display to refresh? //Clicking master grid's Refresh Data hides the columns even if this code is NOT re-run, // so it seems the setting has been made, but not used during the first render? |
| //grid.Rebind(); //This prevents clicking Refresh Data from working. |
| } |
| protected void GridTableHierarchySetEditability(GridTableView view, bool editAllowed) |
| { |
| Trace.Write("Event", this.ToString() + ": " + "GridTableHierarchySetEditability"); |
| //Recursively set editability for this table view and all its children. |
| //Unnecessary since we hide command buttons, but this is further protection. |
| view.AllowAutomaticInserts = editAllowed; |
| view.AllowAutomaticDeletes = editAllowed; |
| view.AllowAutomaticUpdates = editAllowed; |
| //Show or hide command columns (generally edit or delete) |
| foreach (GridColumn col in view.Columns) |
| { |
| if (col.ColumnType == "GridEditCommandColumn" || col.ColumnType == "GridButtonColumn") |
| { |
| col.Visible = editAllowed; |
| } |
| } |
| //Process any child tables |
| foreach (GridTableView child in view.DetailTables) |
| { |
| this.GridTableHierarchySetEditability(child, editAllowed); |
| } |
| } |
| <BR> |