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

[Solved] Columns resigning when using EditFormType="WebUserControl"

3 Answers 85 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Steve Wolfe
Top achievements
Rank 1
Steve Wolfe asked on 04 Feb 2010, 07:36 AM
I have a RadGrid and am using a customer usercontrol for the insert/edit forms.  I have an edit column in the grid, and have sized it down to a very small column, 15px.

<telerik:RadGrid ID="_cloudGrid" runat="server" DataSourceID="_dsClouds"    
      AllowAutomaticUpdates="True"   
      AllowAutomaticDeletes="True"   
      AllowAutomaticInserts="True" 
      AutoGenerateColumns="False" > 
      <MasterTableView Width="100%"  CommandItemDisplay="Top" DataKeyNames="Id" InsertItemDisplay="Top" EditMode="EditForms">  
         <CommandItemSettings AddNewRecordText="Create Cloud Account" /> 
         <Columns> 
            <telerik:GridEditCommandColumn HeaderText="Edit" Resizable="false" ButtonType="ImageButton">  
               <HeaderStyle Width="15" /> 
            </telerik:GridEditCommandColumn> 
            <telerik:GridBoundColumn DataField="Id" HeaderText="Id" ReadOnly="true" Visible="false" /> 
            <telerik:GridBoundColumn DataField="Alias" HeaderText="Name" ReadOnly="false" Visible="true" /> 
            <telerik:GridDropDownColumn DataField="Provider" HeaderText="Provider" ReadOnly="false" Visible="true" ListTextField="Name" ListValueField="Value" DataSourceID="_dsProviders" /> 
            <telerik:GridBoundColumn DataField="Login" HeaderText="Access Key" ReadOnly="false" Visible="true" /> 
         </Columns> 
         <EditFormSettings UserControlName="CloudEditForm.ascx" EditFormType="WebUserControl">  
            <PopUpSettings Modal="true" /> 
         </EditFormSettings> 
      </MasterTableView> 
      <ClientSettings> 
         <Resizing  AllowColumnResize="false" AllowRowResize="false" EnableRealTimeResize="false" ClipCellContentOnResize="true" /> 
      </ClientSettings> 
   </telerik:RadGrid> 


When the grid is initally displayed the edit column looks fine.  When you clicke the edit button, the columns resize and the edit column is now much larger.  The resizing only seems to occur when the EditMode is "EditForms", if the EditMode is "PopUp" the resizing doesn't occur.

Has anyone seen this, and possibly have a workaround?

Thanks,
Steve

3 Answers, 1 is accepted

Sort by
0
Steve Wolfe
Top achievements
Rank 1
answered on 04 Feb 2010, 07:38 AM
Please pardon my typo in the Topic, I guess it is late and I need to sleep. :)
0
Accepted
Shinu
Top achievements
Rank 2
answered on 04 Feb 2010, 09:04 AM
Hi Steve,

Can you try setting the TableLayout property for the MasterTableView and see if it helps? Here's an example:
aspx:
<telerik:RadGrid ID="_cloudGrid" runat="server" DataSourceID="_dsClouds" AllowAutomaticUpdates="True" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AutoGenerateColumns="False">  
   <MasterTableView Width="100%" TableLayout="Fixed" CommandItemDisplay="Top" DataKeyNames="Id" InsertItemDisplay="Top" EditMode="EditForms">   
      <CommandItemSettings AddNewRecordText="Create Cloud Account" />  
      <Columns>  
         <telerik:GridEditCommandColumn HeaderText="Edit" Resizable="false" ButtonType="ImageButton">   
            <HeaderStyle Width="15" />  
         </telerik:GridEditCommandColumn>  

Hope this helps.
Shinu.
0
Steve Wolfe
Top achievements
Rank 1
answered on 04 Feb 2010, 04:39 PM
Shinu,

Thanks for the response.  That worked perfectly.  I had seen that before, but couldn't remember the setting name.   Thanks again!

-Steve
Tags
Grid
Asked by
Steve Wolfe
Top achievements
Rank 1
Answers by
Steve Wolfe
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Share this question
or