Click here to Skip to main content
15,895,283 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Error when reading data Pin
Abhijit Jana27-Nov-08 2:45
professionalAbhijit Jana27-Nov-08 2:45 
AnswerRe: Error when reading data Pin
Ashfield27-Nov-08 2:42
Ashfield27-Nov-08 2:42 
GeneralRe: Error when reading data Pin
Abhijit Jana27-Nov-08 2:47
professionalAbhijit Jana27-Nov-08 2:47 
GeneralRe: Error when reading data Pin
Satish - Developer27-Nov-08 2:52
Satish - Developer27-Nov-08 2:52 
GeneralRe: Error when reading data Pin
Satish - Developer27-Nov-08 2:53
Satish - Developer27-Nov-08 2:53 
QuestionAlignments Pin
Nanda_MR27-Nov-08 1:21
Nanda_MR27-Nov-08 1:21 
AnswerRe: Alignments Pin
Abhijit Jana27-Nov-08 1:39
professionalAbhijit Jana27-Nov-08 1:39 
QuestionAssign backcolor of a gridview row passed from asp.net to someother row in javascript Pin
BenitaDSouza27-Nov-08 0:28
BenitaDSouza27-Nov-08 0:28 
Hi all,

i have a gridview in my project.
i need to pass the backcolor of a row to a javascript function and assign that backcolor to some other row in the javascript.

actually the requirement is,
i have to highlight(say yellow) a row on mouseover
that highlight to be removed(i.e., back to its original color) on mouseout
a row is highlighted with some other color(say green) on click.

here is the code im using for it.
<pre>
var previousRow;
var mouseOverBgColor;
var clickBgColor;

function ChangeRowColor(row)
{
//If last clicked row and the current clicked row are same
if (previousRow == row)
return;//do nothing
//If there is row clicked earlier
else if (previousRow != null)
//change the color of the previous row back to white
document.getElementById(previousRow).style.backgroundColor = clickBgColor;

//change the color of the current row to light yellow
document.getElementById(row).style.backgroundColor = "#80FF80";
//assign the current row id to the previous row id
//for next row to be clicked
previousRow = row;
clickBgColor = mouseOverBgColor;
}

function mouseOver(row, backColor)
{
if(previousRow == row)
return;
else
{
mouseOverBgColor = backColor;
document.getElementById(row).style.backgroundColor = "#EEFF00";
}
}

function mouseOut(row)
{
if(previousRow == row)
return;
else
document.getElementById(row).style.backgroundColor = mouseOverBgColor;
}
</pre>

and here is the code behind..
<pre>
protected void gdvToolSize_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onclick", "javascript:ChangeRowColor('" + e.Row.ClientID + "')");
e.Row.Attributes.Add("onmouseover", "javascript:mouseOver('" + e.Row.ClientID + "','" + e.Row.BackColor + "')");
e.Row.Attributes.Add("onmouseout", "javascript:mouseOut('" + e.Row.ClientID + "')");
}
}
</pre>

any help appreciated.. Smile | :)
QuestionDropdownlist Pin
ahmed eldeghedy26-Nov-08 23:32
professionalahmed eldeghedy26-Nov-08 23:32 
AnswerRe: Dropdownlist Pin
Christian Graus26-Nov-08 23:33
protectorChristian Graus26-Nov-08 23:33 
AnswerRe: Dropdownlist Pin
Abhijit Jana27-Nov-08 1:54
professionalAbhijit Jana27-Nov-08 1:54 
QuestionMenu and Treeview. Pin
Nanda_MR26-Nov-08 23:13
Nanda_MR26-Nov-08 23:13 
AnswerRe: Menu and Treeview. Pin
Christian Graus26-Nov-08 23:19
protectorChristian Graus26-Nov-08 23:19 
GeneralRe: Menu and Treeview. Pin
Nanda_MR26-Nov-08 23:47
Nanda_MR26-Nov-08 23:47 
AnswerRe: Menu and Treeview. Pin
ahmed eldeghedy26-Nov-08 23:40
professionalahmed eldeghedy26-Nov-08 23:40 
QuestionAccessing server PC using Browse option. Pin
vinay_K26-Nov-08 22:57
vinay_K26-Nov-08 22:57 
AnswerRe: Accessing server PC using Browse option. Pin
Christian Graus26-Nov-08 23:03
protectorChristian Graus26-Nov-08 23:03 
QuestionASP.net page Loading Delay Pin
Nanda_MR26-Nov-08 22:39
Nanda_MR26-Nov-08 22:39 
AnswerRe: ASP.net page Loading Delay Pin
Christian Graus26-Nov-08 22:40
protectorChristian Graus26-Nov-08 22:40 
AnswerRe: ASP.net page Loading Delay Pin
Ashfield26-Nov-08 22:40
Ashfield26-Nov-08 22:40 
Questionhow many rows can datatable can have? what is the limit of datatable? Pin
Satish - Developer26-Nov-08 22:23
Satish - Developer26-Nov-08 22:23 
AnswerRe: how many rows can datatable can have? what is the limit of datatable? Pin
Christian Graus26-Nov-08 22:27
protectorChristian Graus26-Nov-08 22:27 
GeneralRe: how many rows can datatable can have? what is the limit of datatable? Pin
Satish - Developer26-Nov-08 22:32
Satish - Developer26-Nov-08 22:32 
GeneralRe: how many rows can datatable can have? what is the limit of datatable? Pin
Christian Graus26-Nov-08 22:39
protectorChristian Graus26-Nov-08 22:39 
GeneralRe: how many rows can datatable can have? what is the limit of datatable? Pin
Ashfield26-Nov-08 22:39
Ashfield26-Nov-08 22:39 

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.