May 4, 2001 #1 DeepBlerg Technical User Jan 13, 2001 224 AU Hi, how would i sort data in rows numerically in a datagrid depending on data in one coloumn? thanks.
Hi, how would i sort data in rows numerically in a datagrid depending on data in one coloumn? thanks.
May 7, 2001 #2 ICET Programmer Nov 29, 2000 6 NL Hi Deepblerg I do it like this. Adodc1 is a adodc datacontrol connected to a database. The datagrid is set like this: Set Datagrid1.DataSource = Adodc1 Than you can sort every column in a wanted direction up or down like this: With Adodc1.Recordset .Sort = .Fields(ColChosen).Name & " ASC" End With Colchosen is the selected column. or down with: .Sort = .Fields(ColChosen).Name & " DESC" Hope this works for you (I use VB6/Access2000 database) ICET Upvote 0 Downvote
Hi Deepblerg I do it like this. Adodc1 is a adodc datacontrol connected to a database. The datagrid is set like this: Set Datagrid1.DataSource = Adodc1 Than you can sort every column in a wanted direction up or down like this: With Adodc1.Recordset .Sort = .Fields(ColChosen).Name & " ASC" End With Colchosen is the selected column. or down with: .Sort = .Fields(ColChosen).Name & " DESC" Hope this works for you (I use VB6/Access2000 database) ICET