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

Problem in loading the GridViewComboboxColumn.

1 Answer 26 Views
GridView
This is a migrated thread and some comments may be shown as answers.
SivaPrasad Bevara
Top achievements
Rank 1
SivaPrasad Bevara asked on 10 Mar 2011, 03:07 PM
Hi,

I am using 2 RadDomainDataSources, one for loading the RadGridView and another for loading the GridViewComboBoxColumn.

Following is the code.

<telerik:RadDomainDataSource Name="employeesDomainDataSource"
                  QueryName="GetEmployeeDeptDTO"
                  AutoLoad="True"
                  PageSize="10"
                  Height="0" Width="0"
                  SubmittedChanges="employeesDomainDataSource_SubmittedChanges"
                  >
      <telerik:RadDomainDataSource.DomainContext>
        <local:Emp_Sel_Ins_Upd_Del_DomainContext></local:Emp_Sel_Ins_Upd_Del_DomainContext>
      </telerik:RadDomainDataSource.DomainContext>
  </telerik:RadDomainDataSource>

<telerik:RadDomainDataSource Name="DeptDomainDataSource"
                  QueryName="GetTblDepts"
                  AutoLoad="True"
                  Height="0" Width="0"
                  >
      <telerik:RadDomainDataSource.DomainContext>
        <local:Emp_Sel_Ins_Upd_Del_DomainContext></local:Emp_Sel_Ins_Upd_Del_DomainContext>
      </telerik:RadDomainDataSource.DomainContext>
</telerik:RadDomainDataSource>

Grid View part:

<telerik:RadGridView Name="customerGridView" Grid.Row="1" Grid.Column="1" Width="800"
                            ItemsSource="{Binding DataView, ElementName=employeesDomainDataSource}"
                            IsBusy="{Binding IsBusy, ElementName=employeesDomainDataSource}"
                            IsFilteringAllowed="False"
                            AutoGenerateColumns="False"
                            EnableColumnVirtualization="True" EnableRowVirtualization="True"
                            AutoExpandGroups="True" CellEditEnded="customerGridView_CellEditEnded" RowLoaded="customerGridView_RowLoaded">
            <telerik:RadGridView.Columns>
                <PMControls:PMGridViewDataColumn DataMemberBinding="{Binding Id}" Width="100"></PMControls:PMGridViewDataColumn>
                <PMControls:PMGridViewDataColumn DataMemberBinding="{Binding Name}" Width="150"></PMControls:PMGridViewDataColumn>
                <PMControls:PMGridViewDataColumn DataMemberBinding="{Binding Designation}" Width="100"></PMControls:PMGridViewDataColumn>
                <PMControls:PMGridViewDataColumn DataMemberBinding="{Binding Salary}" Width="100"></PMControls:PMGridViewDataColumn>
                <PMControls:PMGridViewDataColumn DataMemberBinding="{Binding DateOfJoin}" Width="170" DataFormatString="{}{0:d}"></PMControls:PMGridViewDataColumn>
           
                <telerik:GridViewComboBoxColumn x:Name="DeptCombo" Header="Department" Width="150"  
                        DataMemberBinding="{Binding DeptId}"
                        SelectedValueMemberPath="DeptId"
                        DisplayMemberPath="DeptName"
                        IsSortable="False"
                        ItemsSource="{Binding DataView, ElementName=DeptDomainDataSource}">
                </telerik:GridViewComboBoxColumn>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>

In this the problem is, the Combo Box is not loading when the grid is initially loaded. The Combo Box is loading only when we click on the particular column which has the combo boxes.

Please help.

Regards,
SivaPrasad.B

1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 10 Mar 2011, 03:45 PM
Hello SivaPrasad Bevara,

May you take a look at this article for a reference on the same topic ? Furthermore, you may test the sample project attached in this forum thread for the implementation of the GridViewComboBoxColumn in a similar scenario like yours. 

Kind regards,
Maya
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
GridView
Asked by
SivaPrasad Bevara
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or