protected
void grdSensitivty_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridDataItem)
{
///inject Confirmation Delete client message programatically ti show item name
var item = e.Item as GridDataItem;
(item.FindControl(
"lblEffective") as Label).Text = ((Sensitivity)e.Item.DataItem).Effective == true ? "Positive" : "Negative";
}
}
<
telerik:RadGrid ID="grdSensitivty" runat="server"
AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True"
onneeddatasource="grdSensitivty_NeedDataSource"
ShowFooter="True" ShowGroupPanel="True"
AllowAutomaticDeletes="True" AllowAutomaticInserts="True"
AllowAutomaticUpdates="True"
AutoGenerateColumns="False"
OnDeleteCommand="grdSensitivty_DeleteCommand"
OnInsertCommand="grdSensitivty_InsertCommand"
OnUpdateCommand="grdSensitivty_UpdateCommand"
OnItemCommand="grdSensitivty_ItemCommand"
OnPdfExporting="grdSensitivty_PdfExporting"
OnItemCreated="grdSensitivty_ItemCreated"
OnItemDataBound="grdSensitivty_ItemDataBound"
OnGridExporting="grdSensitivty_GridExporting" Width="100%"
>
<ClientSettings AllowColumnsReorder="True" AllowDragToGroup="true" Resizing-AllowRowResize="false" Resizing-AllowColumnResize="true" AllowRowsDragDrop="false" >
<Selecting AllowRowSelect="True" />
<Scrolling AllowScroll="false" UseStaticHeaders="True" />
</ClientSettings>
<
MasterTableView DataKeyNames="Id" CommandItemDisplay="TopAndBottom" RetrieveAllDataFields="false" AllowPaging="true" AllowSorting="true" PageSize="10" AutoGenerateColumns="false" AllowAutomaticInserts="false" AllowAutomaticUpdates="false" >
<CommandItemSettings
ShowExportToWordButton="true"
ShowExportToExcelButton="true"
ShowExportToPdfButton="false"
/>
<
Columns>
<
telerik:GridTemplateColumn HeaderText="Effictive" UniqueName="effectiveUniqueName" >
<ItemTemplate>
<asp:Label ID="lblEffective" runat="server" ></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList runat="server" ID="ddlEffective">
</asp:DropDownList>
</EditItemTemplate>
<FilterTemplate>
<asp:DropDownList runat="server" ID="ddlEffectiveFilter" AutoPostBack="true" >
<asp:ListItem Text="Negative" Value="false"></asp:ListItem>
<asp:ListItem Text="Positive" Value="true"></asp:ListItem>
</asp:DropDownList>
</FilterTemplate>
</
telerik:GridTemplateColumn>
</
Columns>
<EditFormSettings >
<EditColumn ButtonType="ImageButton" InsertText="Add UOM" UpdateText="Update UOM"
UniqueName="EditCommandColumn1" CancelText="Cancel edit" >
</EditColumn>
</EditFormSettings>
<
RowIndicatorColumn>
<
HeaderStyle Width="20px" ></HeaderStyle>
</
RowIndicatorColumn>
<
ExpandCollapseColumn>
<
HeaderStyle Width="20px"></HeaderStyle>
</
ExpandCollapseColumn>
</
MasterTableView>
<
HeaderContextMenu EnableAutoScroll="True"></HeaderContextMenu>
</telerik:RadGrid>
can anyone tell how to make drop down list filter the text value in this column
i tried use filterExpresion but i 've failed
thanks