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

Edit Form width in RadGrid

4 Answers 362 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
john
Top achievements
Rank 1
john asked on 27 Apr 2011, 02:18 AM
Hi,

   I have RadGrid in that am using edit form for inserting and editing records. I have given MasterTableView Width 150%.While adding the new record edit form is coming correctly and it is 100%. But while in edit mode,it  is taking the width of MasterTableView. Is there any way to set the width 100% in edit mode also.


Please help me.

Thanks,
John

4 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 27 Apr 2011, 12:25 PM
Hello John,

Refer to the forum thread below, which describes how you can achieve your goal:
http://www.telerik.com/community/forums/aspnet-ajax/grid/need-to-set-the-width-in-editmode.aspx

Regards,
Pavlina
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
john
Top achievements
Rank 1
answered on 02 May 2011, 04:57 AM
Thank you for your response.

In Item created event i have written the following code but is not working for me.

 

if (e.Item.IsInEditMode && e.Item.ItemType == GridItemType.EditFormItem)

 

 

{    

 

 

e.Item.Width =

 

Unit.Pixel(600);

 

 

}
I need to change the edit form width itself.
0
Accepted
Shinu
Top achievements
Rank 2
answered on 02 May 2011, 06:19 AM
Hello John,

One suggestion is to set the EditForm width by overriding the default CSS like below.
CSS:
Div.RadGrid_SkinName .rgEditForm
        {
            border: 1px solid;
            width: 600px;
        }

Thanks,
Shinu.
0
john
Top achievements
Rank 1
answered on 06 May 2011, 03:03 AM
Thank you shinu.

Its Working.
Can you please tell me how to know whether user is adding new record or editing the existing record from the client side.


Thanks
Badri
Tags
General Discussions
Asked by
john
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
john
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Share this question
or