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!
|
|
Tree View populating a datagrid
Posted: 16 Aug 06 3:09 PM
|
fiogf49gjkf0d I am looking to create a form very similar to the Add Opportunity Products form.. A tree form on the right when 2x clicked populates the DG..
I can get the correct ID so I can get the data from my SQl statement however I can't get it to populate the grid..
I am looking at the SLX form and see the piece of code where they add the new recordset to the grid.. I have this passing the correct statment, right data.. just can't get it to populate the grid.. comes with no columns.. any hints on populating the Dg from a tree..
|
|
|
|
Re: Tree View populating a datagrid
Posted: 17 Aug 06 1:14 AM
|
fiogf49gjkf0d Cleanest way to populate a grid at run-time is to create a recordset (disconnect the recordset if this is a read-only grid) and then update the grid's recordset.
In response the grid will do a refresh, so no need to explicitly code the refresh yourself.
set oGrid.Recorset = oRS
Todd Hardin |
|
|
|
Re: Tree View populating a datagrid
Posted: 17 Aug 06 8:49 AM
|
fiogf49gjkf0d Todd, thanks for that.. seems I have created the rs and added it to the grid however it is not displaying the results.. I have checked and there is a data return from the rs as I can put the fields in a msgbox, but they still are not showing in the grid..
Do I need to set the bind id..? |
|
|
|
Re: Tree View populating a datagrid
Posted: 18 Aug 06 3:14 AM
|
fiogf49gjkf0d Do you have the correct keyfield defined?
Did you include that KeyField as a column in the grid? (you can set the column to hidden)
|
|
|
|
Re: Tree View populating a datagrid
Posted: 18 Aug 06 7:42 AM
|
fiogf49gjkf0d Todd,
That was the issue. The other issue I faced was getting a second row in the grid.. I realized I needed a "Union" statement so I could add to the grid.
Thanks for all the help
Rich |
|
|
|
Re: Tree View populating a datagrid
Posted: 25 Aug 06 2:13 PM
|
fiogf49gjkf0d Where does the "Union" go in the statement? I am experiencing the same issue. I get values but they do not display in the grid. My recordset has data based on the msgbox. Apparently I had deleted the definition of my datagrid so I thought if I added that back in I would have data displayed. That does not appear to be the case so now I'm wondering if it has something to do with the UNION clause missing in the statement. Thanks, in advance! |
|
|
|