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

Gridview combo box column not showing values on the initial loading of page

6 Answers 78 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Jegadeeswari
Top achievements
Rank 1
Jegadeeswari asked on 27 Dec 2012, 01:10 PM
Hi,
  I tried using the telerik's Gridview control which has the Gridview combo box column in silverlight MVVM pattern. The problem is that the values are not set in the combo box on initial load of the page, though the combo box is loaded with values.On selecting the value from the combo, the problem gets solved. The tems source for the combobox column is set with a collection which gets filled asynchronously. There are also other combo boxes outside the gridview for which the itemssource is a collection which is also filled asynchronously. But the problem does not occur for the combo boxes outside the telerik grid view.

Suggestions please....

Thanks in advance.

6 Answers, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 27 Dec 2012, 01:12 PM
Hi,
Please share some code so we can check what went wrong.

All the best,
Pavel Pavlov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Jegadeeswari
Top achievements
Rank 1
answered on 27 Dec 2012, 01:28 PM
Please find the Xaml code below

 

<

 

 

telerik:GridViewComboBoxColumn UniqueName="Report Type Code" Header="Report Type Code" Width="100" SelectedValueMemberPath="Value" DisplayMemberPath="Text" x:Name="GridViewDataColumn30" DataMemberBinding="{Binding Path=ReportTypeCode, Mode=TwoWay,ValidatesOnDataErrors=True,ValidatesOnExceptions=True,NotifyOnValidationError=True}" ItemsSource="{Binding Path=ASIReportTypeCode.resConceptCodes, Source={StaticResource DC_ServiceLevelVM}}">

 

 

 

 

</telerik:GridViewComboBoxColumn>

ASIReportTypeCode.resConceptCodes is the collection which gets filled asynchronously from WCF Service.

In the View model.cs file
I have tried to fill the ASIReportTypeCode.resConceptCodes from the InitializeAction method using a component which will post the request to the WCF service.

 

0
Pavel Pavlov
Telerik team
answered on 27 Dec 2012, 02:06 PM
Hi,

Your XAML seems OK. Have you checked the output window of Visual Studio for binding expression errors after running the project  ?

All the best,
Pavel Pavlov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Jegadeeswari
Top achievements
Rank 1
answered on 28 Dec 2012, 07:08 AM
Are you asking about the output page that comes as aresult of running the application?
If yes, then there are no errors that i could get in the output screen, except that the value is not set in the grid column.

Thanks
0
Jegadeeswari
Top achievements
Rank 1
answered on 10 Jan 2013, 05:12 AM

We found that the itemsource for the gridviewcombobox column is set after the view is loaded since the observable collection is filled asynchronously. Looks like the control is not able to refresh again once the itemsource is loaded. Is this a problem?

Any suggestions would be helpful.

Thanks
0
Pavel Pavlov
Telerik team
answered on 10 Jan 2013, 09:20 AM
Hi,

It would be nice if I could debug your  project. I will be glad to perform a small debugging session on your project or a smaller repro version.

To be able to attach your project  you may need to open a support ticket.


Regards,
Pavel Pavlov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

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