Hi. I have the following code using a RadGrid that contains three fields of GridDropDownList columns. I want to control the width of the columns in edit mode (the edit DDLs are too wide if not), so I created a number of GridDropDownListColumnEditors and declaratively set the width of each. The problem is that when I use the column editors, the grid renders correctly except for the first data row, in which the dropdownlist columns are not rendered. This error does not occur with the BoundColumn fields (also under the control of a ColumnEditor). When I put the first row into edit mode, then the dropdown list coulmns display. When I close the editing (either cancel or accept), the text continues to display and does thereafter. Only on initial loading of the grid and only on the first row do I see this problem. And if I remove the references to the DropDownListColumnEditors, then all rows display correctly all the time (but then I still have the width problem). Can you help? Thanks!
Tom Stanley
<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="sdsCRNAShifts" GridLines="None" Skin="Simple" |
AutoGenerateColumns="False" AllowAutomaticUpdates="True" AllowAutomaticInserts="True" PageSize="128" Width="100%" AllowSorting="True" > |
<MasterTableView DataSourceID="sdsCRNAShifts" CommandItemDisplay="TopAndBottom" DataKeyNames="shiftID" EditMode="InPlace" > |
<Columns> |
<telerik:GridCheckBoxColumn DataField="active" HeaderText="active" UniqueName="active" AllowFiltering="False" AllowSorting="False"> |
<HeaderStyle Width="20px" /> |
</telerik:GridCheckBoxColumn> |
<telerik:GridDropDownColumn DataField="shiftType" DataSourceID="XmlDataSource1" HeaderText="Type" |
ListValueField="ID" ListTextField="Text" UniqueName="shiftType" ColumnEditorID="GridDropDownListColumnEditor1" > |
<ItemStyle Width="60px" /> |
</telerik:GridDropDownColumn> |
<telerik:GridBoundColumn DataField="shiftName" HeaderText="Name" UniqueName="shiftName" ColumnEditorID="GridTextBoxColumnEditor1" > |
<HeaderStyle Width="120px" /> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="shiftDescr" HeaderText="Description" UniqueName="shiftDescr" ColumnEditorID="GridTextBoxColumnEditor2" > |
<HeaderStyle Width="200px" /> |
</telerik:GridBoundColumn> |
<telerik:GridDropDownColumn DataField="bOff" DataSourceID="sdsTimeText" HeaderText="BeginTime" ListTextField="timeText" |
ListValueField="numMins" UniqueName="bOff" ColumnEditorID="GridDropDownListColumnEditor2" > |
<HeaderStyle Width="100px" /> |
</telerik:GridDropDownColumn> |
<telerik:GridDropDownColumn DataField="eOff" DataSourceID="sdsTimeText" HeaderText="EndTime" ListTextField="timeText" |
ListValueField="numMins" UniqueName="eOff" ColumnEditorID="GridDropDownListColumnEditor2" > |
<HeaderStyle Width="100px" /> |
</telerik:GridDropDownColumn> |
<telerik:GridEditCommandColumn ButtonType="ImageButton"> |
<HeaderStyle Width="50px" /> |
</telerik:GridEditCommandColumn> |
</Columns> |
</MasterTableView> |
<ClientSettings> |
<Selecting AllowRowSelect="True" /> |
</ClientSettings> |
</telerik:RadGrid> |
<telerik:GridDropDownListColumnEditor ID="GridDropDownListColumnEditor1" runat="server" DropDownStyle-Width="60px" /> |
<telerik:GridDropDownListColumnEditor ID="GridDropDownListColumnEditor2" runat="server" DropDownStyle-Width="100px" /> |
<telerik:GridTextBoxColumnEditor ID="GridTextBoxColumnEditor1" runat="server" TextBoxStyle-Width="120px" /> |
<telerik:GridTextBoxColumnEditor ID="GridTextBoxColumnEditor2" runat="server" TextBoxStyle-Width="200px" /> |