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

Refresh WPF GridView on WinForms

1 Answer 107 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 29 Apr 2012, 03:17 PM

Hello.

I'm try host GridView WPF in WinForms App...

private void GridLoad()
{
         Telerik.Windows.Controls.RadGridView wpfGrid =
  
        new Telerik.Windows.Controls.RadGridView();
         wpfGrid.Name = "myGrid";
        wpfGrid.Height = 641;
        wpfGrid.ItemsSource = phpmyadminDataSet;
    
          wpfGrid.AutoGenerateColumns = true;
        ElementHost elementHost = new ElementHost();
        elementHost.Dock = DockStyle.None;
        elementHost.Width = 640;
        elementHost.Height = 120;
        elementHost.Child = wpfGrid;
        panel1.Controls.Add(elementHost);
      }
But I can't understand how refresh Grid.

When app starting Grid is clear. When I'm apply filter or sorting, data loading.

I'm try wpfGrid.Rebind(). No effect...

1 Answer, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 30 Apr 2012, 08:49 AM
Hello Alex ,

Can you give some more details on  :
1. How do you bind/set the ItemsSource
2. What is the type of the items source
3. And what is the desired behavior as it does not become quite clear.


* Just a hint I am not sure if that exactly is the problem  but together with the Rebind method you may wish to clear the Filter and sort descriptors.

Kind regards,
Pavel Pavlov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
Alex
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Share this question
or