7/10/2025 9:30:34 AM
|
|
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!
Forum to discuss general administration topics for SalesLogix (including LAN & remote topics). View the code of conduct for posting guidelines.
|
|
|
|
FIltering DataGrid on Node Selection
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 |
|
|
|
Re: FIltering DataGrid on Node Selection
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) |
|
|
|
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!
|
|
|
|
|
|
|
|