Web Connection
HtmlDataGrid Sorting
Gravatar is a globally recognized avatar based on your email address. HtmlDataGrid Sorting
  Rodney
  All
  Feb 24, 2016 @ 05:34am
Hi Rick

Using WC6 when making a column sortable and clicking on it the same 1st row is repeated in all rows in the grid (accross all pages).

Not sure if this is a WC6 issue or something I'm doing.

Thanks

Cheers
Rodney

Gravatar is a globally recognized avatar based on your email address. Re: HtmlDataGrid Sorting
  Rick Strahl
  Rodney
  Feb 24, 2016 @ 04:13pm

Are you talking about the wwHtmlHelpers and the HtmlDataGrid() function?

+++ Rick ---


Hi Rick

Using WC6 when making a column sortable and clicking on it the same 1st row is repeated in all rows in the grid (accross all pages).

Not sure if this is a WC6 issue or something I'm doing.

Thanks

Cheers
Rodney


Rick Strahl
West Wind Technologies

Making waves on the Web
from Hood River

Gravatar is a globally recognized avatar based on your email address. Re: HtmlDataGrid Sorting
  Rodney
  Rick Strahl
  Feb 24, 2016 @ 07:28pm
Yes using wwHtmlHelpers


Are you talking about the wwHtmlHelpers and the HtmlDataGrid() function?

+++ Rick ---


Hi Rick

Using WC6 when making a column sortable and clicking on it the same 1st row is repeated in all rows in the grid (accross all pages).

Not sure if this is a WC6 issue or something I'm doing.

Thanks

Cheers
Rodney


Gravatar is a globally recognized avatar based on your email address. Re: HtmlDataGrid Sorting
  Rick Strahl
  Rodney
  Feb 25, 2016 @ 01:51am
Hmmm... I don't see it not working.

if you're using Version 6 can you try the Paged Album Demo and add sorting to one or more of the columns (loColumn.Sortable/SortExpression)? That works for me.

loColumn = loConfig.AddColumn("Title","Album")
loColumn.Sortable = .T.
loColumn.SortExpression ="Upper(Title)"

loColumn = loConfig.AddColumn("ArtistName","Artist Name")
loColumn.Sortable = .T.
loColumn.SortExpression ="Upper(ArtistName)"
loConfig.AddColumn("Year","Year Released","N")

+++ Rick ---



Yes using wwHtmlHelpers


Are you talking about the wwHtmlHelpers and the HtmlDataGrid() function?

+++ Rick ---


Hi Rick

Using WC6 when making a column sortable and clicking on it the same 1st row is repeated in all rows in the grid (accross all pages).

Not sure if this is a WC6 issue or something I'm doing.

Thanks

Cheers
Rodney





Rick Strahl
West Wind Technologies

Making waves on the Web
from Maui

Gravatar is a globally recognized avatar based on your email address. Re: HtmlDataGrid Sorting
  Phil Sherwood
  Rick Strahl
  Aug 16, 2017 @ 01:13pm

I was having the same problem. Just figured out it was because I had the alias.fieldname format when building my columns. You can't use the alias of your cursor when building the grid or when you sort it will scan through the sort cursor but put the 1st record of the original cursor in the grid for every record.

Hope this helps someone else.

-Phil

Gravatar is a globally recognized avatar based on your email address. Re: HtmlDataGrid Sorting
  Rick Strahl
  Phil Sherwood
  Aug 17, 2017 @ 08:37am

Yes - sorting basically creates a new cursor, so the alias will be different.

+++ Rick ---

© 1996-2024