Sunday, October 23, 2011
Tuesday, September 27, 2011
Wednesday, September 21, 2011
Tuesday, September 20, 2011
Monday, September 19, 2011
Friday, August 26, 2011
Wednesday, August 3, 2011
Monday, August 1, 2011
Sunday, June 19, 2011
Change row color in Gridview on mouse over
Sunday, June 19, 2011
Vikas Sharma
If you have the need to change the row color of a row in a gridview when you mouse over (and mouse out) you can add some code to the RowDataBound event.
Here is a sample:
Here is a sample:
GridView with clickable rows
Sunday, June 19, 2011
Vikas Sharma
If you need to have a GridView with rows that you can click on you will need to set the onClick event for each row.
Here is a code sample for the RowDataBound event of a GridView.
This examples pulls the value of cell 0 and appends it to the url.
Here is a code sample for the RowDataBound event of a GridView.
This examples pulls the value of cell 0 and appends it to the url.
List down the DataType and Size Of all Columns of All Tables in a SQL Server 2005/2008 Database
Sunday, June 19, 2011
Vikas Sharma
StoredProc to Delete All Tables,SPs,Views,Triggers From a Database
Sunday, June 19, 2011
Vikas Sharma
Friday, June 17, 2011
Tuesday, June 14, 2011
Saturday, May 28, 2011
Gridview_RowCreated Event
Saturday, May 28, 2011
Vikas Sharma
protected void grdData_RowCreated(object sender, GridViewRowEventArgs e) { if ((e.Row.RowType == DataControlRowType.DataRow) &&
(e.Row.RowState == DataControlRowState.Selected))
{
string strCellvalue = DataBinder.Eval(e.Row.DataItem, "categoryname").ToString(); if (strCellvalue == "Admin")
{
e.Row.BackColor = System.Drawing.Color.LightPink;
}
}
}
}
}
}