This is a migrated thread and some comments may be shown as answers.

WebUserControl for EditFormSettings not in focus when opening in Modal mode

3 Answers 111 Views
Grid
This is a migrated thread and some comments may be shown as answers.
bo
Top achievements
Rank 1
bo asked on 25 Feb 2009, 03:19 PM
On my radgrid i'm using the EditFormType="WebUserControl" in the EditFormSettings

When I switch to editmode of the radgrid row the editform opens but is not in focus...

This problem only exists in IE...
Here's a picture of it

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 26 Feb 2009, 05:27 AM
Hi,

Give a try with the following code snippet and see whether it helps.

CS:
 protected void RadGrid1_ItemCreated(object  sender, Telerik.Web.UI.GridItemEventArgs e) 
   { 
        if (e.Item is GridEditFormItem && e.Item.IsInEditMode) 
       { 
           UserControl MyUserControl = e.Item.FindControl(GridEditFormItem.EditFormUserControlID) as UserControl; 
         RadGrid1.Controls.Add( new LiteralControl(String.Format( "<script type='text/javascript'>document.getElementById('{0}').focus();document.getElementById('{0}').select();</script>", MyUserControl.FindControl("TextBox7").ClientID))); 
       } 
   }  

Shinu


0
bo
Top achievements
Rank 1
answered on 26 Feb 2009, 03:41 PM
I guess "focus" wasn't the best word.  The div that the user control is being opened in is not on top.  I guess it's hard to see in the picture.  You know how when you open a window modally everything else goes gray in the background except for the modal window?  Well, this works in firefox but in IE the modal window falls to the background with everything else.

Make sense?
0
Shinu
Top achievements
Rank 2
answered on 27 Feb 2009, 08:03 AM
Hi Bo,

I implemented this in my application. I set the Modal to true in the PopUpSettings and only the background is getting grayed and not the pop-up editform. I tried this in IE6, IE7 and FireFox and it is working as expected. Which version of the Grid are you using? Mine is RadControls for asp.net AJAX version(2008.03.1314.20).

Shinu
Tags
Grid
Asked by
bo
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
bo
Top achievements
Rank 1
Share this question
or