Click here to Skip to main content
15,915,739 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionVisual Studio 2008 with crystal reports 11.5 Pin
Battlehammer27-Mar-09 9:10
Battlehammer27-Mar-09 9:10 
AnswerRe: Visual Studio 2008 with crystal reports 11.5 Pin
Battlehammer7-Apr-09 5:09
Battlehammer7-Apr-09 5:09 
QuestionManiupulating information from a dataset to save it into an array ???? [modified] Pin
lued27-Mar-09 8:28
lued27-Mar-09 8:28 
AnswerRe: Maniupulating information from a dataset to save it into an array ???? Pin
Jörgen Andersson27-Mar-09 11:39
professionalJörgen Andersson27-Mar-09 11:39 
AnswerRe: Maniupulating information from a dataset to save it into an array ???? Pin
a.hamidy27-Mar-09 20:50
a.hamidy27-Mar-09 20:50 
QuestionHighlight and Select Row (clicking anywhere on it) Pin
alvarog0127-Mar-09 7:18
alvarog0127-Mar-09 7:18 
AnswerRe: Highlight and Select Row (clicking anywhere on it) Pin
Jörgen Andersson27-Mar-09 11:28
professionalJörgen Andersson27-Mar-09 11:28 
GeneralRe: Highlight and Select Row (clicking anywhere on it) Pin
alvarog0127-Mar-09 11:36
alvarog0127-Mar-09 11:36 
Thanks for the tip.

Meanwhile i found the way. Here is my code if anyone is curious about it:

protected void gvUsuarios_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "Select")
        {
            GridViewRow gvr = ((GridViewRow)((LinkButton)((GridViewCommandEventArgs)e).CommandSource).Parent.Parent);
            gvUsuarios.SelectedIndex = gvr.RowIndex;
        }
    }

    protected void gvUsuarios_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        GridViewRow gvr = ((GridViewRowEventArgs)e).Row;
        if (gvr.RowType == DataControlRowType.DataRow)
        {
            if (gvUsuarios.EditIndex < 0)//if (gvUsuarios.SelectedIndex > -1)
            {
                LinkButton button = (LinkButton)gvr.Cells[1].Controls[1];
                if (button != null)
                {
                    gvr.Attributes["onclick"] = ClientScript.GetPostBackClientHyperlink(button, "");
                }
            }
            if (gvr.RowIndex == gvUsuarios.SelectedIndex)
            {
                gvr.Attributes.Add("onmouseover", "highlightRow(this, '#B0FF62')");                
                gvr.Attributes.Add("onmouseout", "dehighlightRow(this, '" + ColorTranslator.ToHtml(gvUsuarios.SelectedRowStyle.BackColor) + "')");
            }
            else
            {
                gvr.Attributes.Add("onmouseover", "highlightRow(this, '" + ColorTranslator.ToHtml(Color.White) + "')");
                gvr.Attributes.Add("onmouseout", "dehighlightRow(this, '" + ColorTranslator.ToHtml(gvUsuarios.RowStyle.BackColor) + "')");
            }
        }
    }

QuestionComplete ASP.NET Website Template with Security/Roles/Membership etc. Pin
Jasmine Pomelo27-Mar-09 7:00
Jasmine Pomelo27-Mar-09 7:00 
AnswerMicrosoft Website Templates Pin
David Mujica27-Mar-09 7:43
David Mujica27-Mar-09 7:43 
QuestionAjax based web application breaks on html tag in text field Pin
meenakumar27-Mar-09 6:01
meenakumar27-Mar-09 6:01 
AnswerRe: Ajax based web application breaks on html tag in text field Pin
Yusuf27-Mar-09 6:11
Yusuf27-Mar-09 6:11 
QuestionAccessing dropdownlist in footer of gridview from javascript Pin
nainakarri27-Mar-09 5:57
nainakarri27-Mar-09 5:57 
AnswerRe: Accessing dropdownlist in footer of gridview from javascript Pin
Ibrahim Bello27-Mar-09 6:50
Ibrahim Bello27-Mar-09 6:50 
GeneralRe: Accessing dropdownlist in footer of gridview from javascript Pin
nainakarri27-Mar-09 7:57
nainakarri27-Mar-09 7:57 
GeneralRe: Accessing dropdownlist in footer of gridview from javascript Pin
Ibrahim Bello30-Mar-09 6:02
Ibrahim Bello30-Mar-09 6:02 
QuestionChanging GridView Column Header Pin
Ibrahim Bello27-Mar-09 5:13
Ibrahim Bello27-Mar-09 5:13 
AnswerRe: Changing GridView Column Header Pin
Ibrahim Bello27-Mar-09 8:23
Ibrahim Bello27-Mar-09 8:23 
QuestionModal pop up extender on click of radio button Pin
hozsam27-Mar-09 3:17
hozsam27-Mar-09 3:17 
AnswerRe: Modal pop up extender on click of radio button Pin
srividya0931-May-10 20:52
srividya0931-May-10 20:52 
Questionadd user control using fckeditor ? Pin
keyur satyadev27-Mar-09 3:01
keyur satyadev27-Mar-09 3:01 
AnswerRe: add user control using fckeditor ? Pin
Yusuf27-Mar-09 3:53
Yusuf27-Mar-09 3:53 
QuestionCaret disappears when tabbing Pin
Lonnie Raffray27-Mar-09 2:49
Lonnie Raffray27-Mar-09 2:49 
Questionresize calendar control Pin
meghamaharshi27-Mar-09 2:38
meghamaharshi27-Mar-09 2:38 
AnswerRe: resize calendar control Pin
Ravi Mori27-Mar-09 2:47
Ravi Mori27-Mar-09 2:47 

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.