Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
public void BindAccessoryGrid(object sender, DataListItemEventArgs e)
{
string sKey;
// see what type of row (header, footer, item, etc.) caused the event
if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
DatabaseFunctions handle = new DatabaseFunctions();
System.Web.UI.WebControls.Label oLabel;
oLabel = ((System.Web.UI.WebControls.Label)(e.Item.FindControl("lblPhoneID")));
sKey = oLabel.Text;
// Get reference to datagrid control in this row
System.Web.UI.WebControls.DataGrid oGrid;
oGrid = ((System.Web.UI.WebControls.DataGrid)(e.Item.FindControl("dgAccessories")));
iSiteID = Convert.ToInt32(Request.Cookies["SiteID"].Value);
iCarrierID = DatabaseFunctions.GetCarrierID(Convert.ToString(Request.Cookies["CartID"].Value));
DataSet ds = handle.GetPhoneAccessories(iSiteID, iCarrierID, Convert.ToInt32(sKey));
if (ds.Tables[0].Rows.Count > 0)
{
oGrid.DataSource = ds;
oGrid.DataBind();
}
}
}