Hello, I have a database with a numeric field (State) that has the following values: 0, 1, 2, 3 and 4. In the Template Filter I have associated a combobox with the text associated with each value.
I want to see the text both in the field and in the filter, but I do not get it. You can help me see what I have wrong. Thank you
<
telerik:GridTemplateColumn
DataField
=
"Estado"
HeaderText
=
"Estado"
UniqueName
=
"Estado"
DataType
=
"System.String"
SortExpression="Estado" GroupByExpression="Estado Group by Estado" ReadOnly "true"><
br
>
<
ItemTemplate
><
br
>
<
asp:Label
runat
=
"server"
<br>
ID="Estado" <
br
> Text= '<%# DataBinder.Eval(Container.DataItem, "Estado") %>'><
br
> </
asp:Label
> <
br
>
</
ItemTemplate
><
br
>
<
FilterTemplate
><
br
>
<
telerik:RadComboBox
RenderMode
=
"Lightweight"
ID
=
"RcEstado"
Width
=
"90px"
<br> SelectedValue='<%# CType(Container, GridItem).OwnerTableView.GetColumn("Estado").CurrentFilterValue %>'
runat="server" OnClientSelectedIndexChanged="Estado_SelectedIndexChanged"><
br
> <
Items
><
br
>
<
telerik:RadComboBoxItem
Text
=
"Todo"
Value
=
""
Selected
=
"True"
/> <
br
> <
telerik:RadComboBoxItem
Text
=
"Sin incidencia"
Value
=
"0"
/><
br
> <
telerik:RadComboBoxItem
Text
=
"El código de farmacia no existe en la base datos."Value="1"/><br>
<
telerik:RadComboBoxItem
Text
=
"La clave de acceso no coincide"
Value
=
"2"
/>
<
telerik:RadComboBoxItem
Text
=
"No se ha encontrado ninguna clave de acceso que no esté caducada."
Value
=
"3"
<
telerik:RadComboBoxItem
Text
=
"La clave está caducada."
Value
=
"4"
/><
br
> </
Items
>
</
telerik:RadComboBox
><
br
>
<
telerik:RadScriptBlock
ID
=
"RadScriptBlock1"
runat
=
"server"
><
br
>
<
script
type
=
"text/javascript"
>
function Estado_SelectedIndexChanged(sender, args) {<
br
>
var tableView = $find("<%# TryCast(Container, GridItem).OwnerTableView.ClientID %>");
tableView.filter("Estado", args.get_item().get_value(), "EqualTo");<
br
>
</
script
><
br
>
</
telerik:RadScriptBlock
><
br
>
</
FilterTemplate
><
br
>
<
EditItemTemplate
><
br
>
<
telerik:RadDropDownList
ID
=
"DropDownList4"
runat
=
"server"
AutoPostBack
=
"true"
DataValueField
=
"Activa"
SelectedValue='<%#Bind("PingSrv") %>' OnSelectedIndexChanged="DropDownList4_selectedindexchanged"><
br
> <
Items
><
br
>
<
telerik:DropDownListItem
Text
=
"El código de farmacia no existe en la base de datos."
Value
=
"1"
<
telerik:DropDownListItem
Text
=
"La clave de acceso no coincide"
Value
=
"2"
/><
br
> <
telerik:DropDownListItem
Text
=
"No se ha encontrado ninguna clave de acceso que no esté caducada."
Value
=
"3"
<
telerik:DropDownListItem
Text
=
"La clave está caducada."
Value
=
"4"
/><
br
>
</
Items
><
br
>
</
telerik:RadDropDownList
><
br
>
</
EditItemTemplate
><
br
> </
telerik:GridTemplateColumn
>