Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, February 22, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Get Datagrid Rows values
Rafael S.
Posts: 66
 
Get Datagrid Rows valuesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Jun 11 9:19 AM
fiogf49gjkf0d

Hi All!


Could someone explain to me how can i get the datagrid row count and the values of the cells?


 


I remember in Vb6 that is something like


 


<p>datagrid.row =1

 

datagrid.cell(0).value

</p>


I tried the datagrid.nodes.items(0).values but dont work..


 


thanks all!

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Get Datagrid Rows valuesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Jun 11 9:35 AM
fiogf49gjkf0d

dgName.RecordSet.RecordCount


Where dgName is the name of your datagrid.

[Reply][Quote]
Rafael S.
Posts: 66
 
Re: Get Datagrid Rows valuesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Jun 11 9:42 AM
fiogf49gjkf0d

Thanks Mike!


 


And about to get the cell values?


 


Example:


 


I want to know the value of the 1 cell of the secont row.... can i do this?


 


thanks!

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Get Datagrid Rows valuesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Jun 11 9:50 AM
fiogf49gjkf0d

The grid's recordset is simply an ADO recordset. So, you can work through it as normal objRS = dgName.RecordSet and then objRS.Fields("NAME").Value for example.


If you want to know the highlighted value that's easier:


dgName.GetCurrentField("yourFieldNameAlias")

[Reply][Quote]
Rafael S.
Posts: 66
 
Re: Get Datagrid Rows valuesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Jun 11 9:53 AM
fiogf49gjkf0d

Thanks Mike,


 


But my problem is: i have a datagrid that i have to get the values of the 1 and the 3 cells of some rows...


 


but i cant get these values...


 


thanks!

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Get Datagrid Rows valuesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Jun 11 10:04 AM
fiogf49gjkf0d

Why not ?

[Reply][Quote]
Rafael S.
Posts: 66
 
Re: Get Datagrid Rows valuesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Jun 11 10:09 AM
fiogf49gjkf0d

I dont know how...Embarassed


 


my difficult is how to get the 2 cell of the 2 row... something like this..


 


 


 


 

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Get Datagrid Rows valuesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Jun 11 10:20 AM
fiogf49gjkf0d

Yes, and I can't tell you how with such a loosely defined question. There is no such thing as cell 2 of 2nd row. You need to iterate through the recordset and then, once landed on the right row, get the cell/column data.

[Reply][Quote]
Rafael S.
Posts: 66
 
Re: Get Datagrid Rows valuesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Jun 11 10:24 AM
fiogf49gjkf0d

Hi Mike!!


 


sorry for the noob question....rs...


i found what i need..


 


datagrid.nodes(1).Values(3)


 


With this, i get the 3 cell of the 1 row...


and shazam! works!!


 


thanks Mike!


 


 

[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: Get Datagrid Rows valuesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Jun 11 10:36 AM
fiogf49gjkf0d

Mike, I think by Cell he means Node, and yes, you can get the value of Node (1) [the 2nd cell of a row].....Node(0) is the left most visible column. We go after Node values often when we use oncustomdraw event handler's for a grid.

[Reply][Quote]
Gopinath Srinivasan
Posts: 37
 
Re: Get Datagrid Rows valuesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 Mar 13 12:27 AM
fiogf49gjkf0d

I have 2 data grid in a form. First one shows Master record. Second Grid supposed to populate member of the Master. To add the member of the master, highlight a row in Grid 1 and when I right click on Grid 2, the new window popup and should fillup with Master Number and Name from selected Grid 1 values.


 


Please help how to get the value of the selected row from Grid 1 to the new form


 


Thanks


 

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Get Datagrid Rows valuesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 Mar 13 4:08 AM
fiogf49gjkf0d

I select a grid, it does something, when I click somewhere else - it does something else - discuss.



Do you see the problem here? You are asking forum members to perform what appears to be a piece of actual work you've been asked to do - using theoretical models of what may/could/should happen.


It's not going to happen (hence why everyone else has ignored your other ramblings thus far).


Be more specific about what you have tried, what code is it that you need and what you actually want. Otherwise, the answer to your question is simply "yes - it can be done - using a variety of methods" depending on the purposes of what it is you are trying to achieve but given the specific background of the nature of what it is you are trying to do.


 

[Reply][Quote]
Gopinath Srinivasan
Posts: 37
 
Re: Get Datagrid Rows valuesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 Mar 13 10:29 PM
fiogf49gjkf0d

I am new to Saleslogix.  All I need to do is capture the ID and name from the highlighted row from the master grid and fill it in second form.How do I do that?


 


Please help

[Reply][Quote]
Gabriel Alvarez
Posts: 6
 
Re: Get Datagrid Rows valuesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Mar 13 7:23 AM
fiogf49gjkf0d

El evento se produce en el formulario principal, por lo tanto debes manejar los eventos ahi. Por otra parte, te recomiendo utilices variables globales para ir capturando el valor seleccionado de la grilla y mostrarlo en un segundo formulario. Saludos.


---


The event takes place on the main form, so you must handle the events there. Also, I recommend you use global variables to be capturing the selected value of the grid and display it in a second form. Greetings.

[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 2/22/2025 3:48:07 PM