Hello,
I have a Radgrid inside Radgrid MasterTableViewEditForm and I'm trying
to display information based on the selected value of radgrid2 (the inside grid) right next to it.
I tried a lot of the demos but I can't get it to work, please help me. Here's what I have...
<
EditFormSettings
EditFormType
=
"Template"
>
<
FormTemplate
>
<
telerik:RadTabStrip
ID
=
"Contacts"
runat
=
"server"
SelectedIndex
=
"0"
MultiPageID
=
"UserMultiPage1"
>
<
Tabs
>
<
telerik:RadTab
runat
=
"server"
Text
=
"Applications"
PageViewID
=
"AddressInfoPageView"
>
</
telerik:RadTab
>
</
Tabs
>
</
telerik:RadTabStrip
>
<
telerik:RadMultiPage
runat
=
"server"
ID
=
"UserMultiPage1"
SelectedIndex
=
"0"
RenderSelectedPageOnly
=
"false"
>
<
telerik:RadPageView
runat
=
"server"
ID
=
"AddressInfoPageView"
>
<
asp:Label
ID
=
"Label3"
Font-Bold
=
"true"
Font-Italic
=
"true"
Text='<%# Eval("clientID")%>'
Visible="false" runat="server" />
<
div
style
=
"display:inline-block"
>
<
telerik:RadGrid
ID
=
"RadGrid2"
runat
=
"server"
AutoGenerateColumns
=
"false"
DataSourceID
=
"SqlDataSource2"
CssClass
=
"RadGrid"
GridLines
=
"None"
AllowPaging
=
"False"
AllowSorting
=
"True"
ShowStatusBar
=
"true"
AllowAutomaticDeletes
=
"True"
AllowAutomaticInserts
=
"True"
height
=
"320px"
Width
=
"300px"
>
<
ClientSettings
>
<
ClientEvents
OnRowSelected
=
"RowSelected"
/>
<
Selecting
AllowRowSelect
=
"true"
></
Selecting
>
<
Scrolling
AllowScroll
=
"True"
UseStaticHeaders
=
"True"
SaveScrollPosition
=
"true"
></
Scrolling
>
</
ClientSettings
>
<
MasterTableView
CommandItemDisplay
=
"Top"
CommandItemSettings-AddNewRecordText
=
"Add New Client"
GridLines
=
"None"
DataSourceID
=
"SqlDataSource2"
DataKeyNames
=
"clientID"
>
<
Columns
>
<
telerik:GridButtonColumn
CommandName
=
"Edit"
Text
=
"Edit"
>
</
telerik:GridButtonColumn
>
<
telerik:GridBoundColumn
DataField
=
"app"
UniqueName
=
"app"
HeaderText
=
"Application No."
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"clientTypeName"
UniqueName
=
"type"
HeaderText
=
"Relationship"
>
</
telerik:GridBoundColumn
>
</
Columns
>
<
EditFormSettings
EditFormType
=
"Template"
>
<
FormTemplate
>
<
asp:TextBox
ID
=
"TextBox10"
runat
=
"server"
Text='<%# Bind("app")%>' TabIndex="1" Enabled="false"/>
</
FormTemplate
>
</
EditformSettings
>
</
MasterTableView
>
</
telerik:RadGrid
>
</
div
>
<
asp:SqlDataSource
ID
=
"SqlDataSource2"
runat
=
"server"
ConnectionString
=
"Data Source=10.131.121.240;Integrated Security=false;Initial Catalog=Contacts_Dev; User ID=TestUser;Password=100.1kthx"
providerName
=
"System.Data.SqlClient"
DeleteCommand
=
"DELETE FROM [Contacts_Dev].[dbo].[Contact_apps] WHERE [clientID] = @clientID"
InsertCommand
=
"INSERT INTO [Contacts_Dev].[dbo].[Contact_apps] ([app], [clientType], [AutoID],) VALUES (@clientID, @app, @clientType, @AutoID)"
SelectCommand
=
"SELECT * FROM [Contacts_Dev].[dbo].[Contact_apps] as a, [Contacts_Dev].[dbo].[Contacts_Type_LUT] as b WHERE a.[clientID] = @clientID AND a.[clientType] = b.[clientType]"
UpdateCommand
=
"UPDATE [Contacts_Dev].[dbo].[Contact_apps] SET [clientID] = @clientID, [clientType] = @clientType, [AutoID] = @AutoID WHERE [clientID] = @clientID"
>
<
SelectParameters
>
<
asp:ControlParameter
Name
=
"clientID"
Type
=
"String"
ControlID
=
"Label3"
PropertyName
=
"Text"
/>
</
SelectParameters
>
<
DeleteParameters
>
<
asp:Parameter
Name
=
"clientID"
Type
=
"Int32"
></
asp:Parameter
>
</
DeleteParameters
>
<
InsertParameters
>
<
asp:Parameter
Name
=
"app"
Type
=
"String"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"clientType"
Type
=
"String"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"AutoID"
Type
=
"Int32"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"clientID"
Type
=
"Int32"
></
asp:Parameter
>
</
InsertParameters
>
<
UpdateParameters
>
<
asp:Parameter
Name
=
"app"
Type
=
"String"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"clientType"
Type
=
"String"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"AutoID"
Type
=
"Int32"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"clientID"
Type
=
"Int32"
></
asp:Parameter
>
</
UpdateParameters
>
</
asp:SqlDataSource
>
<
div
style
=
"display:inline-block"
>
<
table
id
=
"Table4"
style
=
"width:100px; height:500px; display:inline"
>
<
tr
>
<
td
colspan
=
"2"
>
<
b
>Details I would like to display would go here, details based on Application No. Selected</
b
>
</
td
>
</
tr
>
</
table
>
</
div
>
</
telerik:RadPageView
>