Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Wednesday, August 27, 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: Highlight datagrid row based on textbox value
SLX_Novice
Posts: 246
 
Highlight datagrid row based on textbox valueYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Dec 08 10:42 AM
Hi all.

I have a textbox where the end user enters an item. The textbox use the OnChange event to populate a combobox, this combo box lists all the contracts the item appears on. Once the user selects the contract the combo box OnChange event populates a datagrid.

The datagrid lists all of the items (including the one entered in the textbox) that are associated with the contract chosen in the combo box.

How can I get the datagrid to highlight the row that lists the item entered in the textbox by the end user?

Thank you in advance!
[Reply][Quote]
Carl Seagren
Posts: 1
 
Re: Highlight datagrid row based on textbox valueYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Dec 08 10:21 AM
You can use the onCustomDrawCell event for this.
I found another function on here called GetColumnIntexByField Name which I use for this as well.

Here's a sample.
vItem holds the value of the Column for the Item associated to the contract


Sub grdContractCustomDrawCell(Sender, ByRef Node, ByRef Column, IsSelected, IsFocused, ByRef Text, ByRef Color, ByRef Alignment, ByRef Font, ByRef FontColor)
Dim vItem
vtItem = grdContract.Nodes(Node.Index).Values(GetColumnIndexByFieldName(grdContract, "Item"))

If vItem = textbox.text Then
Color = "&HE2E2E2"
End If
End Sub


Function GetColumnIndexByFieldName ( ByRef Grid, ByVal FieldName )
Dim i
Dim lColumnIndex

lColumnIndex = -1
For i = 0 To Grid.Columns.Count - 1
If UCase ( Grid.Columns(i).FieldName ) = UCase ( FieldName ) Then
lColumnIndex = i
Exit For
End If
Next
GetColumnIndexByFieldName = lColumnIndex
End Function
[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): 8/27/2025 8:00:07 PM