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

Grid: edit links not appearing

2 Answers 52 Views
Grid
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 19 Aug 2008, 10:43 AM

The links to edit are not appearing.  I'm sure I've overlooked something quite obvious, but I have been unable to find the solution after a day.  Please help!

Here is my code:

<telerik:RadGrid ID="RadGrid1" runat="server" AllowAutomaticUpdates="True" AllowPaging="True" PageSize="30"
                    AllowSorting="True" AutoGenerateColumns="False" DataSourceID="ObjectDataSource1"
                    GridLines="None" Skin="Vista">
                    <MasterTableView DataKeyNames="ID" DataSourceID="ObjectDataSource1" EditMode="InPlace">
                        <RowIndicatorColumn Visible="False">
                            <HeaderStyle Width="20px"></HeaderStyle>
                        </RowIndicatorColumn>
                        <ExpandCollapseColumn Visible="False" Resizable="False">
                            <HeaderStyle Width="20px"></HeaderStyle>
                        </ExpandCollapseColumn>
                        <Columns>
                            <telerik:GridBoundColumn DataField="ID" HeaderText="ID" ReadOnly="True" SortExpression="ID"
                                UniqueName="ID">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="BrokerID" DataType="System.Int32" HeaderText="BrokerID"
                                SortExpression="BrokerID" UniqueName="BrokerID" Visible="False">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="CompanyName" HeaderText="CompanyName" SortExpression="CompanyName"
                                UniqueName="CompanyName">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Branch" HeaderText="Branch" SortExpression="Branch"
                                UniqueName="Branch">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="LastUserID" DataType="System.Int32" HeaderText="LastUserID"
                                SortExpression="LastUserID" UniqueName="LastUserID" Visible="False">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="LastUserDate" DataType="System.DateTime" HeaderText="LastUserDate"
                                SortExpression="LastUserDate" UniqueName="LastUserDate">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="rowguid" DataType="System.Guid" HeaderText="rowguid"
                                SortExpression="rowguid" UniqueName="rowguid" Visible="False">
                            </telerik:GridBoundColumn>
                            <telerik:GridCheckBoxColumn DataField="IsValidForCrm" DataType="System.Boolean" HeaderText="IsValidForCrm"
                                SortExpression="IsValidForCrm" UniqueName="IsValidForCrm">
                            </telerik:GridCheckBoxColumn>
                        </Columns>
                    </MasterTableView>
                </telerik:RadGrid>
                <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" OldValuesParameterFormatString="original_{0}"
                    SelectMethod="GetData" TypeName="DALExtra.CompanyDetailsPrivateDSTableAdapters.CompanyDetailsPrivateTableAdapter"
                    UpdateMethod="Update">
                    <UpdateParameters>
                        <asp:Parameter Name="BrokerID" Type="Int32" />
                        <asp:Parameter Name="CompanyName" Type="String" />
                        <asp:Parameter Name="Branch" Type="String" />
                        <asp:Parameter Name="LastUserID" Type="Int32" />
                        <asp:Parameter Name="LastUserDate" Type="DateTime" />
                        <asp:Parameter Name="rowguid" Type="Object" />
                        <asp:Parameter Name="IsValidForCrm" Type="Boolean" />
                        <asp:Parameter Name="Original_ID" Type="String" />
                        <asp:Parameter Name="Original_BrokerID" Type="Int32" />
                        <asp:Parameter Name="Original_CompanyName" Type="String" />
                        <asp:Parameter Name="Original_Branch" Type="String" />
                        <asp:Parameter Name="Original_LastUserID" Type="Int32" />
                        <asp:Parameter Name="Original_LastUserDate" Type="DateTime" />
                        <asp:Parameter Name="Original_rowguid" Type="Object" />
                        <asp:Parameter Name="Original_IsValidForCrm" Type="Boolean" />
                    </UpdateParameters>
                </asp:ObjectDataSource>

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 19 Aug 2008, 10:53 AM
Hi James,

I went through the code you have provided and found out that your GridEditCommandColumn was missing. Try adding the GridEditCommandColumn to the Grid's ColumnCollection as shown below:

aspx:
<telerik:GridEditCommandColumn UniqueName="Edit"></telerik:GridEditCommandColumn> 

Thanks
Princy.
0
James
Top achievements
Rank 1
answered on 19 Aug 2008, 12:48 PM
Hi Princy,

Thank you - it's working beautifully now!

Cheers,
James.
Tags
Grid
Asked by
James
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
James
Top achievements
Rank 1
Share this question
or