Forums

selected row value to the text box

Last post 7/4/2009 10:32 AM by deepan c_1. 5 replies.
Sort Posts: Previous Next
  • deepan c_1

    selected row value to the text box

    6/29/2009 3:53 AM
    • Not Ranked
    • Joined on 6/20/2009
    • Posts 11

    hi  i am usint triyal version of DevExpress 9.1.4,vs 2008....i  have  an AspxGridview with colum names(Id,name,age) enable selecting =true .as same as i have 3 text boxs. in that same page.1st one is for display the  id,second one is for display a name 3rd one is diaply an age  ..  idisplay the selected Aspxgridview  Row  values into the each text box.i need full source code with example pls kind a note of it

    hii
  • Chazo Meyer

    Re: selected row value to the text box

    6/29/2009 4:55 AM
    • Top 500 Contributor
    • Joined on 4/15/2009
    • Posts 51

     Hi there,

    could you be more specific?

    You want to select some rows and then on some button click fill the 3 text boxes with the specific values from the Grid is that so?

     

  • deepan c_1

    Re: selected row value to the text box

    7/1/2009 12:59 AM
    • Not Ranked
    • Joined on 6/20/2009
    • Posts 11

    yes...thats what i want..could u help me pls ........

    hii
  • Kate (DevExpress Support)

    Re: selected row value to the text box

    7/1/2009 12:17 PM
    • Top 500 Contributor
    • Joined on 2/13/2008
    • Posts 37

     Hi:

    I believe you can handle the client-side Click event of the button, and iterate through all visible rows of the grid to check if they are selected. For the selected row, you can get required values using the GetRowValue method, and use these values according to your scenario.
    Here is the sample code:
     
     protected void ASPxButton1_Click(object sender, EventArgs e)
        {
            string[ fieldNames = {"CategoryID","CategoryName","Description"};
            for (int i = 0; i < ASPxGridView1.VisibleRowCount; i++)
            {
                if (ASPxGridView1.Selection.IsRowSelected(i))
                {
                    object val = ASPxGridView1.GetRowValues(i, fieldNames);
                }
            }
        }
    Thanks, Kate.
    Support Team, Developer Express Inc.

    P.S. If you wish to receive direct assistance from our Support Team, use Support Center.
  • deepan c_1

    Re: selected row value to the text box

    7/2/2009 5:51 AM
    • Not Ranked
    • Joined on 6/20/2009
    • Posts 11

    Hi kate  ,

    its working well,

    thank you,

    by

    deepan

     

     

     

     

     

     

    hii
  • deepan c_1

    Re: selected row value to the text box

    7/4/2009 10:32 AM
    • Not Ranked
    • Joined on 6/20/2009
    • Posts 11

    How to insert the new row in AspxGridView...using SqlDataSource?

    hii
More from DevExpress
Live Chat
Have a pre-sales question?
Need assistance with your evaluation?
We are here to help.
Chat is one of the many ways you can contact members of the DevExpress Team. We are available Monday-Friday between 8:30am and 5:00pm Pacific Time.
If you need additional product information, require pre-sales assistance, or want help with your order, write to us at info@devexpress.com or call us at
+1 (818) 844-3383.