Click here to Skip to main content
15,900,973 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to disable selection in datagridview. Pin
Peace ON14-Jul-10 3:19
Peace ON14-Jul-10 3:19 
GeneralRe: How to disable selection in datagridview. Pin
NarVish14-Jul-10 3:26
NarVish14-Jul-10 3:26 
Questioncalling and displaying url in the same page. Pin
dabuskol14-Jul-10 1:53
dabuskol14-Jul-10 1:53 
AnswerRe: calling and displaying url in the same page. Pin
Peace ON14-Jul-10 1:59
Peace ON14-Jul-10 1:59 
AnswerRe: calling and displaying url in the same page. Pin
Prosanta Kundu online14-Jul-10 2:22
Prosanta Kundu online14-Jul-10 2:22 
GeneralRe: calling and displaying url in the same page. Pin
dabuskol19-Jul-10 0:37
dabuskol19-Jul-10 0:37 
Questionchange cell color of gird view on click event of CELL Pin
220814-Jul-10 1:14
220814-Jul-10 1:14 
AnswerRe: change cell color of gird view on click event of CELL Pin
Prosanta Kundu online14-Jul-10 1:31
Prosanta Kundu online14-Jul-10 1:31 
Add OnRowDataBound Event in your gridview

XML
OnRowDataBound="grvDriverList_RowDataBound"


Define RowDataBound event in cs page

C#
protected void grvDriverList_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            e.Row.Cells[0].Attributes.Add("onclick","toggleBGColor(this);");
        }
    }


Add javascript event

JavaScript
function toggleBGColor(obj) {
            if (obj.style.backgroundColor == "red") {
                obj.style.backgroundColor = "white";
            }
            else {
                obj.style.backgroundColor = "red";
            }
        }

QuestionSerialport from a remote server Pin
grmihel214-Jul-10 0:18
grmihel214-Jul-10 0:18 
AnswerRe: Serialport from a remote server PinPopular
Richard MacCutchan14-Jul-10 1:15
mveRichard MacCutchan14-Jul-10 1:15 
GeneralRe: Serialport from a remote server Pin
grmihel214-Jul-10 2:32
grmihel214-Jul-10 2:32 
GeneralRe: Serialport from a remote server Pin
Dave Kreskowiak14-Jul-10 3:56
mveDave Kreskowiak14-Jul-10 3:56 
GeneralRe: Serialport from a remote server Pin
grmihel214-Jul-10 4:14
grmihel214-Jul-10 4:14 
GeneralRe: Serialport from a remote server Pin
Dave Kreskowiak14-Jul-10 6:39
mveDave Kreskowiak14-Jul-10 6:39 
QuestionData Types from Datareader Pin
Unsy13-Jul-10 23:20
Unsy13-Jul-10 23:20 
AnswerRe: Data Types from Datareader Pin
Prosanta Kundu online13-Jul-10 23:37
Prosanta Kundu online13-Jul-10 23:37 
AnswerRe: Data Types from Datareader Pin
Peace ON13-Jul-10 23:47
Peace ON13-Jul-10 23:47 
AnswerRe: Data Types from Datareader Pin
riced14-Jul-10 0:10
riced14-Jul-10 0:10 
QuestionListbox Selection Mode MultiSimple/Extended how to sort item in sequence of selection Pin
norjali13-Jul-10 22:44
norjali13-Jul-10 22:44 
AnswerRe: Listbox Selection Mode MultiSimple/Extended how to sort item in sequence of selection Pin
Luc Pattyn13-Jul-10 22:52
sitebuilderLuc Pattyn13-Jul-10 22:52 
GeneralRe: Listbox Selection Mode MultiSimple/Extended how to sort item in sequence of selection Pin
norjali13-Jul-10 22:58
norjali13-Jul-10 22:58 
AnswerRe: Listbox Selection Mode MultiSimple/Extended how to sort item in sequence of selection Pin
Luc Pattyn13-Jul-10 23:10
sitebuilderLuc Pattyn13-Jul-10 23:10 
GeneralRe: Listbox Selection Mode MultiSimple/Extended how to sort item in sequence of selection Pin
norjali14-Jul-10 16:33
norjali14-Jul-10 16:33 
QuestionRegular Expressions Performance Pin
yftah198913-Jul-10 22:17
yftah198913-Jul-10 22:17 
AnswerRe: Regular Expressions Performance Pin
Pete O'Hanlon13-Jul-10 22:26
mvePete O'Hanlon13-Jul-10 22:26 

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.