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

[Solved] Multivalue binding with telerik gridview.

3 Answers 79 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.
pritesh
Top achievements
Rank 1
pritesh asked on 14 Oct 2010, 06:38 AM
Hello ,

I am using MVVM to bind the nested telerik gridview. Parent gridview contains order number while the child grid contains the order articles.Child grid contains Description , Qty , Price per Qty. This price per qty can be changed at run time so i have put it CellEdit Template of the columns which looks like following.
 <telerikGridView:GridViewDataColumn Header="Price per amount" MinWidth="100"  DataMemberBinding="{Binding Price}" <br>
                                                                        TextAlignment="Center"><br>
                                        <telerikGridView:GridViewDataColumn.CellTemplate><br>
                                            <DataTemplate><br>
                                                <TextBox Name="txtPricePerAmount" Text="{Binding Price}"></TextBox><br>
                                            </DataTemplate><br>
                                        </telerikGridView:GridViewDataColumn.CellTemplate><br>
                                        <telerikGridView:GridViewDataColumn.CellEditTemplate><br>
                                            <DataTemplate><br>
                                                <TextBox
Name="txtPricePerAmount" Text="{Binding
Price,Mode=TwoWay}"></TextBox><br>
                                            </DataTemplate><br>
                                        </telerikGridView:GridViewDataColumn.CellEditTemplate><br>
                                    </telerikGridView:GridViewDataColumn>



Now i want to fourth column which multiply price per qty and Qty .I tried to find the solution with the help of IMultiValueConverter but i could not succeed.

Please help me to find the solution.Thanks in advance

3 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 14 Oct 2010, 07:55 AM
Hi pritesh,

You may take a look at this blog post for a reference.
 

Greetings,
Maya
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
0
pritesh
Top achievements
Rank 1
answered on 14 Oct 2010, 08:34 AM
Thanks for quick reply.I have gone through CalculatedColumns_2010_061C6D0F example.It is a nice example and serve the purpose. But here one addtional property is used to calculate the total name "total".I can not create any additional properties as i can not change the data model.

Can you please provide me alternative solution ?
0
Maya
Telerik team
answered on 14 Oct 2010, 09:00 AM
Hi pritesh,

In order to make our conversation consistent, let us keep it straightforward, following only this forum thread.

Greetings,
Maya
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
pritesh
Top achievements
Rank 1
Answers by
Maya
Telerik team
pritesh
Top achievements
Rank 1
Share this question
or