I want to have a column in my rad grid that contains dropdown list.
I added (based on your examples):
<telerik:RadGrid ID="gvWebUsers" runat="server" OnNeedDataSource="gvWebUsers_NeedDataSource" OnItemCreated="gvWebUsers_ItemCreated"
Skin="Gray" AutoGenerateColumns="false"
OnItemDataBound="gvWebUsers_ItemDataBound" AllowAutomaticUpdates="true"
AllowPaging="true" CssClass="SettingsGrid"
Width="99.7%">
<ClientSettings Resizing-AllowColumnResize="true" Resizing-ClipCellContentOnResize="true" />
<MasterTableView DataKeyNames="UserID" PageSize="15" EditMode="InPlace" >
<PagerStyle Mode="NextPrevAndNumeric" />
<Columns>
<telerik:GridBoundColumn DataField="EmailAddress" HeaderText="<%$ Resources:English,Settings_MobilityUsers_Email %>"
UniqueName="EmailAddress" />
<telerik:GridBoundColumn DataField="FirstName" HeaderText="<%$ Resources:English,Settings_MobilityUsers_FirstName %>"
UniqueName="FirstName" />
<telerik:GridBoundColumn DataField="LastName" HeaderText="<%$ Resources:English,Settings_MobilityUsers_LastName %>"
UniqueName="LastName" />
<telerik:GridBoundColumn DataField="IsDomainUser" HeaderText="<%$ Resources:English,Settings_MobilityUsers_IsDomainUser %>"
UniqueName="IsDomainUser" />
<telerik:GridBoundColumn DataField="IsVerified" HeaderText="<%$ Resources:English,Settings_MobilityUsers_IsVerified %>"
UniqueName="IsVerified" />
<telerik:GridButtonColumn HeaderStyle-Width="80px" ItemStyle-Width="80px" ButtonType="LinkButton" UniqueName="BlockButton" />
<telerik:GridButtonColumn HeaderStyle-Width="80px" ItemStyle-Width="80px" ButtonType="LinkButton" UniqueName="ChangePassButton" />
<telerik:GridButtonColumn HeaderStyle-Width="80px" ItemStyle-Width="80px" ButtonType="LinkButton" UniqueName="AllowUploadButton" />
<telerik:GridButtonColumn HeaderStyle-Width="80px" ItemStyle-Width="80px" ButtonType="LinkButton" UniqueName="UnlockButton" />
<telerik:GridTemplateColumn HeaderText="Category" ItemStyle-Width="240px">
<ItemTemplate>
<%#DataBinder.Eval(Container.DataItem, "IsUploadAllowed")%>
</ItemTemplate>
<EditItemTemplate>
<telerik:RadComboBox runat="server" ID="RadComboBox2" DataTextField="IsUploadAllowed"
DataValueField="IsUploadAllowed" SelectedValue='<%#Bind("IsUploadAllowed") %>'>
</telerik:RadComboBox>
</EditItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridEditCommandColumn FooterText="EditCommand footer" UniqueName="EditCommandColumn"
HeaderText="Edit" HeaderStyle-Width="100px" UpdateText="Update">
</telerik:GridEditCommandColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
But when I press on "Update" I get an error.
In addition, how can I bind data to the rad combobox from server side? (like itemdatabound)? Is there any way to call server side function on update command?
I added (based on your examples):
<telerik:RadGrid ID="gvWebUsers" runat="server" OnNeedDataSource="gvWebUsers_NeedDataSource" OnItemCreated="gvWebUsers_ItemCreated"
Skin="Gray" AutoGenerateColumns="false"
OnItemDataBound="gvWebUsers_ItemDataBound" AllowAutomaticUpdates="true"
AllowPaging="true" CssClass="SettingsGrid"
Width="99.7%">
<ClientSettings Resizing-AllowColumnResize="true" Resizing-ClipCellContentOnResize="true" />
<MasterTableView DataKeyNames="UserID" PageSize="15" EditMode="InPlace" >
<PagerStyle Mode="NextPrevAndNumeric" />
<Columns>
<telerik:GridBoundColumn DataField="EmailAddress" HeaderText="<%$ Resources:English,Settings_MobilityUsers_Email %>"
UniqueName="EmailAddress" />
<telerik:GridBoundColumn DataField="FirstName" HeaderText="<%$ Resources:English,Settings_MobilityUsers_FirstName %>"
UniqueName="FirstName" />
<telerik:GridBoundColumn DataField="LastName" HeaderText="<%$ Resources:English,Settings_MobilityUsers_LastName %>"
UniqueName="LastName" />
<telerik:GridBoundColumn DataField="IsDomainUser" HeaderText="<%$ Resources:English,Settings_MobilityUsers_IsDomainUser %>"
UniqueName="IsDomainUser" />
<telerik:GridBoundColumn DataField="IsVerified" HeaderText="<%$ Resources:English,Settings_MobilityUsers_IsVerified %>"
UniqueName="IsVerified" />
<telerik:GridButtonColumn HeaderStyle-Width="80px" ItemStyle-Width="80px" ButtonType="LinkButton" UniqueName="BlockButton" />
<telerik:GridButtonColumn HeaderStyle-Width="80px" ItemStyle-Width="80px" ButtonType="LinkButton" UniqueName="ChangePassButton" />
<telerik:GridButtonColumn HeaderStyle-Width="80px" ItemStyle-Width="80px" ButtonType="LinkButton" UniqueName="AllowUploadButton" />
<telerik:GridButtonColumn HeaderStyle-Width="80px" ItemStyle-Width="80px" ButtonType="LinkButton" UniqueName="UnlockButton" />
<telerik:GridTemplateColumn HeaderText="Category" ItemStyle-Width="240px">
<ItemTemplate>
<%#DataBinder.Eval(Container.DataItem, "IsUploadAllowed")%>
</ItemTemplate>
<EditItemTemplate>
<telerik:RadComboBox runat="server" ID="RadComboBox2" DataTextField="IsUploadAllowed"
DataValueField="IsUploadAllowed" SelectedValue='<%#Bind("IsUploadAllowed") %>'>
</telerik:RadComboBox>
</EditItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridEditCommandColumn FooterText="EditCommand footer" UniqueName="EditCommandColumn"
HeaderText="Edit" HeaderStyle-Width="100px" UpdateText="Update">
</telerik:GridEditCommandColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
But when I press on "Update" I get an error.
In addition, how can I bind data to the rad combobox from server side? (like itemdatabound)? Is there any way to call server side function on update command?