Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Thursday, July 10, 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!
 Administration Forums - General Administration
Forum to discuss general administration topics for SalesLogix (including LAN & remote topics). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to General Administration | New ThreadView:  Search:  
 Author  Thread: FIltering DataGrid on Node Selection
venkata rambabu
Posts: 3
 
FIltering DataGrid on Node SelectionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Mar 08 6:02 AM
Hi,

This is rambabu I am creating Treview And I also FIltering datagrid based on nodesI got some problam That is Some of fields are display in grid when am i click nodes of particular account AM i use ing the code is shown below



option explicit
Sub TreeView()
Dim objCon
Dim strSQL
Dim objRS
Dim objNode0
Dim objNode

set objCon = Application.GetNewConnection
strSQL = "Select account, accountid,Division,ShippingId,CreateDate as Login, ModifyDate as Logout From Sysdba.account"
set objRS = objCon.Execute (strSQL)

TreeView1.Nodes.Clear
Set objNode0 = TreeView1.Nodes.Add(Nothing,"Account") 'This is the where the first level of the tree is created.
objNode0.tag = objRS.fields("accountid").value &""
with objRS
while not (.eof or .bof)
set objNode = TreeView1.Nodes.AddChild(objNode0, objRS.Fields("Account").Value & "") 'This then populates the values under the specified node
.MoveNext
Wend
.Close
End With
Set objRS = Nothing
End Sub

Sub AXFormCreate(Sender)

End Sub

Sub AXFormOpen(Sender)
DataGrid1.Refresh
TreeView()

End Sub

Sub TreeView1Change(Sender, ByRef Node)
Select Case Node.level
Case 1
call FilterGrid()'(" Account='" & Node.Text &"' ")

End Select
End sub



Sub FilterGrid()'(strWhere)
Dim strSQL
Dim DefaultSQL

DefaultSQL= "Select account,accountid,Division,ShippingId,CreateDate as Login,ModifyDate as Logout From Sysdba.account Where Account='Apost'"
'strSQL=DefaultSQL '& " WHERE " & strWhere

DataGrid1.SQL=DefaultSQL'strSQL

DataGrid1.Refresh
End Sub

Plesae help me how to rectify this problam?

With regrads

Rambabu
[Reply][Quote]
Matt Dockins
Posts: 159
 
Re: FIltering DataGrid on Node SelectionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Mar 08 4:19 PM
I may be wrong, but I've never seen anyone use this syntax before:

call FilterGrid()'(" Account='" & Node.Text &"' ")

End Select
End sub

Sub FilterGrid()'(strWhere)

I think it should actually read as follows:

call FilterGrid(" Account='" & Node.Text &"' ")

End Select
End sub

Sub FilterGrid(strWhere)
[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/10/2025 10:21:56 AM