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

RadGrid Cannot Add Edit or Delete

0 Answers 7 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Perry
Top achievements
Rank 1
Perry asked on 21 Aug 2019, 03:02 PM

I have this Rad Grid setup

<telerik:RadGrid ID="RGLeadExaminer" runat="server"
                                        OnItemCommand="RadEmployees_ItemCommand"
                                        OnInsertCommand="RGLeadExaminer_InsertCommand"
                                        OnUpdateCommand="RGLeadExaminer_UpdateCommand"
                                        OnItemCreated="RGLeadExaminer_ItemCreated"
                                        OnItemInserted="RGLeadExaminer_ItemInserted"
                                        OnItemDataBound="RGLeadExaminer_ItemDataBound"
                                        AllowAutomaticInserts="false"
                                        AutoGenerateColumns="false"
                                        OnNeedDataSource="RGLeadExaminer_NeedDataSource"
                                        AllowAutomaticDeletes="true"
                                        AllowAutomaticUpdates="false"
                                        MasterTableView-AllowAutomaticInserts="true">
                                        <MasterTableView AutoGenerateColumns="false" CommandItemDisplay="Top"
                                            DataKeyNames="ExaminationId" Font-Size="Medium"
                                            NoMasterRecordsText="No Validations Added" InsertItemPageIndexAction="ShowItemOnCurrentPage"
                                            CommandItemSettings-AddNewRecordText="Add New Comparison">
                                            <Columns>
                                                <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn" />
                                                <telerik:GridTemplateColumn UniqueName="" HeaderText="Lead Examiner Full Name">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblExaminerName" runat="server"
                                                            Text='<%# DataBinder.Eval(Container.DataItem, "ExaminerName") %>'>
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <EditItemTemplate>
                                                        <asp:DropDownList ID="ddlExaminerName" runat="server" UniqueName="ExaminerName" DataTextField="ExaminerName" DataValueField="ExaminedById_FK" />
                                                    </EditItemTemplate>
                                                </telerik:GridTemplateColumn>
                                                <telerik:GridTemplateColumn UniqueName="DateTemplateColumn" HeaderText="Comparison Date" SortExpression="ComparisonDate">
                                                    <ItemTemplate>
                                                        <asp:Label ID="ComparisonDateEditItemTemplate" runat="server"
                                                            Text='<%# DataBinder.Eval(Container.DataItem, "ExaminedDate","{0:MM/dd/yyyy}") %>'>
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <EditItemTemplate>
                                                        <telerik:RadDatePicker ID="dpExaminationDate" UniqueName="ExaminationDatePicker" DateInput-DateFormat="MM/dd/yyyy" MinDate="2006/1/1" runat="server" DbSelectedDate='<%# Bind("ExaminedDate") %>'>
                                                        </telerik:RadDatePicker>
                                                    </EditItemTemplate>
                                                </telerik:GridTemplateColumn>
                                                <telerik:GridTemplateColumn UniqueName="ExamByNonOCSO" HeaderText="Examined By Non OCSO">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblOtherAgency" runat="server" Visible="true"
                                                             Text='<%# DataBinder.Eval(Container.DataItem, "ExaminedByNoneOCSO") %>'></asp:Label>
                                                    </ItemTemplate>
                                                    <EditItemTemplate>
                                                        <asp:TextBox runat="server" ID="txtExamindedBy" Visible="true"></asp:TextBox>
                                                    </EditItemTemplate>
                                                </telerik:GridTemplateColumn>
                                                <telerik:GridTemplateColumn AllowFiltering="false">
                                                    <ItemTemplate>
                                                        <asp:Button ID="btnComparisonDelete" CssClass="btn btn-xs btn-danger"
                                                            Text="Delete" runat="server" OnClick="btnComparisonDelete_Click"
                                                             OnClientClick="confirmAspButton(this); return false;"></asp:Button>
                                                    </ItemTemplate>
                                                </telerik:GridTemplateColumn>
                                            </Columns>
                                        </MasterTableView>
                                    </telerik:RadGrid>

 

The Radgrid works fine to display the data.  The problem is I cannot add, delete or edit any records.  If I click the delete button or edit icon nothing happens.  If I click the Add new comparison link all of the controls used to add a new record are displayed. The drop down list shows the first record for the list, but I cannot get the drop down list to open and show other selections, I cannot click into the text box to add new text.

But for some reason I can select a date for the date picker.  If I click the Insert or cancel links nothing happens.  What have I done wrong with this setup.

 

I am using a SQL Server view as my datasource for this grid.  I have used views in the past without this problem.

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Perry
Top achievements
Rank 1
Share this question
or