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

Custome filter

4 Answers 86 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Eva
Top achievements
Rank 1
Eva asked on 30 Aug 2011, 11:24 PM

In radgrid i am having a custom filter using a button. Here is my code.

protected void imSearch1_Click(object sender, EventArgs e)

{

RadTextBox txtFirstName = (RadTextBox)RadPanelBar1.FindItemByValue("QuickSearch").FindControl("txtFirstName");

RadTextBox txtLastName = (RadTextBox)RadPanelBar1.FindItemByValue("QuickSearch").FindControl("txtLastName");

DataSet ds = DhsBasePage.getProxyDataService().GetProviderListByName(txtFirstName.Text, txtLastName.Text);

RadGrid1.DataSource = ds;

RadGrid1.Rebind();

}

This works good, but this filter not applied to the next page. In other words when i click the next page, the grid lost the filter.
Need help ASAP.
Thanks in advance.
Eva

4 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 31 Aug 2011, 06:27 AM
Hello Eva,

I suppose you are using Simple Data Binding.Inorder to implement Advanced features like Sorting,Filtering, make sure that you are binding the RadGrid with Advanced databinding using NeedDataSource event.
Advanced Data-binding (using NeedDataSource event).

Thanks,
Shinu.
0
Eva
Top achievements
Rank 1
answered on 01 Sep 2011, 07:08 PM

Hi Sinu,

I'm using need data source to bind the grind before post back.

Since i'm using the custom filter too populate the filter data.

AS i told earlier, t
his works good, but this filter not applied to the next page. In other words when i click the next page link , the grid lost the filter.
Need help ASAP.
Thanks in advance.
Eva

0
Eva
Top achievements
Rank 1
answered on 01 Sep 2011, 09:14 PM
Need help ASAP.
0
Dany
Top achievements
Rank 1
answered on 02 Sep 2011, 04:06 PM
I have the same issue, each time i do an action (filter, sorting, etc..) as soon as i change the page index i lost my selection.

In my case i am not using in custom filter or anything else.... someone have an idea ?
Tags
Grid
Asked by
Eva
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Eva
Top achievements
Rank 1
Dany
Top achievements
Rank 1
Share this question
or