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

RdaGridView Visibility

3 Answers 120 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Avinash
Top achievements
Rank 1
Avinash asked on 12 Sep 2015, 11:42 AM
Hi,,,When Am Going To Add New Item  To RadGridView First I Adden First Column And Then Move To Second Second Column.When I Moved second Column The First Column Data Is Not Visible What I Entered Like That Second,Third Column Also.Can U give Any Suggestion. I Attached  3 screen shot also just see Where Is Reference Name, Refernece Description and give the suggestion please..as soon as possible

3 Answers, 1 is accepted

Sort by
0
Ivan Ivanov
Telerik team
answered on 12 Sep 2015, 02:56 PM
Hello,

I guess that columns are not correctly bound to the underlying data members. Can you please check whether you have errors in the Visual Studio Output  when starting the application? Is the property setter invoked after editing is complete?

Regards,
Ivan Ivanov
Telerik
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 Feedback Portal and vote to affect the priority of the items
0
Avinash
Top achievements
Rank 1
answered on 14 Sep 2015, 05:42 AM

I posted My Xaml Code Please check Out Once ..tell where am wrong

 

 <telerik:RadGridView  Name="LookUpMasterGrid"
                                            Grid.Row="0" Style="{DynamicResource GridStyle}" IsReadOnly="False" AutoGenerateColumns="False" 
                                            NewRowPosition="Top"
                                            Loaded="LookUpMasterGrid_Loaded"
                                            AddingNewDataItem="LookUpMasterGrid_AddingNewDataItem"
                                            PreparingCellForEdit="LookUpMasterGrid_PreparingCellForEdit"
                                            PreparedCellForEdit="LookUpMasterGrid_PreparedCellForEdit"
                                           
                                            CellEditEnded="LookUpMasterGrid_CellEditEnded"
                                            CellValidating="LookUpMasterGrid_CellValidating"
                                            RowEditEnded="LookUpMasterGrid_RowEditEnded">
                            <telerik:RadGridView.Columns>
                                <telerik:GridViewDataColumn Header="Refrence Code"  UniqueName="CommonRefcd">
                                    <telerik:GridViewDataColumn.CellEditTemplate >
                                        <DataTemplate>
                                            <TextBox  x:Name="CommonReferenceCodeTextBox"  IsReadOnly="True" />
                                        </DataTemplate>
                                    </telerik:GridViewDataColumn.CellEditTemplate>
                                </telerik:GridViewDataColumn>

                                <telerik:GridViewDataColumn Header="Refrence Name" UniqueName="CommonRefNm"  >
                                    <telerik:GridViewDataColumn.CellEditTemplate>
                                        <DataTemplate>
                                            <SMS:AutoCompleteBox x:Name="CommonReferenceNameTextBox" />
                                           
                                        </DataTemplate>

                                    </telerik:GridViewDataColumn.CellEditTemplate>
                                </telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn Header="Refrence Description"   UniqueName="CommonRefDs" >
                                    <telerik:GridViewDataColumn.CellEditTemplate>
                                        <DataTemplate>
                                            <SMS:AutoCompleteBox x:Name="CommonReferenceDescriptionTextBox" />
                                            <!--<TextBox AcceptsReturn="True" x:Name="CommonReferenceDescriptionTextBox" Margin="5" Height="50" VerticalScrollBarVisibility="Visible" Width="100" VerticalAlignment="Center" Text="" />-->
                                            </DataTemplate>
                                </telerik:GridViewDataColumn.CellEditTemplate>
                                   
                                </telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn Header="Refrence Category"  UniqueName="CommonRefCategory">
                                    <telerik:GridViewDataColumn.CellEditTemplate>
                                        <DataTemplate>
                                            <SMS:AutoCompleteBox x:Name="CommonReferencCategoryTextBox"   QueryName="GetCategory"/>
                                        </DataTemplate>
                                    </telerik:GridViewDataColumn.CellEditTemplate>
                                </telerik:GridViewDataColumn>

                               
                                <telerik:GridViewDataColumn Header="Status" UniqueName="CommonRefStatus" >
                                    <telerik:GridViewDataColumn.CellEditTemplate>
                                        <DataTemplate>
                                            <SMS:AutoCompleteBox x:Name="CommonReferencStatusTextBox"  QueryName="GetStatus"/>
                                        </DataTemplate>
                                    </telerik:GridViewDataColumn.CellEditTemplate>
                                    </telerik:GridViewDataColumn>
                            </telerik:RadGridView.Columns>
                        </telerik:RadGridView>​

0
Ivan Ivanov
Telerik team
answered on 16 Sep 2015, 05:15 PM
Hello,

As far as I can see from the provided XAML snippet, the editors that are defined in the columns' CellEditTemplates are not data-bound. You need to specify a data-binding to the target model property, so that the changes that occur during edit can be propagated to the respective data items. In your scenario, these changes are lost after the edit operation gets committed. Here is a documentation article that illustrates how to use CellTemplates and CellEditTemplates.

Regards,
Ivan Ivanov
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
GridView
Asked by
Avinash
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
Avinash
Top achievements
Rank 1
Share this question
or