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

custom filtering

6 Answers 136 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Regeesh Joseph
Top achievements
Rank 1
Regeesh Joseph asked on 05 Aug 2010, 02:39 PM
Hai,

I have grid with data which binds on page load. I have 7 tabs. On clicking the tabs, data in the grid should filter based on the value of a hidden column in the grid. I dont want the filter text box and user inputing the filter text. Is there any way to do it?

Thanks & regards,
Regeesh

6 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 05 Aug 2010, 02:57 PM
Hello Regeesh,

I hope the following demo will help you to get started.
Grid Filtered by Combo

In that demo, save the clicked tab value in a session and add SessionParameter to SqlDataSource's SelectParameters so that the grid will populate according to the tab selection made.


-Shinu.
0
Regeesh Joseph
Top achievements
Rank 1
answered on 06 Aug 2010, 05:16 AM
That will reduce the performance of the page. I want the grid loads initially and switching between the data inside the grid with tabstrip. Plz help me.
0
Shinu
Top achievements
Rank 2
answered on 06 Aug 2010, 11:20 AM
Hi Rageesh,

Another option you can adapt is setting the griditem visibility based on the cell value, which does not hit db every time when you click on the TabStrip.

Here you can find some sample code:
protected void RadTabStrip1_TabClick(object sender, Telerik.Web.UI.RadTabStripEventArgs e)
{
    foreach (GridDataItem item in RadGrid1.MasterTableView.Items)
    {
        if (item["CompanyName"].Text != RadTabStrip1.SelectedTab.Value) // Check for the condition
        {
            item.Visible = false;
        }
        else
        {
            item.Visible = true;
        }
    }
}



-Shinu.
0
Regeesh Joseph
Top achievements
Rank 1
answered on 06 Aug 2010, 12:08 PM
Hai,

I want to call the event which is happening when we click on the filter menu item "contains" which custom filter value,  through code. Is there any way? Can you help.
0
Shinu
Top achievements
Rank 2
answered on 10 Aug 2010, 01:57 PM
Hi,


You can access the filter information in the ItemCommand event handler and then replace the filter expression based on RadTabStrip selection.
Here you can find some relevant links:
Operating with the FilterExpression of Telerik RadGrid manually
Custom option for filtering
Filtering By ListTextField for GridDropDownColumn


-Shinu.
0
pooja
Top achievements
Rank 1
answered on 22 May 2012, 08:31 AM
Hi Dear,

I am facing problem that i am implementing custom filtering i.e. Radcombobox in my radgrid for some columns and for others columns i am implementing deafult filtering of radgrid.Issue is this with Custom filtering i am not be able to get Filterexpression of other fields it always remain blank.I am apllying cusom paging so for this i need that filterexpression.Please help.i am stuck here.Plz reply ASAP

Thanks
Pooja
Tags
Grid
Asked by
Regeesh Joseph
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Regeesh Joseph
Top achievements
Rank 1
pooja
Top achievements
Rank 1
Share this question
or