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

[Solved] GridView do not Rebinding When i changed itemsource binding

3 Answers 85 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.
chinbnhike
Top achievements
Rank 1
chinbnhike asked on 04 Feb 2010, 06:46 AM
Hi,

I have a property :

 

Protected WithEvents m_TabDetailDomainDataSource As DomainDataSource

 

 

Public ReadOnly Property TabDetailData()
        Get
            If m_TabDetailDomainDataSource IsNot Nothing Then
                Return m_TabDetailDomainDataSource.Data
            End If
            Return Nothing
        End Get
    End Property

And XamWebGrid:

<telerikGridView:RadGridView ItemsSource="{Binding TabDetailData}" />

 

When m_TabDetailDomainDataSource.Data have any row, grid binding ok.
when i reload data and m_TabDetailDomainDataSource.Data have not any row, grid do not rebinding and row AddNewItem is disable. Why?

Thanks,

 

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 09 Feb 2010, 03:13 PM
Hi,

Can you post more info about your grid version?

Greetings,
Vlad
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
0
chinbnhike
Top achievements
Rank 1
answered on 22 Feb 2010, 04:41 AM
I'm using version:  "00404RadControls_for_Silverlight4_2009_3_1329_Trial"
0
Vlad
Telerik team
answered on 24 Feb 2010, 08:11 AM
Hello,

I've checked this and indeed the grid cannot resolve item type when the collection is empty - you will get exactly the same result with standard Silverlight DataGrid. This can be considered as a problem related to RIA services since currently there is not valid way (except reflection which is highly undesirable) to achieve this.

Possible approach will be to return Enumerable.Empty(Of YourItemType)() when m_TabDetailDomainDataSource.Data is empty.

Sincerely yours,
Vlad
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
GridView
Asked by
chinbnhike
Top achievements
Rank 1
Answers by
Vlad
Telerik team
chinbnhike
Top achievements
Rank 1
Share this question
or