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

One Problem of the columns of GridView be changed.

0 Answers 48 Views
GridView
This is a migrated thread and some comments may be shown as answers.
jeremy
Top achievements
Rank 1
jeremy asked on 08 Oct 2011, 05:22 AM
Hi, 
    In my page, it consists of a ListBox and a GridView, when Selection of ListBox is Changed,  the Columns of GridView also be changed. Different listboxitem have different columns of GridView. I use this way to set the value to binding the different data Source to display: 
            target.DataMemberBinding = source.DataMemberBinding;
            target.Header = source.Header;
            target.DataFormatString = source.DataFormatString;
            target.TextAlignment = source.TextAlignment;
            if (target.DataMemberBinding != null && source.DataMemberBinding != null)
                target.DataMemberBinding.Converter = source.DataMemberBinding.Converter;
            target.IsReadOnly = source.IsReadOnly;
            target.ItemsSource = differentSource;

now, it has a problem, when changing the selection of ListBox, it is so slow to load the new columns. In other words, the page responses slowly.   there are two attachfile. please check it.



No answers yet. Maybe you can help?

Tags
GridView
Asked by
jeremy
Top achievements
Rank 1
Share this question
or