Select to view content in your preferred language

Clear Results From DataGrid Using a Button

940
3
Jump to solution
10-03-2012 02:09 PM
danielchaboya
Regular Contributor
I have this sample Find Tool up and running: http://resources.arcgis.com/en/help/silverlight-api/samples/start.htm#Find.  Can anyone help on coding a Button that can clear the results from the DataGrid. Any help is much appreciated.
0 Kudos
1 Solution

Accepted Solutions
danielchaboya
Regular Contributor
Found an easy solution:

private void btnClear_Click(object sender, RoutedEventArgs e)         {             this.FindDetailsDataGrid.ItemsSource = null;         }

View solution in original post

0 Kudos
3 Replies
FilipJung
Frequent Contributor
0 Kudos
danielchaboya
Regular Contributor
Hi,
try removing the Binding from DataGrid using http://stackoverflow.com/questions/1639219/clear-binding-in-silverlight-remove-data-binding-from-set...


Interesting approach.  I'll give that a try.
0 Kudos
danielchaboya
Regular Contributor
Found an easy solution:

private void btnClear_Click(object sender, RoutedEventArgs e)         {             this.FindDetailsDataGrid.ItemsSource = null;         }
0 Kudos