Can someone tell me the syntax to dynamically populate a SalesLogix data grid?
I have a custom Account tab/grid that shows records from a custom table. I want to put a datagrid on the Add/edit form for that tab that I can populate with a record set from the USERINFO table.
I know that this task should be pretty easy, but I don’t know the syntax to get the record set and use it to populate the data grid.
You can use a recordset (dgGrid.Recordset = rsRecordSet, I believe). However, I generally use the SQL property.
dgGrid.SQL.Text = “SELECT FirstName, LastName FROM UserInfo”
This implies that you’ve configured the Columns property through the Property window. Many times, you may even want to manage the columns via code… which is the route I often go. Ryan Farley has an excellent article on this: http://www.slxdeveloper.com/page.aspx?id=35&articleid=26 If you’re struggling with recordset syntax, you should be able to google something like “vbscript recordset tutorial” or even look at existing forms within SalesLogix. Also, you can add the System:SLX Database Support script via “Include Script”. This include script has a class that simplifies some database tasks.