Click here to Skip to main content
12,244,103 members (51,154 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# ASP.NET DevExpress
hi everyone
i useing devexpress tools
and i do allow selection single row = true
how i can in aspxgridview when user select row
get value of columns in this row and add to text box
when select
ok
thanks for any help
Posted 3-Apr-11 5:53am

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Processed (Answered) by DevExpress Team at 04/03/2008 21:42:45

Hi Emmanuel,

You have found an article devoted to the old ASPxGrid and Editors Library Suite. Since you are using the ASPxGridView and Editors Library, you should use another approach.

The ASPxGridView provides the GetRowValues client side method which will allow you to obtain a certain row values. This method is described in our documentation:

ASPxClientGridView Members

Here is some sample code showing how to obtain a row value:

[JScript]
function Button1_onclick() {
ASPxGridView1.GetRowValues("CategoryID;CategoryName", OnGetRowValues);
}

function OnGetRowValues(result) {
for(var i = 0; i < result.length; i ++)
for(var j = 0; j <result[i].length; j++) {
alert(result[i][j]);
}
}

Thanks,
Plato
  Permalink  
Comments
mostafa.elsadany 3-Apr-11 11:46am
   
thanks
but i think there is way by client side event
in selection changed
function(s, e) {
document.forms[0].txtm.value=e.GetRowValues(e.GetFocusedRowIndex(), 'id', OnGetRowValues);

}
but i have some error
thanks for your help
and i hope if you understand me and you know what is my error in this
client side event plz tell me
and thanks again for your help
mostafa.elsadany 3-Apr-11 14:05pm
   
do you know how i can add this code
to client side events
txt.Text = ASPxGridView1.GetSelectedFieldValues("id")[0].ToString();

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160426.1 | Last Updated 13 Sep 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100