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

[Solved] Radview refresh when the itemsource is Telerik DataTable

3 Answers 151 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.
William
Top achievements
Rank 1
William asked on 18 Nov 2010, 05:21 PM
I am using a Radview in a silverlight app to display data that I have in the Telerik.data.DataTable. My problem is, the data does not come in all at once. I might get one or two here and there. But I want it to append the data to the radview as it arrives. Instead the original item remains and the radview does not refresh.

Here is the code:
private DataTable _data { get; set; }
       
      public DataGridControl()
      {
          InitializeComponent();
          _data = new DataTable();
      }
 
      public void loadData(ObservableCollection<DataTable> dt)
      {
          DGridview.ItemsSource = null;
          if (_data.Rows.Count() > 0)
          {
              
              foreach (DataRow dr in dt[0].Rows)
              {
                  _data.Rows.Add(dr);
              }
             
          }
          else
          {
              _data = dt[0];
          }
          DGridview.ItemsSource = _data.ToList();
          TxtRowCount.Text = DGridview.Items.Count.ToString();
          DGridview.Rebind();
      }
 
 
      private void BtnClear_Click(object sender, RoutedEventArgs e)
      {
 
          DGridview.ItemsSource = null;
          TxtRowCount.Text = DGridview.Items.Count.ToString();
          _data = new DataTable();
      }

The clear button works fine, I have tried to do similar things in the load function, but nothing seems to work..

Thanks for the help!

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 19 Nov 2010, 08:15 AM
Hello,

 Can you verify if you have our latest version?

Greetings,
Vlad
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
William
Top achievements
Rank 1
answered on 19 Nov 2010, 06:29 PM
That did it. Thanks! Is there an official page to track updates for this class?
0
Vlad
Telerik team
answered on 22 Nov 2010, 08:07 AM
Hello,

 Currently no - only my blog post. 

Kind regards,
Vlad
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
Tags
GridView
Asked by
William
Top achievements
Rank 1
Answers by
Vlad
Telerik team
William
Top achievements
Rank 1
Share this question
or