<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CustomAJAXCall.aspx.cs" Inherits="DataGrid_CustomAJAXCall" %>
<%@ Register TagPrefix="APNSoft" Namespace="APNSoft.WebControls" Assembly="APNSoftControls" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<script type="text/javascript">
function GetBookDetails(RowID){
//Get DIV for book details
var BookDetails = document.getElementById('BookDetails');
//Display the Loading text
BookDetails.innerHTML = '<small>Loading...</small>';
//Call the server
dg.CallTheServer('myDataGrid', RowID, '', '', '');
};
function ReturnBookDetails(ComponentID, Command, Parameter){
if(Command=='CallTheServer'){
//Get DIV for book details
var BookDetails = document.getElementById('BookDetails');
//Get book details & display on the page
BookDetails.innerHTML = dg.DecodeValue(Parameter);
}
};
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<APNSoft:APNSoftDataGrid id="myDataGrid" runat="server"
SkinFolder = "~/DataGrid/Skins/GrayScale/"
width = "450"
height = "250"
BottomBar-Visible = "false"
ClientSideOnRowClick = "GetBookDetails('$RowID$');"
ClientSideAfterCallBack = "ReturnBookDetails('$ComponentID$', '$Command$', '$Parameter$');"
/>
<div id="GrayBoxCont" class="GrayBox" style="left:550px;top:32px;width:220px;height:220px;">
<div id="BookDetails" style="font-size:12px;font-family:Arial;"><small>Please click on the row for more details.</small></div>
</div>
</div>
</form>
</body>
</html>
|