Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, November 23, 2024 
 
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 - Controls
Forum to discuss usage & tips for SalesLogix controls and other 3rd party ActiveX controls. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to Controls | New ThreadView:  Search:  
 Author  Thread: Datagrid and the sortable property
Michael Litman
Posts: 94
 
Datagrid and the sortable propertyYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Mar 07 12:17 AM
fiogf49gjkf0d
Hi all,

I have a datagrid I am populating dynamically so it will not set the sortable property at design . I have tried it in the code in many locations as you can see in this code. It is a sub routine for datagrid population. It follows Ryans code but i've customized it for our install:

Sub PopUDataGrid(sSql)
Dim fld, col, i, rsTest

if (grdTest.Columns.Count > 0) then
for i = 0 to grdTest.Columns.Count - 1
grdTest.Columns.Item(0).Delete
next
end if

' grdTest.Sortable = True ' First Test Location
grdTest.sql.Text = sSql
' grdTest.Sortable = true ' Second Test Location
grdTest.Refresh
grdTest.Sortable = true ' Third Test Location
set rsTest = grdTest.recordset

for each fld in rsTest.Fields
set col = grdTest.Columns.add(fld.type)
col.FormatType = 0
col.FieldName = fld.name
col.caption = fld.name
if fld.name = "AccountID" then
col.caption = "Account#"
col.width = 75
elseif fld.name = "accountname" then
col.caption = "Account Name"
col.width = 250
elseif fld.name = "BAOID" then
col.caption = "BackUpAdminId"
col.width = 85
elseif fld.name = "AOName" then
col.caption = "Administrator"
col.width = 150
elseif fld.name = "OrganizationID" then
col.caption = "Org ID"
col.width = 40
elseif fld.name = "RelationshipID" then
col.caption = "RelID"
col.width = 60
elseif fld.name = "AccountStatus" then
col.Caption = "Account Status"
col.width = 50
elseif fld.name = "STARTTIME" then
col.caption = "Time of Import"
col.width = 135
end if
next

' grdTest.Sortable = True ' Last Test Locations
grdTest.ReadOnly = True
grdTest.RowSelect = True
grdTest.refresh
set rsTest = nothing
End Sub


The grid is still not sortable

Thanks for the help ML
[Reply][Quote]
RJ Eaton
Posts: 234
 
Re: Datagrid and the sortable propertyYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Mar 07 10:41 AM
fiogf49gjkf0d
You have the RowSelect marked True.. You can't have it sortable with the row select = true
[Reply][Quote]
Michael Litman
Posts: 94
 
Re: Datagrid and the sortable propertyYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Mar 07 1:49 PM
fiogf49gjkf0d
Thanks for the tip RJ, but no joy! The grid is still un-sortable unless I do it in script with pick lists and code. Anything else I need to be doing to get the sortable property to work properly? Thanks ML
[Reply][Quote]
RJ Eaton
Posts: 234
 
Re: Datagrid and the sortable propertyYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Mar 07 1:57 PM
fiogf49gjkf0d
You have this........

grdTest.Sortable = True ' Last Test Locations
grdTest.ReadOnly = True

grdTest.RowSelect = True

grdTest.refresh
set rsTest = nothing
End Sub


in your code you posted.. if you change this to = False then the sort should work
[Reply][Quote]
Doug Miller
Posts: 20
 
Re: Datagrid and the sortable propertyYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Mar 07 7:51 AM
fiogf49gjkf0d
Specify the grdTest.Keyfield property (probably should be accountid)
[Reply][Quote]
Michael Litman
Posts: 94
 
Re: Datagrid and the sortable propertyYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Mar 07 8:38 AM
fiogf49gjkf0d
Thanks you guy's that did the trick ML
[Reply][Quote]
Timmus Agersea
Posts: 328
 
Re: Datagrid and the sortable propertyYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Mar 07 10:38 PM
fiogf49gjkf0d
Just to ensure folks are not misinformed: RowSelect has nothing to do with a grid being sortable.

Timmus
[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 © 2024 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): 11/23/2024 2:35:50 AM