Folks,
Using VS2010 with RadControls for Ajax Q1 2012.
I need some help with following issues:
1) For Example, while using Command Item Template, I can hide the the EditSelected Command Button based on RadGrid1.EditIndexes.Count of Master Table, How can I accomplish the same result with Child Table (i.e. hide EditSelected Command Button based on RadGrid1.EditIndexes.Count of Child Table)? Basically I do not want to show Child Table EditSelected Command if there are no Child rows.
To get Child Table Edit Indexes count I tried to below line of code but is not working.
Visible='<%# RadGrid1.MasterTableView.DetailTables[0].EditIndexes.Count > 0 %>'>
Below is my Master/Detail Command Items Template.
<
Mastertableview
width
=
"100%"
commanditemdisplay
=
"Top"
datasourceid
=
"SqlDataSource1"
name
=
"Master"
datakeynames
=
"CustomerID"
>
<
CommandItemTemplate
>
<
div
style
=
"padding: 5px 5px;"
>
Custom command item template for Master table
<
asp:LinkButton
ID
=
"btnEditSelected"
runat
=
"server"
CommandName
=
"EditSelected"
Visible='<%# RadGrid1.EditIndexes.Count == 0 %>'><
img
style
=
"border:0px;vertical-align:middle;"
alt
=
""
src
=
"Images/Edit.gif"
/>Edit selected Master Row</
asp:LinkButton
>
<
asp:LinkButton
ID
=
"btnUpdateEdited"
runat
=
"server"
CommandName
=
"UpdateEdited"
Visible='<%# RadGrid1.EditIndexes.Count > 0 %>'><
img
style
=
"border:0px;vertical-align:middle;"
alt
=
""
src
=
"Images/Update.gif"
/>Update Selected Master Row</
asp:LinkButton
>
'''
'''
</
div
>
</
CommandItemTemplate
>
<
DetailTables
>
<
telerik:GridTableView
DataKeyNames
=
"OrderID,ProductID"
DataSourceID
=
"SqlDataSource3"
Width
=
"100%"
runat
=
"server"
CommandItemDisplay
=
"Top"
Name
=
"Details"
>
<
CommandItemTemplate
>
<
div
style
=
"padding: 5px 5px;"
>
Custom command item template for Child Table
<
asp:LinkButton
ID
=
"btnEditSelectedChildRow"
runat
=
"server"
CommandName
=
"EditSelected"
Visible='<%# RadGrid1.MasterTableView.DetailTables[0].EditIndexes.Count > 0 %>'>
<
img
style
=
"border:0px;vertical-align:middle;"
alt
=
""
src
=
"Images/Edit.gif"
/>Edit selected Child Row</
asp:LinkButton
>
<
asp:LinkButton
ID
=
"btnUpdateSelectedChildRow"
runat
=
"server"
CommandName
=
"UpdateEdited"
Visible='<%# RadGrid1.MasterTableView.DetailTables[0].EditIndexes.Count > 0 %>'>
<
img
style
=
"border:0px;vertical-align:middle;"
alt
=
""
src
=
"Images/Update.gif"
/>Update Selected Child Row</
asp:LinkButton
>
'''
'''
</
CommandItemTemplate
>
</
telerik:GridTableView
>
</
DetailTables
>
</
Mastertableview
>
2) Below link from Telerik Documentation shows Making a Grid Row Selected at All Times (similar to WinForms grids). How can I accomplish the same result with Child Table (I have multiple Child Tables)?
http://www.telerik.com/help/aspnet-ajax/grid-selected-row-at-all-times.html
3) Below Thread solution by Princy demonstrated Select Inserted/Updated row after performing command in Master Table. How can I accomplish the same result with Child Table (I have multiple Child Tables)?
http://www.telerik.com/community/forums/aspnet-ajax/grid/select-inserted-updated-row-after-performing-command.aspx
Thank you very much for any help.
Sincerely
gc_0620