I have a GridTemplateColumn bind to “State” data field and the values are fixed or Enum type:
<telerik:GridTemplateColumn DataField="State" DataType="System.Byte" DefaultInsertValue="1"
UniqueName="StateColumn" GroupByExpression="State Group By State">
<EditItemTemplate>
<telerik:RadComboBox ID="StateRadComboBox" runat="server"
SelectedValue='<%#Bind("State")%>'>
<Items>
<telerik:RadComboBoxItem runat="server" Text="Active" Value="1" />
<telerik:RadComboBoxItem runat="server" Text="Inactive" Value="2" />
<telerik:RadComboBoxItem runat="server" Text="Erased" Value="3" />
<telerik:RadComboBoxItem runat="server" Text="Pendent" Value="4" />
</Items>
</telerik:RadComboBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="StateLabel" runat="server"
Text='<%# … a logic to get text based on numeric value '></asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn>
When forms a group show the numerical value (State: 1, State: 2, State: 3 or State: 4). How can I show your description instead of the numerical value (State: Active, State: Inactive, State: Erased or State: Pendent)?
I have the
same problem when use GridDropDownColumn
and ObjectDataSource:
<telerik:GridDropDownColumn DataField="State" DataSourceID="StateObjectDataSource"
ListTextField="TextValue" ListValueField="ByteValue" UniqueName="StateColumn"
DataType="System.Byte">
</telerik:GridDropDownColumn>
Any help?