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

Inline edit form table formatting

2 Answers 169 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Clark
Top achievements
Rank 1
Clark asked on 15 Feb 2011, 09:23 PM
I have an inline edit form and everything is working great except I need to have it with more than one column ( like in the demo ). I have attached a screen shot of what I want to do. I have tried setting ColumnNumber to 2 but that has not worked.

Thanks!

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 16 Feb 2011, 06:44 AM
Hello Clark,

You can achieve this by setting the attributes ColumnNumber and EditFormColumnIndex to EditFormSettings and to the Grid-column respectively.
Here is a sample aspx to achieve the same.

aspx:
<telerik:RadGrid ID="RadGrid1" DataSourceID="SqlDataSource1" runat="server
         AutoGenerateColumns="false" HorizontalAlign="NotSet">
<MasterTableView DataKeyNames="EmployeeID" GridLines="None" Width="100%" CommandItemDisplay="Top">
<Columns>
    <telerik:GridEditCommandColumn UniqueName="EditCommandColumn">
    </telerik:GridEditCommandColumn>
    <telerik:GridBoundColumn Visible="False" UniqueName="Country" HeaderText="Country"
                DataField="Country" EditFormColumnIndex="0">
    </telerik:GridBoundColumn>
    <telerik:GridBoundColumn Visible="False" UniqueName="City" HeaderText="City" DataField="City"
               EditFormColumnIndex="0">
    </telerik:GridBoundColumn>
    <telerik:GridBoundColumn UniqueName="Title" EditFormColumnIndex="1" HeaderText="Title"
                        DataField="Title">
    </telerik:GridBoundColumn>
    <telerik:GridButtonColumn UniqueName="DeleteColumn" CommandName="Delete" ButtonType="ImageButton" />
 </Columns>
 <EditFormSettings ColumnNumber="2" >
    <EditColumn UpdateText="Update record" UniqueName="EditCommandColumn1" CancelText="Cancel edit">
    </EditColumn>
    <FormTableButtonRowStyle HorizontalAlign="Left"></FormTableButtonRowStyle>
 </EditFormSettings>
 </MasterTableView>
</telerik:RadGrid>

Please go through the following demo also.
Grid / Edit Form with Multiple Columns

Thanks,
Shinu.
0
Clark
Top achievements
Rank 1
answered on 16 Feb 2011, 09:08 PM
Thanks for the help!
Tags
Grid
Asked by
Clark
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Clark
Top achievements
Rank 1
Share this question
or