Click here to Skip to main content
15,899,026 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionConverting title of calendar control to hyperlink Pin
jebby22526-Jun-06 15:30
jebby22526-Jun-06 15:30 
QuestionAsp.net Screen Resolution and Flash Query String Pin
oskardiazdeleon26-Jun-06 15:15
oskardiazdeleon26-Jun-06 15:15 
QuestionHow to highlight today's date row in datagrid when page loaded? Pin
Dhruvil26-Jun-06 10:55
Dhruvil26-Jun-06 10:55 
AnswerRe: How to highlight today's date row in datagrid when page loaded? Pin
Sushant Duggal27-Jun-06 0:00
Sushant Duggal27-Jun-06 0:00 
GeneralRe: How to highlight today's date row in datagrid when page loaded? Pin
Dhruvil27-Jun-06 5:35
Dhruvil27-Jun-06 5:35 
GeneralRe: How to highlight today's date row in datagrid when page loaded? Pin
Sushant Duggal27-Jun-06 7:01
Sushant Duggal27-Jun-06 7:01 
GeneralRe: How to highlight today's date row in datagrid when page loaded? Pin
Dhruvil27-Jun-06 9:51
Dhruvil27-Jun-06 9:51 
GeneralRe: How to highlight today's date row in datagrid when page loaded? Pin
Sushant Duggal27-Jun-06 10:54
Sushant Duggal27-Jun-06 10:54 
HI NIKI,

This is what i think u need...
Please try this code :

<br />
private void DataGrid1_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)<br />
{<br />
if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)<br />
{<br />
DateTime dt = Convert.ToDateTime(e.Item.Cells[5].Text);//PUT THE SELL NUMBER WHERE IS THE DATE FIELD<br />
if(DateTime.Compare(DateTime.Today, dt) == 0) // this is the current date<br />
e.Item.BackColor = Color.Aqua;<br />
else if(DateTime.Compare(DateTime.Today, dt) == -1) // this is the future coming dates<br />
e.Item.BackColor = Color.Yellow;	<br />
}<br />
}<br />


I hope this helps youSmile | :)

THanks

Sushant Duggal.
GeneralRe: How to highlight today's date row in datagrid when page loaded? Pin
Dhruvil28-Jun-06 7:03
Dhruvil28-Jun-06 7:03 
GeneralRe: How to highlight today's date row in datagrid when page loaded? Pin
Sushant Duggal28-Jun-06 7:41
Sushant Duggal28-Jun-06 7:41 
GeneralRe: How to highlight today's date row in datagrid when page loaded? Pin
Dhruvil28-Jun-06 8:36
Dhruvil28-Jun-06 8:36 
GeneralRe: How to highlight today's date row in datagrid when page loaded? Pin
Sushant Duggal28-Jun-06 8:43
Sushant Duggal28-Jun-06 8:43 
GeneralRe: How to highlight today's date row in datagrid when page loaded? Pin
Dhruvil28-Jun-06 9:27
Dhruvil28-Jun-06 9:27 
GeneralRe: How to highlight today's date row in datagrid when page loaded? Pin
Sushant Duggal28-Jun-06 18:02
Sushant Duggal28-Jun-06 18:02 
AnswerRe: How to highlight today's date row in datagrid when page loaded? Pin
Guffa28-Jun-06 10:05
Guffa28-Jun-06 10:05 
Question"No row at position 0" error while adding new line to datagrid Pin
leckey26-Jun-06 10:54
leckey26-Jun-06 10:54 
AnswerRe: "No row at position 0" error while adding new line to datagrid Pin
Edbert P26-Jun-06 15:57
Edbert P26-Jun-06 15:57 
QuestionText Box values modified with Javascript in ASP.NET Page Pin
tsramkumar26-Jun-06 10:39
tsramkumar26-Jun-06 10:39 
AnswerRe: Text Box values modified with Javascript in ASP.NET Page Pin
Tirthadip26-Jun-06 19:31
Tirthadip26-Jun-06 19:31 
QuestionSiteMap and breadcrumb problem Pin
eggsovereasy26-Jun-06 10:28
eggsovereasy26-Jun-06 10:28 
AnswerRe: SiteMap and breadcrumb problem Pin
minhpc_bk26-Jun-06 16:50
minhpc_bk26-Jun-06 16:50 
GeneralRe: SiteMap and breadcrumb problem [modified] Pin
eggsovereasy27-Jun-06 5:59
eggsovereasy27-Jun-06 5:59 
GeneralRe: SiteMap and breadcrumb problem Pin
minhpc_bk27-Jun-06 18:07
minhpc_bk27-Jun-06 18:07 
QuestionDataGrid - Custom query? Pin
ActOfJon26-Jun-06 10:27
ActOfJon26-Jun-06 10:27 
Questionpurpose &lt;input type="hidden" part in asp_guest Pin
khasiguy26-Jun-06 10:01
khasiguy26-Jun-06 10:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.