Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Sunday, July 6, 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: How to focus on a row in datagrid?
Harendra Sinha
Posts: 66
 
How to focus on a row in datagrid?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 Jan 09 3:00 PM
Hi ,
Is there any way to focus on a particular row in the datagrid of SalesLogix?
Suppose, I have 10 rows and i am editing row# 4.
I want this row selected after refreshing the grid.

Appreciate any help.

Thanks,
Harendra
[Reply][Quote]
Harendra Sinha
Posts: 66
 
Re: How to focus on a row in datagrid?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 Jan 09 3:58 PM
I have tried to set the 'Selected' property = True as follows..

datagrid1.Nodes(3).Selected = True 'row#4

BUT,it is not working
[Reply][Quote]
Stainless Steel Snake
Posts: 32
 
Re: How to focus on a row in datagrid?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Feb 09 6:53 AM
You can select row with following code:
DataGrid1.Selection.Clear
DataGrid1.Selection.Add(KeyFieldValue)

But this works only if DataGrid's Sortable property set on True.

And you may use this code for select row by it's number:

Dim WScript, i, NumberOfRow

If Not Datagrid1.Focused Then DataGrid1.SetFocus
Set WScript = Application.CreateObject("WScript.Shell")

For i=0 To NumberOfRow-1
WScript.SendKeys "{DOWN}"
Next
Set WScript = Nothing
[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: How to focus on a row in datagrid?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Feb 09 8:44 AM
Quote:
Originally posted by Stainless Steel Snake

You can select row with following code:
DataGrid1.Selection.Clear
DataGrid1.Selection.Add(KeyFieldValue)

But this works only if DataGrid's Sortable property set on True.

And you may use this code for select row by it's number:

Dim WScript, i, NumberOfRow

If Not Datagrid1.Focused Then DataGrid1.SetFocus
Set WScript = Application.CreateObject("WScript.Shell")

For i=0 To NumberOfRow-1
WScript.SendKeys "{DOWN}"
Next
Set WScript = Nothing


Is there a property/reference to a
gridname.Selection.Item(I) Node/Field/Column?

Thanks!
[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: How to focus on a row in datagrid?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Feb 09 8:45 AM
Quote:
Originally posted by Stainless Steel Snake

You can select row with following code:
DataGrid1.Selection.Clear
DataGrid1.Selection.Add(KeyFieldValue)

But this works only if DataGrid's Sortable property set on True.

And you may use this code for select row by it's number:

Dim WScript, i, NumberOfRow

If Not Datagrid1.Focused Then DataGrid1.SetFocus
Set WScript = Application.CreateObject("WScript.Shell")

For i=0 To NumberOfRow-1
WScript.SendKeys "{DOWN}"
Next
Set WScript = Nothing


Is there a property/reference to a
gridname.Selection.Item(I) Node/Field/Column?

Thanks!
[Reply][Quote]
Stainless Steel Snake
Posts: 32
 
Re: How to focus on a row in datagrid?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Feb 09 10:14 AM
Quote:
Originally posted by RJ Samp


property/reference to a
gridname.Selection.Item(I) Node/Field/Column?
Thanks!

I'm not sure what you mean...

GridName.Selection.Item(i) contains value of DataGrid's Key Field for selected row.
If you wanna access to selected node, you should use GridName.SelectedNodes.Item(i) .
If you wanna get value for any field in selected row, then use GridName.GetFieldValue(GridName.Selection.Item(i), FieldName) .
[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: How to focus on a row in datagrid?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Feb 09 12:31 PM
Quote:
Originally posted by Stainless Steel Snake


If you wanna get value for any field in selected row, then use GridName.GetFieldValue(GridName.Selection.Item(i), FieldName) .


And that would be the answer!

THANKS!!!!
[Reply][Quote]
Leon Gort
Posts: 127
 
Re: How to focus on a row in datagrid?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Feb 09 5:06 PM
GridName.GetFieldValue(GridName.Selection.Item(i), FieldName)
I needed to do this today and here was my answer in my inbox - Thanks! I did need to add the key field to the layout before mine worked though.

Cheers,
Leon

[Reply][Quote]
Guy Barrett
Posts: 63
 
Re: How to focus on a row in datagrid?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 21 Jul 09 11:29 AM
I am using Saleslogix 7.2.2 and...

grdCat.Refresh
grdCat.Selection.Clear
grdCat.Selection.Add strID

Does not highlight any rows, even with the "Sortable" property checked.

When the grid refreshes it seems to highlight the first row in the grid by default and then does nothing. Any clues? Pressing an imaginary down key using the shell object works, but is far from ideal.

Has anyone had any more luck with this?
[Reply][Quote]
Ken Poggensee
Posts: 71
 
Re: How to focus on a row in datagrid?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Sep 10 2:27 PM
Check out the post above and make sure you got ur id field in the layout. You can go into the columns and hide it again, but it wont work if you do not have it in there. That was my issue when I went through the post anyways...
[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): 7/6/2025 11:06:00 AM