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

Showing GridButtonColumn while in InPlace Edit Mode

3 Answers 181 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 25 Jul 2012, 08:13 PM
I have a grid that has only a master table and is using the scroll bars.  I have only 5 columns in the grid, an edit and delete column, 2 bound columns and a button column that uses an image button.

When I go into InPlace edit mode, I get the 2 text boxes to make changes to the bound columns, but the button column does not have anything in it.

Is there any way to see this column while in InPlace edit mode?  The reason for the button is to do a spell check on one of the 2 text boxes while in edit mode.

Thanks in advance!

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 26 Jul 2012, 04:59 AM
Hi Eric,

The GridButtonColumn will not be shown in the edit mode. One suggestion is to use ImageButton inside the EditItemTemplate of the GridTemplateColumn to show the button in edit mode and inside ItemTemplte to show in view mode.Please take a look into the following ASPX.

ASPX:
<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1" AutoGenerateColumns="false" AutoGenerateEditColumn="true">
    <MasterTableView EditMode="InPlace">
        <Columns>
            <telerik:GridBoundColumn UniqueName="OrderID" DataField="OrderID" HeaderText="OrderID" ></telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="ShipCity" DataField="ShipCity" HeaderText="ShipCity"></telerik:GridBoundColumn>
            <telerik:GridTemplateColumn HeaderText="SpellCheck">
                <ItemTemplate>
                    <asp:ImageButton ID="ButtonViewMode" runat="server" ImageUrl="~/Images/index.jpg" />
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:ImageButton ID="ButtonEditMode" runat="server" ImageUrl="~/Images/index.jpg" />
                </EditItemTemplate>
            </telerik:GridTemplateColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

Thanks,
Shinu.

0
Eric
Top achievements
Rank 1
answered on 26 Jul 2012, 12:44 PM
Hi Shinu,

Thanks for the quick reply.  I will try this out and let you know how it works.

Eric
0
Eric
Top achievements
Rank 1
answered on 30 Jul 2012, 07:02 PM
Hi Shinu,

This code worked perfectly.  Thanks for the help!

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