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

getting multiple datakey values for second grid

1 Answer 210 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Taeho Yoo
Top achievements
Rank 1
Taeho Yoo asked on 01 Aug 2008, 01:45 AM
Hi
I have two grids. when you select a row from the first grid, using the values from the selected row I need to populate the second grid.

The first grid has two datakeynames="one,two"

Now I need to 

<

asp:SqlDataSource ID="dsStudentGradeHistory" runat="server"
<SelectParameters>
<asp:ControlParameter ControlID="firstgrid" Type="Int32" DefaultValue="-1" Name="one" PropertyName="SelectedValue" />
<asp:ControlParameter ControlID="firstgrid" Type="Int32" DefaultValue="-1" Name="two" PropertyName="SelectedValue" />
</SelectParameters>
</asp:SqlDataSource>

and then bind the data to the second grid.

But what happens is that the second parameter gets one value as you could expected.
How to assign with correct values for the parameters?

Thanks

Toby

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 01 Aug 2008, 07:08 AM
Hello Toby,

For the first service pack we will provide new property SelectedValues:

<asp:ControlParameter ControlID="firstgrid" Type="Int32" DefaultValue="-1" Name="two" PropertyName="SelectedValues['YourDataKeyName']" />

You can contact the support to receive latest Telerik.Web.UI build.

Greetings,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Taeho Yoo
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or