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

RadGridView Update

3 Answers 117 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Hemanth
Top achievements
Rank 1
Hemanth asked on 12 Aug 2010, 06:07 PM
Hi,
I am loading my grid with the below Itemsource context

RadGridView.ItemsSource = _context.Payments;

_context.Load(_context.TaxPaymentsQuery);

Now I have a Radiobutton with the selection I need to update my Grid with filtered Data. Below is my code which I had written in Checked Event of RadioButton.

 

private

 

 

void RadioButton_ActiveChecked(object sender, RoutedEventArgs e)

 

{

RadGridView.ItemsSource = _context.Payments;

_context.Load(_context.PaymentsQuery(

 

).Where(p=> p.IsActive == 1));

 

 

 

 

 

RadGridView.Items.Refresh();
}

But my Grid is not getting refreshed. Please can someone help me clearing my Grid data during load and then filter my grid when I selected the radio button.

Thanks,
Hemanth

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 13 Aug 2010, 07:11 AM
Hi,

 Can you post more info what kind of collection is _context.Payments?

All the best,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Hemanth
Top achievements
Rank 1
answered on 13 Aug 2010, 09:27 AM
_context is the DomainContext object for the DataModel I created. _context.Payments is the query which returns the collection of my data.

PaymentDomainContext

 

 

_context = new PaymentDomainContext();

 



Thanks,
Hemant
0
Vlad
Telerik team
answered on 19 Aug 2010, 06:37 AM
Hello,

Can you try to reassign ItemsSource when the new data are loaded to see what will be the result?

Regards,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Hemanth
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Hemanth
Top achievements
Rank 1
Share this question
or