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

Explicit Columns not generated with Asynchronous Binding

3 Answers 153 Views
GridView
This is a migrated thread and some comments may be shown as answers.
GG
Top achievements
Rank 1
GG asked on 29 Mar 2009, 03:54 PM
Hello,

It seems to have a bug with async binding and GridView.

Indeed when i create a grid view with synchronous binding like that :

<telerik:RadGridView Margin="5,5,5,5" IsReadOnly="True" AutoGenerateColumns="False" ColumnsWidthMode="Fill" ShowColumnHeaders="True" ShowGroupPanel="True" ItemsSource="{Binding Path=AssetAnalysers}"
                        <telerik:RadGridView.Columns> 
                            <telerik:GridViewDataColumn x:Name="AlertTypeColumn"  HeaderText="Type" UniqueName="Analyser.Name" Width="100"/> 
                            <telerik:GridViewDataColumn x:Name="AlertNameColumn"  HeaderText="Name" UniqueName="AnalysedObjectId"/> 
                            <telerik:GridViewDataColumn x:Name="AlertLevelColumn" HeaderText="Level" UniqueName="Level" Width="100"/> 
                            <telerik:GridViewDataColumn x:Name="AlertMessageColumn" HeaderText="Message" UniqueName="Message"/> 
                        </telerik:RadGridView.Columns> 
                    </telerik:RadGridView> 

Everything works well.

But when i try to make Asynchronous Binding (because the property AssetAnalysers take time to load) like that :

                    <telerik:RadGridView Margin="5,5,5,5" IsReadOnly="True" AutoGenerateColumns="False" ColumnsWidthMode="Fill" ShowColumnHeaders="True" ShowGroupPanel="True" ItemsSource="{Binding Path=AssetAnalysers, IsAsync=true}"
                        <telerik:RadGridView.Columns> 
                            <telerik:GridViewDataColumn x:Name="AlertTypeColumn"  HeaderText="Type" UniqueName="Analyser.Name" Width="100"/> 
                            <telerik:GridViewDataColumn x:Name="AlertNameColumn"  HeaderText="Name" UniqueName="AnalysedObjectId"/> 
                            <telerik:GridViewDataColumn x:Name="AlertLevelColumn" HeaderText="Level" UniqueName="Level" Width="100"/> 
                            <telerik:GridViewDataColumn x:Name="AlertMessageColumn" HeaderText="Message" UniqueName="Message"/> 
                        </telerik:RadGridView.Columns> 
                    </telerik:RadGridView> 

At the first loading the four columns are well generated but when my property AssetAnalysers change (it's a INotifyChangedProperty), the binding seems correct but my columns are not generated. So, the GridView looks like empty (but i have rows).

Where is the problem ?

By the way what's the difference and the correct using of UniqueName, DataMemberBinding and DataMemberPath Properties when you have already a binding on ItemSource.

Thank you in advance for your answer.

G. Moelens





3 Answers, 1 is accepted

Sort by
0
JDB
Top achievements
Rank 1
answered on 30 Mar 2009, 06:10 AM
As far as I know, you shouldn't use the IsAsync in the Binding, but set the DataLoadMode to Asynchronous on the RadGridView itself.
0
Vlad
Telerik team
answered on 30 Mar 2009, 10:07 AM
Hello guys,

I just tried to reproduce this issue however everything worked fine on my end - I've attached small demo.

As to the properties we added DataMemberBinding with Q1 and this is the right way to set desired binding for desired grid column - if you prefer you can use UniqueName which is backward compatible with our previous version. DataMemberPath currently is marked as obsolete and we will remove this property for Q2.

Regards,
Vlad
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Ido
Top achievements
Rank 1
answered on 13 Dec 2013, 04:01 PM
Is this still like that? With 2013.2.724.40 version.
Tags
GridView
Asked by
GG
Top achievements
Rank 1
Answers by
JDB
Top achievements
Rank 1
Vlad
Telerik team
Ido
Top achievements
Rank 1
Share this question
or