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

Grid not holding filter condition

5 Answers 77 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Sid
Top achievements
Rank 1
Sid asked on 19 Mar 2009, 02:02 PM
I've got a tab control with a radgridview on the first tab and a detailed view on the second tab.  If I filter the grid, move to the 2nd tab and then return to the grid tab, the filter that was set is no longer in place.  I don't see anything I've got in the code that should result in a grid refresh, am I just overlooking something in my code or is this normal grid behavior?

Thanks,
-Sid.

5 Answers, 1 is accepted

Sort by
0
Stefan Dobrev
Telerik team
answered on 20 Mar 2009, 04:15 PM
Hi Sid,

I have tried to replicate your problem, but everything works fine on my end. Can you send us sample code so that we can test the exact scenario?

When do you data-bind the grid? Are you doing something special when a tab is selected?

Best wishes,
Stefan Dobrev
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Sid
Top achievements
Rank 1
answered on 25 Mar 2009, 07:34 PM
Stefan,

I'm binding the grid in the Window constructor, after the InitializeComponent().

I am using a MereMortals Business Object to populate the ItemsSource of the grid.  I've stripped down a window to just the grid my BO and the two tabs.  I still have the same problem.  I'm not sure how to send you my example, with the MereMortals Business Object and my SQL data.  Could you instead send me a sample of a tab control with the grid that works?  Maybe I can pinpoint the problem once I see it working.

Thanks,
-Sid Meyers.
0
Sid
Top achievements
Rank 1
answered on 26 Mar 2009, 04:04 AM
Just another piece of information, as I move from tab to tab the sort condition is maintained, so the grid is not being reinitialized.  The current view is back to the top of the grid, although the selected record is maintained even if the record is pages down the list.  I sure would like to get this one resolved.

Thank you for your timely consideration,
-Sid.
0
Sid
Top achievements
Rank 1
answered on 27 Mar 2009, 05:47 PM
Stefan,

I guess the window class constructor is not the spot to place the data-binding.  As I was trying to simplify the issues I found an example of loading data from MSDN which had placed the data-binding in the Window_Loaded event.  I moved my data-binding and Voila!  So you were on the right track of where the binding was occuring, I guess as a newbie I'm a little baffled by the constructor not working in this scenario.  Is there an underlying issue here?

Thanks,
-Sid.
0
Vlad
Telerik team
answered on 09 Apr 2009, 11:50 AM
Hello Sid,

We will investigate this issue definitely! In the meantime please use Loaded event instead of the constructor to bind the grid.

Kind regards,
Vlad
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
GridView
Asked by
Sid
Top achievements
Rank 1
Answers by
Stefan Dobrev
Telerik team
Sid
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or