Hello
i am using javascript to select the Row ID using RowMouseOver. This is working fine.
I am trying to send the Image of the 'hover' selected row to the RadWindow by clicking on
the hyperlink in the Grid Template column.
The Images are files on the server. The database only stores the file name.
All code is currently ASPX and Javascript.
Is there a better way to transfer the hover 'selected' image direct to the RadWindow as the code below does not show the image.
Below is my RadGrid ASPX (Unfortunately the Code snippet tool didnt work here)
<telerik:GridTemplateColumn HeaderText="" SortExpression="XTV7_Categories_Image"
UniqueName="XTV7_Categories_Sub_Image">
<ItemTemplate>
<asp:HyperLink ID="btnImageDisplay" runat="server" Width="100px" Height="77px"
CommandName="Select"
ImageUrl='<%# "~/App_Portal/xTrain/Images/VideoThumbs/" + Eval("XTV7_Videos_Image") %>'
NavigateUrl='<%# "~/App_Portal/xTrain/Images/VideoImages/" + Eval("XTV7_Videos_Image") %>'
onclick="openRadWin();return false;" />
</ItemTemplate>
</telerik:GridTemplateColumn>
Below is my RadCodeBlock Javascript with the RowmouseOver and openRadWin samples.
function RowMouseOver(sender, args) {
document.getElementById("<%= Label1.ClientID %>").innerHTML =
"<b>XTV7_Videos_ID: </b>" + args.getDataKeyValue("XTV7_Videos_ID") +
"<br />" +
"<b>Title: </b>" + args.getDataKeyValue("XTV7_Videos_Title") +
"<br />" +
"<b>SubTitle: </b>" + args.getDataKeyValue("XTV7_Videos_SubTitle") +
"<br />" +
"<b>Image Name: </b>" + args.getDataKeyValue("XTV7_Videos_Image") +
"<br />" +
"<b>M4V Name: </b>" + args.getDataKeyValue("XTV7_Videos_Ipod_Filename") +
"<br />" +
"<b>SWF Name: </b>" + args.getDataKeyValue("XTV7_Videos_FileName");
}
function openRadWin() {
radopen('<%# "~/App_Portal/xTrain/Images/VideoImages/" + Eval("XTV7_Videos_Image") %>', "RadWindow1");
}
// OLD RadWindow CODE
// function openRadWindow(url) {
// var oWnd = radopen(url);
// return false;
// }
The basic RadWindow settings;
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" Modal="true" VisibleStatusbar="false"
ForeColor="Black" BackColor="Black" Behaviors="Reload,Resize,Minimize,Maximize,Close"
VisibleTitlebar="true" VisibleOnPageLoad="false" KeepInScreenBounds="True" Skin="Black"
AutoSize="true" Animation="Resize">
<Windows>
<telerik:RadWindow runat="server" ID="RadWindow1" Title="XGIS Lesson Image Viewer"
OnClientClose="onClose">
</telerik:RadWindow>
i am using javascript to select the Row ID using RowMouseOver. This is working fine.
I am trying to send the Image of the 'hover' selected row to the RadWindow by clicking on
the hyperlink in the Grid Template column.
The Images are files on the server. The database only stores the file name.
All code is currently ASPX and Javascript.
Is there a better way to transfer the hover 'selected' image direct to the RadWindow as the code below does not show the image.
Below is my RadGrid ASPX (Unfortunately the Code snippet tool didnt work here)
<telerik:GridTemplateColumn HeaderText="" SortExpression="XTV7_Categories_Image"
UniqueName="XTV7_Categories_Sub_Image">
<ItemTemplate>
<asp:HyperLink ID="btnImageDisplay" runat="server" Width="100px" Height="77px"
CommandName="Select"
ImageUrl='<%# "~/App_Portal/xTrain/Images/VideoThumbs/" + Eval("XTV7_Videos_Image") %>'
NavigateUrl='<%# "~/App_Portal/xTrain/Images/VideoImages/" + Eval("XTV7_Videos_Image") %>'
onclick="openRadWin();return false;" />
</ItemTemplate>
</telerik:GridTemplateColumn>
Below is my RadCodeBlock Javascript with the RowmouseOver and openRadWin samples.
function RowMouseOver(sender, args) {
document.getElementById("<%= Label1.ClientID %>").innerHTML =
"<b>XTV7_Videos_ID: </b>" + args.getDataKeyValue("XTV7_Videos_ID") +
"<br />" +
"<b>Title: </b>" + args.getDataKeyValue("XTV7_Videos_Title") +
"<br />" +
"<b>SubTitle: </b>" + args.getDataKeyValue("XTV7_Videos_SubTitle") +
"<br />" +
"<b>Image Name: </b>" + args.getDataKeyValue("XTV7_Videos_Image") +
"<br />" +
"<b>M4V Name: </b>" + args.getDataKeyValue("XTV7_Videos_Ipod_Filename") +
"<br />" +
"<b>SWF Name: </b>" + args.getDataKeyValue("XTV7_Videos_FileName");
}
function openRadWin() {
radopen('<%# "~/App_Portal/xTrain/Images/VideoImages/" + Eval("XTV7_Videos_Image") %>', "RadWindow1");
}
// OLD RadWindow CODE
// function openRadWindow(url) {
// var oWnd = radopen(url);
// return false;
// }
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" Modal="true" VisibleStatusbar="false"
ForeColor="Black" BackColor="Black" Behaviors="Reload,Resize,Minimize,Maximize,Close"
VisibleTitlebar="true" VisibleOnPageLoad="false" KeepInScreenBounds="True" Skin="Black"
AutoSize="true" Animation="Resize">
<Windows>
<telerik:RadWindow runat="server" ID="RadWindow1" Title="XGIS Lesson Image Viewer"
OnClientClose="onClose">
</telerik:RadWindow>