Telerik radgrid no data shows after filtering with comma separated values

266 views Asked by At

After filtering with comma separated values, radgrid is shown as empty, but there is values in datasource.If tried with single value in the filter, it works fine

<telerik:RadGrid ID="gvTask" runat="server" AutoGenerateColumns="False" CellSpacing="0" ShowStatusBar="false" Width="936px" Height="364px" Visible="true" AllowFilteringByColumn="true" AllowSorting="true" OnItemDataBound="gvTask_ItemDataBound" OnInit="gvTask_Init"
OnItemCommand="gvTask_ItemCommand" GridLines="None" OnSortCommand="gvTask_SortCommand" AllowPaging="true" AllowCustomPaging="true" OnPageIndexChanged="gvTask_PageIndexChanged" OnNeedDataSource="gvTask_NeedDataSource" EnableLinqExpressions="false" PageSize="50"
AllowMultiRowSelection="true" OnItemCreated="gvTask_ItemCreated" Skin="Office2010Silver" AllowNaturalSort="false">
  <ClientSettings>
    <Scrolling AllowScroll="true" UseStaticHeaders="true" />
    <ClientEvents OnFilterMenuShowing="OnFilterShowing" OnRowCreated="RadGrid1_RowCreated" OnRowSelected="RadGrid1_RowSelected" OnRowDeselected="RadGrid1_RowDeselected" OnGridCreated="GridCreated" OnRowSelecting="RowSelecting" OnRowDeselecting="RowSelecting"
    />
    <Selecting AllowRowSelect="true" />
  </ClientSettings>
  <GroupingSettings CaseSensitive="false" />
  <MasterTableView GridLines="Both" Width="100%" HierarchyLoadMode="Client" AllowFilteringByColumn="true" DataKeyNames="TaskID,DocTypeId" AllowSorting="true" ClientDataKeyNames="TaskID">
    <ItemStyle Wrap="True" />
    <FilterItemStyle HorizontalAlign="Left" />
    <HeaderStyle HorizontalAlign="Center" Font-Bold="true" Wrap="true" />
    <SortExpressions>
      <telerik:GridSortExpression FieldName="InternalId" SortOrder="Ascending" />
    </SortExpressions>
    <Columns>
      <telerik:GridBoundColumn DataField="AssociateID" HeaderText="Emp ID" UniqueName="AssociateID" ShowFilterIcon="true" FilterControlWidth="34px" SortExpression="AssociateID" AutoPostBackOnFilter="false" DataType="System.String">
        <ItemStyle Width="65px" />
        <HeaderStyle Width="65px" />
      </telerik:GridBoundColumn>
    </Columns>
  </MasterTableView>
  <SortingSettings EnableSkinSortStyles="false"></SortingSettings>
  <FilterMenu EnableImageSprites="False"></FilterMenu>
  <PagerStyle AlwaysVisible="true" Position="Bottom" />
</telerik:RadGrid>

    protected void gvTask_ItemCommand(object sender, GridCommandEventArgs e)
        {
            try
            {
                if (e.CommandName == RadGrid.FilterCommandName)
                {
PagedListResult<List<TaskSearchBO>> taskList = ListTickets(pageIndex, pageCount, sortExpression, sortDirection, filtrCriteria);
                gvTask.DataSource = taskList.Result;
                gvTask.PageSize = pageCount;
                gvTask.VirtualItemCount = taskList.TotalRowCount;
}
}
}

Do I need to add databind or rebind

0

There are 0 answers