or
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { SqlDataAdapter da = new SqlDataAdapter(); ds = new DataSet(); DataTable dt = new DataTable(); SqlConnection conn = new SqlConnection(connectionString); SqlCommand cmd = new SqlCommand(); conn.Open(); try { cmd = conn.CreateCommand(); cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "MyStored"; da.SelectCommand = cmd; ds.Tables.Clear(); ds.Clear(); ds.AcceptChanges(); da.Fill(ds); Session.Clear(); Session.Add("Source", ds); radgrid.DataSource = null; radgrid.DataSource = ds.Tables[0]; radgrid.DataBind(); } catch { } conn.Close(); } }Hi
How can we have navigation like on the left on this page http://www.gordonramsay.com/thesavoygrill/theatre/Pre_theatre where navigation items have different attributes even when they are not selected or hovered over?
Thanks
Regards
//Changing the backcolor so that rows w/ the same order number show the same color if (e.Item is GridDataItem && e.Item is GridTableRow) { int rowNumber = e.Item.DataSetIndex; if (rowNumber >= 1) { GridDataItem previousRow = RadGrid1.Items[rowNumber - 1]; GridDataItem currentRow = (GridDataItem)e.Item; string prevMilestoneOrder = previousRow["Order"].Text; //Set current row back color to previous row back color if they have the same order if (prevMilestoneOrder.Equals(currentRow["Order"].Text)) currentRow.BackColor = previousRow.BackColor; //<------- previousRow.BackColor does not exist yet } }