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

[Solved] Grid won't enter edit mode

1 Answer 135 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Drammy
Top achievements
Rank 1
Drammy asked on 11 Aug 2009, 05:16 PM
This is probably a case of wood for trees, but I can't work out why this grid won't enter edit mode:

        <telerik:RadGrid ID="CompetitionRounds" runat="server" Enabled="False" AutoGenerateColumns="False" 
            DataSourceID="dsCompetitionRounds" GridLines="None" Width="400px" AllowAutomaticUpdates="True"
            <ClientSettings AllowKeyboardNavigation="true" EnablePostBackOnRowClick="true"
                <Selecting AllowRowSelect="true" /> 
            </ClientSettings> 
            <MasterTableView DataSourceID="dsCompetitionRounds" NoMasterRecordsText="No competition rounds" 
                DataKeyNames="RoundNumber" CommandItemDisplay="None" EditMode="PopUp" AllowAutomaticInserts="False" 
                AllowAutomaticUpdates="true" AllowAutomaticDeletes="false"
                <RowIndicatorColumn> 
                    <HeaderStyle Width="20px"></HeaderStyle> 
                </RowIndicatorColumn> 
                <ExpandCollapseColumn> 
                    <HeaderStyle Width="20px"></HeaderStyle> 
                </ExpandCollapseColumn> 
                <SortExpressions> 
                    <telerik:GridSortExpression FieldName="RoundNumber" SortOrder="Ascending" /> 
                </SortExpressions> 
                <Columns> 
                    <telerik:GridBoundColumn DataField="CourseId" DataType="System.Guid" Display="False" 
                        EmptyDataText="" HeaderText="CourseId" SortExpression="CourseId" UniqueName="CourseId" 
                        Visible="False"
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="RoundNumber" DataType="System.Byte" EmptyDataText="" 
                        HeaderText="#" HeaderTooltip="Round Number" ItemStyle-HorizontalAlign="Center" 
                        SortExpression="RoundNumber" UniqueName="RoundNumber"
                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Top" Width="10px" /> 
                        <ItemStyle HorizontalAlign="Center" /> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="RoundDate" DataFormatString="{0:dd/MM/yyyy HH:mm}" 
                        DataType="System.DateTime" EmptyDataText="" HeaderText="Date" HeaderTooltip="Round Date" 
                        SortExpression="RoundDate" UniqueName="RoundDate"
                        <HeaderStyle VerticalAlign="Top" Width="110px" /> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="Name" EmptyDataText="" HeaderText="Course" ReadOnly="True" 
                        SortExpression="Name" UniqueName="Name"
                        <HeaderStyle VerticalAlign="Top" Width="150px" /> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="GentsStandardScratch" DataType="System.Byte" 
                        EmptyDataText="" HeaderText="GSI" HeaderTooltip="Gents Standard Scratch" ItemStyle-HorizontalAlign="Center" 
                        ReadOnly="True" SortExpression="GentsStandardScratch" UniqueName="GentsStandardScratch"
                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Top" Width="10px" /> 
                        <ItemStyle HorizontalAlign="Center" /> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="LadiesStandardScratch" DataType="System.Byte" 
                        EmptyDataText="" HeaderText="LSI" HeaderTooltip="Ladies Standard Scratch" ItemStyle-HorizontalAlign="Center" 
                        ReadOnly="True" SortExpression="LadiesStandardScratch" UniqueName="LadiesStandardScratch"
                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Top" Width="10px" /> 
                        <ItemStyle HorizontalAlign="Center" /> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" CancelImageUrl="/Images/Cancel.gif" 
                        EditImageUrl="/Images/Edit.gif" UpdateImageUrl="/Images/Update.gif"
                        <HeaderStyle Width="10px" /> 
                    </telerik:GridEditCommandColumn> 
                </Columns> 
                <EditFormSettings EditFormType="Template"
                    <FormTemplate> 
                        <table id="Table2" cellspacing="2" cellpadding="1" width="100%" border="0" rules="none" 
                            style="border-collapse: collapse; background: white;"
                            <tr> 
                                <td> 
                                    <table id="EditTable" cellspacing="1" cellpadding="1" width="250" border="0"
                                        <tr> 
                                            <td> 
                                                <img src="/Images/blank.gif" alt="" height="1px" width="70px" /> 
                                            </td> 
                                            <td> 
                                            </td> 
                                        </tr> 
                                        <tr> 
                                            <td> 
                                                Round: 
                                            </td> 
                                            <td> 
                                                <telerik:RadNumericTextBox ID="numRoundNumber" DbValue='<%# Bind( "RoundNumber" ) %>' 
                                                    Enabled="true" ReadOnly="true" runat="server" NumberFormat-DecimalDigits="0" 
                                                    Width="40px" ShowSpinButtons="false" MinValue="1" MaxValue="72" /> 
                                            </td> 
                                        </tr> 
                                        <tr> 
                                            <td> 
                                                Course: 
                                            </td> 
                                            <td> 
                                                <telerik:RadComboBox ID="lstCourseName" runat="server" DataSourceID="dsCourseNames" 
                                                    SelectedValue='<%# Bind("CourseId") %>' DataTextField="Name" DataValueField="Id" 
                                                    Width="130px"
                                                </telerik:RadComboBox> 
                                            </td> 
                                        </tr> 
                                        <tr> 
                                            <td> 
                                                Date: 
                                            </td> 
                                            <td> 
                                                <telerik:RadDateTimePicker ID="dtmRoundDate" runat="server" DbSelectedDate='<%# Bind("RoundDate") %>' 
                                                    Skin="Default" Width="150px"
                                                    <TimePopupButton HoverImageUrl="" ImageUrl="" /> 
                                                    <TimeView ID="TimeView1" runat="server" StartTime="05:00" Interval="00:30" EndTime="21:00" 
                                                        CellSpacing="-1"
                                                    </TimeView> 
                                                    <Calendar ID="Calendar1" runat="server" UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" 
                                                        ViewSelectorText="x"
                                                    </Calendar> 
                                                    <DatePopupButton HoverImageUrl="" ImageUrl="" /> 
                                                </telerik:RadDateTimePicker> 
                                            </td> 
                                        </tr> 
                                    </table> 
                                </td> 
                                <td> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td align="right" colspan="2"
                                    <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' 
                                        runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'
                                    </asp:Button>&nbsp; 
                                    <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" 
                                        CommandName="Cancel"></asp:Button> 
                                </td> 
                            </tr> 
                        </table> 
                    </FormTemplate> 
                </EditFormSettings> 
            </MasterTableView> 
        </telerik:RadGrid> 
 
 
    <asp:SqlDataSource ID="dsCompetitionRounds" runat="server" ConnectionString="<%$ ConnectionStrings:dbGolfHonoursConnectionString %>" 
        SelectCommand="leaderboard.lb_SelectCompetitionRound" SelectCommandType="StoredProcedure" 
        InsertCommand="leaderboard.lb_InsertCompetitionRound" InsertCommandType="StoredProcedure" 
        UpdateCommand="leaderboard.lb_UpdateCompetitionRound" UpdateCommandType="StoredProcedure" 
        DeleteCommand="leaderboard.lb_DeleteCompetitionRound" DeleteCommandType="StoredProcedure"
        <SelectParameters> 
            <asp:ControlParameter ControlID="Menu$lstCompetitionList" DbType="Guid" Name="CompetitionId" 
                PropertyName="SelectedValue" /> 
        </SelectParameters> 
        <InsertParameters> 
            <asp:ControlParameter ControlID="Menu$lstCompetitionList" DbType="Guid" Name="CompetitionId" 
                PropertyName="SelectedValue" /> 
            <asp:Parameter Name="CourseId" DbType="Guid" /> 
            <asp:Parameter Name="RoundNumber" Type="Int16" /> 
            <asp:Parameter Name="RoundDate" Type="DateTime" /> 
        </InsertParameters> 
        <UpdateParameters> 
            <asp:ControlParameter ControlID="Menu$lstCompetitionList" DbType="Guid" Name="CompetitionId" 
                PropertyName="SelectedValue" /> 
            <asp:Parameter Name="CourseId" DbType="Guid" /> 
            <asp:Parameter Name="RoundNumber" Type="Int16" /> 
            <asp:Parameter Name="RoundDate" Type="DateTime" /> 
        </UpdateParameters> 
        <DeleteParameters> 
            <asp:ControlParameter ControlID="Menu$lstCompetitionList" DbType="Guid" Name="CompetitionId" 
                PropertyName="SelectedValue" /> 
            <asp:Parameter Name="RoundNumber" Type="Int16" /> 
        </DeleteParameters> 
    </asp:SqlDataSource> 

Any ideas?

1 Answer, 1 is accepted

Sort by
0
Drammy
Top achievements
Rank 1
answered on 11 Aug 2009, 06:43 PM
Fixed, please ignore...
Tags
Grid
Asked by
Drammy
Top achievements
Rank 1
Answers by
Drammy
Top achievements
Rank 1
Share this question
or