I have a RadWindow where a user can enter some "Item Information" (AddItem.aspx)
I also have a RadWindow where a user can see a list of the Items (ItemHistory.aspx) they have entered (shown in a RadGrid). I'm trying to set it up to where when a user clicks on the ID of an item in the grid, the item ID is then passed to the AddItem.aspx page, where they can edit the information they have entered.
I'm extremely stuck :(
Is there any way I can use the parent page's window manager and javascript function to open the AddItem.aspx window (I'm passing in various required parameters already). This would be preferrable since the parameters (last modified date, etc) are only available from the parent page.
ParentPage
function
ShowAddItemWindow(Id) {
var
LastModifiedDateHF = $get(
'<%=LastModifiedDateHF.ClientID%>'
);
var
CurrentStateHF = $get(
'<%=CurrentStateHF.ClientID%>'
);
window.radopen(
"item/AddItem.aspx?parentId="
+ Id +
"&itemId=-1&lastmodifieddate="
+ LastModifiedDateHF.value +
"¤tstate="
+ CurrentStateHF.value,
"addItemWin"
);
return
false
;
}
ItemHistory.aspx
<
telerik:RadGrid
ID
=
"radItemHistoryGrid"
runat
=
"server"
AutoGenerateColumns
=
"false"
GridLines
=
"None"
Skin
=
"Vista"
ShowHeader
=
"true"
PageSize
=
"12"
AllowPaging
=
"true"
OnNeedDataSource
=
"radItemHistoryGrid_OnNeedDataSource"
OnItemDataBound
=
"radItemHistoryGrid_OnItemDataBound"
AllowMultiRowSelection
=
"false"
>
<
PagerStyle
Mode
=
"NextPrevAndNumeric"
/>
<
AlternatingItemStyle
BackColor
=
"#efefef"
/>
<
HeaderStyle
Font-Bold
=
"true"
/>
<
ClientSettings
>
<
Selecting
AllowRowSelect
=
"true"
/>
<
ClientEvents
OnRowSelected
=
"ShowAddItemWindow"
/>
</
ClientSettings
>
<
MasterTableView
NoMasterRecordsText
=
"No Items found"
Name
=
"TblView"
ShowHeader
=
"true"
DataKeyNames
=
"Id"
AllowMultiColumnSorting
=
"false"
HierarchyLoadMode
=
"ServerOnDemand"
Width
=
"100%"
CommandItemDisplay
=
"Top"
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"Id"
HeaderText
=
"Id"
UniqueName
=
"Id"
Visible
=
"false"
>
</
telerik:GridBoundColumn
>
<
telerik:GridTemplateColumn
DataField
=
"ItemId"
HeaderText
=
"Item ID"
UniqueName
=
"ItemId"
Visible
=
"True"
>
<
ItemTemplate
>
<
asp:LinkButton
ID
=
"link1"
runat
=
"server"
Text='<%# DataBinder.Eval(Container.DataItem, "ItemId")%>'></
asp:LinkButton
>
</
ItemTemplate
>
So when a user selects the LinkButton, the ItemId is passed back to the parent page, then the Parent Page's javascript function to open the AddItem.aspx page is called passing in the selected ItemId (as well as the other parameters that are required and only available from the parent page)!
Can anyone help???
Thanks in advance!
V