This is a migrated thread and some comments may be shown as answers.

Filter RadGrid with Checklist in Chrome

4 Answers 138 Views
Grid
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 06 Feb 2015, 02:06 PM
Hi

I am using FilterType="Combined" in a RadGrid and it works as expected in IE using both Classic and Checklist filtering.
In Chrome, the Checklist filter is only applied the first time.
Any subsequent adding or removing of filters in the Checklist is ignored.
Unchecking and clicking Apply does not change the grid.  
Is this a known problem?

Regards 

John

4 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 11 Feb 2015, 07:20 AM
Hello John,

Thank you for contacting us.

We are not aware of any issues with the CheckList filtering functionality and Chrome. Furthermore, I have tested the following simple scenario and it seems to work correctly in all browsers:
<telerik:RadGrid ID="RadGrid1" OnNeedDataSource="RadGrid1_NeedDataSource" runat="server" AllowFilteringByColumn="true" 
      OnFilterCheckListItemsRequested="RadGrid1_FilterCheckListItemsRequested" FilterType="Combined" Width="600px">
    <MasterTableView AutoGenerateColumns="false">
        <Columns>
            <telerik:GridBoundColumn DataField="ID" FilterControlWidth="90%" FilterCheckListEnableLoadOnDemand="true"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Name" FilterControlWidth="90%" FilterCheckListEnableLoadOnDemand="true"></telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>         
</telerik:RadGrid>

And the code-behind:
protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{      
    (sender as RadGrid).DataSource = GetData();
}
 
protected void RadGrid1_FilterCheckListItemsRequested(object sender, GridFilterCheckListItemsRequestedEventArgs e)
{
    DataTable table = GetData();
    var columnIndex = table.Columns.IndexOf((e.Column as IGridDataColumn).GetActiveDataField());
    List<string> values = new List<string>();
    foreach (DataRow row in table.Rows)
    {
        values.Add(row[columnIndex].ToString());
    }
 
    e.ListBox.DataSource = values;
    e.ListBox.DataBind();
 
}
 
public DataTable GetData()
{
    DataTable table = new DataTable();
    table.Columns.Add("ID", typeof(int));
    table.Columns.Add("Name", typeof(string));
    for (int i = 0; i < 5; i++)
    {
        table.Rows.Add(i, "Name" + i);
    }
 
    return table;  
}


Can you please inspect your browser's console after filtering once and see if there are any JavaScript that could break the functionality of the controls.

If you continue to experience those issues on your end, please open a regular support ticket with sample, runnable project attached, so we can inspect the code locally.


Best Regards,
Konstantin Dikov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
John
Top achievements
Rank 1
answered on 12 Feb 2015, 11:52 AM
Hi Konstantin

Your sample works as expected, so it is likely something in the application is causing this problem.
I also noticed that the NeedDataSource event is not fired on the subsequent applies.
(I.e. the ones that not affects the data in the grid.)   
I guess that is why the filtering isn't done.
Do you have any clue to what  can block the event being fired? 

Regards
 
John






0
Accepted
Konstantin Dikov
Telerik team
answered on 17 Feb 2015, 06:54 AM
Hello John,

As I have mentioned in my previous post, the only thing that I can think of without a sample, runnable project that replicates the issue is that you inspect your browser's console and see if there are any JavaScript errors on the page.

Additionally, if you have enabled RadCompression in the web.config file, you could try to temporary disable it and see if this makes any difference.

Once again, if you continue to experience those issues on your end, please open a regular support ticket with sample, runnable project attached, so we can inspect the code locally.


Regards,
Konstantin Dikov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
ali
Top achievements
Rank 1
answered on 21 Feb 2017, 05:01 PM

hello Konstantin Dikov,

How can i take the selected values of my filter checklist in code behind.

it seems that on itemcommand i can only have values that are entered in the text fields.

Thanks.

 

Tags
Grid
Asked by
John
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
John
Top achievements
Rank 1
ali
Top achievements
Rank 1
Share this question
or