I have 3 dropdowncolumns in this radGrid.
The first one "Pnum" is working well, I can select the value and save it, and the saved value is visible in the grid when not in edit mode. If I open the record in edit mode the dropdown stays on the selected value unless I select a new value.
The other two dropdowncolumns are giving me problems. The selected value is saved to the db but is not visible when the grid is not in edit mode and if I open the record in edit mode after having saved it, the dropdown value is on the default value.
How can I have the two dropdowncolumns "minutes" and "hours" acting like the "Pnum" column? Why they are acting in a different way?
I mean after selecting the value and update the record have the value shown in the grid.
The first one "Pnum" is working well, I can select the value and save it, and the saved value is visible in the grid when not in edit mode. If I open the record in edit mode the dropdown stays on the selected value unless I select a new value.
The other two dropdowncolumns are giving me problems. The selected value is saved to the db but is not visible when the grid is not in edit mode and if I open the record in edit mode after having saved it, the dropdown value is on the default value.
How can I have the two dropdowncolumns "minutes" and "hours" acting like the "Pnum" column? Why they are acting in a different way?
I mean after selecting the value and update the record have the value shown in the grid.
<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" Culture="it-IT" DataSourceID="SqlDataSource1" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AllowPaging="True" Skin="Outlook" CellSpacing="-1" GridLines="Both"> <ExportSettings> <Pdf PageWidth=""> </Pdf> </ExportSettings> <ClientSettings> <Scrolling AllowScroll="True" UseStaticHeaders="True" /> </ClientSettings> <MasterTableView DataKeyNames="Id" DataSourceID="SqlDataSource1" CommandItemDisplay="Top"> <Columns> <telerik:GridEditCommandColumn ButtonType="ImageButton"> <HeaderStyle Width="35px" /> </telerik:GridEditCommandColumn> <telerik:GridBoundColumn DataField="Id" DataType="System.Int32" FilterControlAltText="Filter Id column" HeaderText="Id" ReadOnly="True" SortExpression="Id" UniqueName="Id"> <ColumnValidationSettings> <ModelErrorMessage Text="" /> </ColumnValidationSettings> <HeaderStyle Width="60px" /> </telerik:GridBoundColumn> <telerik:GridDateTimeColumn DataField="Date" DataType="System.DateTime" FilterControlAltText="Filter Date column" HeaderText="Date" SortExpression="Date" UniqueName="Date" DataFormatString="{0:dd/MM/yyyy}"> <ColumnValidationSettings> <ModelErrorMessage Text="" /> </ColumnValidationSettings> <HeaderStyle Width="80px" /> </telerik:GridDateTimeColumn> <telerik:GridDropDownColumn DataField="Pnum" DataSourceID="SqlDataSource2" ListTextField="Pnum" ListValueField="Pnum" FilterControlAltText="Filter column column" UniqueName="column" HeaderText="P-Number"> <ColumnValidationSettings> <ModelErrorMessage Text="" /> </ColumnValidationSettings> <HeaderStyle Width="80px" /> </telerik:GridDropDownColumn> <telerik:GridBoundColumn DataField="WorkedTime" DataType="System.TimeSpan" FilterControlAltText="Filter WorkedTime column" HeaderText="Worked Time" SortExpression="WorkedTime" UniqueName="WorkedTime"> <ColumnValidationSettings> <ModelErrorMessage Text="" /> </ColumnValidationSettings> <HeaderStyle Width="90px" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Week" FilterControlAltText="Filter Week column" HeaderText="Week" SortExpression="Week" UniqueName="Week"> <ColumnValidationSettings> <ModelErrorMessage Text="" /> </ColumnValidationSettings> <HeaderStyle Width="60px" /> </telerik:GridBoundColumn> <telerik:GridDropDownColumn DataField="minutes" DataSourceID="SqlDataSource3" ListTextField="minutes" ListValueField="minutes" FilterControlAltText="Filter minutes column" UniqueName="minutes" HeaderText="Minutes" DataType="System.Int16"> <ColumnValidationSettings> <ModelErrorMessage Text="" /> </ColumnValidationSettings> <HeaderStyle Width="80px" /> </telerik:GridDropDownColumn> <telerik:GridDropDownColumn DataField="hours" DataSourceID="SqlDataSource4" ListTextField="hours" ListValueField="hours" FilterControlAltText="Filter hours column" UniqueName="hours" HeaderText="Hours" DataType="System.Int16"> <ColumnValidationSettings> <ModelErrorMessage Text="" /> </ColumnValidationSettings> <HeaderStyle Width="80px" /> </telerik:GridDropDownColumn> <telerik:GridBoundColumn DataField="Note" FilterControlAltText="Filter Note column" HeaderText="Note" SortExpression="Note" UniqueName="Note"> <ColumnValidationSettings> <ModelErrorMessage Text="" /> </ColumnValidationSettings> </telerik:GridBoundColumn> <telerik:GridButtonColumn ButtonType="ImageButton" Text="Delete" CommandName="Delete" FilterControlAltText="Filter column1 column" ConfirmDialogType="RadWindow" ConfirmText="Do you really want to delete this project and all its content?" UniqueName="column1"> <HeaderStyle Width="30px" /> </telerik:GridButtonColumn> </Columns> <EditFormSettings> <EditColumn UniqueName="EditCommandColumn1" FilterControlAltText="Filter EditCommandColumn1 column"></EditColumn> </EditFormSettings> </MasterTableView> </telerik:RadGrid>