The flyout from
simple version displays only the data which is loaded in the Grid.
In order to use the values from a column, you need to add it to the grid
(and make it invisible if you don't need it to appear in the grid).
Using the ajax version, the grid will contain only a few columns, the rest will be loaded with ajax:
Once a link from the record is clicked, while the flyout is displayed, an Ajax callback
needs to be sent to the server to load all the other data based on the
ID column. The callback will be implemented using AJAX Page.
JavaScript on client-side:
function getRecordInfo(oLink)
{
ob_post.AddParam("SupplierID", oLink.id.toString().replace('grid_link_',''));
ob_post.post(null, "GetInfo", updateClient ) ;
}
function updateClient(infoHTMLData){
document.getElementById("divDetailsInfo").innerHTML = infoHTMLData;
}
C# on server-side:
public string GetInfo(string SupplierID){
string sNewHtml = "";
OleDbConnection myConn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +
Server.MapPath("Northwind.mdb"));
OleDbCommand myComm = new OleDbCommand(
"SELECT * FROM Suppliers WHERE SupplierID = " + SupplierID , myConn);
myConn.Open();
OleDbDataReader oReader = myComm.ExecuteReader();
while (oReader.Read())
{
// get the display information from database.
sNewHtml += "<li>" + oReader.GetValue(0).ToString() + "</li>";
// ...
}
myConn.Close();
return sNewHtml;
}