protected void MonitoredDBGridView_SelectionChanged(object sender, EventArgs e) { if (MonitoredDBGridView.Selection.Count > 0) { System.Collections.Generic.List <object> Type = MonitoredDBGridView.GetSelectedFieldValues("Name"); System.Collections.Generic.List <object> c = MonitoredDBGridView.GetSelectedFieldValues("Category"); System.Collections.Generic.List <object> ServerType = MonitoredDBGridView.GetSelectedFieldValues("Type"); System.Collections.Generic.List <object> LastDate = MonitoredDBGridView.GetSelectedFieldValues("LastUpdate"); System.Collections.Generic.List <object> Status = MonitoredDBGridView.GetSelectedFieldValues("Status"); if (Type.Count > 0 && c.Count > 0) { string Name = Type[0].ToString(); string RT = c[0].ToString(); string SType = ServerType[0].ToString(); string LastUpdate = LastDate[0].ToString(); string SStatus = Status[0].ToString(); if (RT == "Database Response Time") { //Mukund: VSPLUS-844, Page redirect on callback try { DevExpress.Web.ASPxWebControl.RedirectOnCallback("DefaultDetailsPage.aspx?Name=" + Name + "&Type=" + SType + "&Status=" + SStatus + "&LastDate=" + LastUpdate + ""); Context.ApplicationInstance.CompleteRequest(); } catch (Exception ex) { Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex); //throw ex; } } } } }
public void FillGridfromSession() { DataTable dt = new DataTable(); if (Session["Statustab"] != "" && Session["Statustab"] != null) { dt = Session["Statustab"] as DataTable; } if (dt.Rows.Count > 0) { MonitoredDBGridView.DataSource = dt; MonitoredDBGridView.DataBind(); } }
public void FillGrid() { DataTable Statustab = new DataTable(); try { Statustab = VSWebBL.DashboardBL.DatabaseHealthBL.Ins.GetData1(""); if (Statustab.Rows.Count <= 0) { } Session["Statustab"] = Statustab; MonitoredDBGridView.DataSource = Statustab; MonitoredDBGridView.DataBind(); } catch (Exception ex) { Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex); throw ex; } }