Announcement

Collapse
No announcement yet.

Grid.SetUnhideColumn and Grid.SetHeaderSort broken?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Grid.SetUnhideColumn and Grid.SetHeaderSort broken?

    Hi! I added a Grid to show some messages stored in a SQLite3 DB. But when I set Grid.SetUnhideColumn to true or false I can still unhide columns with a width of 0 with clicking and draging. But this should disable it?

    And I set Grid.SetHeaderSort but it does not seem to do anything (helpfile says: "Sets whether or not rows are sorted on column header clicks when in list mode in a grid object.". Listmode is active.

    Code:
    -- Grid Config
    Grid.SetColumnHiding("MessageGrid", false);
    Grid.SetListMode("MessageGrid", true);
    Grid.SetSingleRowSelection("MessageGrid", true);
    Grid.SetSingleColumnSelection("MessageGrid", false);
    Grid.SetHeaderSort("Grid", true);
    --Grid.SetFixedColumnSelection("MessageGrid", false);
    Grid.SetUnhideColumn("MessageGrid", false);
    
    
    -- Header
    Grid.SetCellText("MessageGrid", 0, 0, "NEU", true);
    Grid.SetCellText("MessageGrid", 0, 1, "Datum", true);
    Grid.SetCellText("MessageGrid", 0, 2, "Verfasser", true);
    Grid.SetCellText("MessageGrid", 0, 3, "Telefon", true);
    Grid.SetCellText("MessageGrid", 0, 4, "Nachricht", true);
    -- Neu: ID zum auslesen
    Grid.SetCellText("MessageGrid", 0, 5, "ID", true);
    
    
    -- Breite: 677
    Grid.AutoSizeColumns("MessageGrid", GVS_DEFAULT, true);
    Grid.SetColumnWidth("MessageGrid", 1, 100, true);
    Grid.SetColumnWidth("MessageGrid", 2, 200, true);
    Grid.SetColumnWidth("MessageGrid", 3, 150, true);
    Grid.SetColumnWidth("MessageGrid", 4, 215, true);
    --Grid.ExpandLastColumn("MessageGrid", true);
    Grid.SetColumnWidth("MessageGrid", 5, 0, true);
    Bl4ckSh33p-Soft - Custom Software and Indie Games

  • #2
    The column thing is natural behavior for LustView type objects you can delete the column then add it again when needed to avoid that behavior. Column sorting does work and it's very responsive so I think you have not set it properly.

    Comment


    • #3
      Hi. I did not use the object often. Do you know if there are other things you need to do for sorting (add code for onSelection)? I thought enabling Grid.SetHeaderSort is enough for simple sorting (Ascending/Descending). The helpfile says "Sets whether or not rows are sorted on column header clicks when in list mode in a grid object."

      So if I delete all columns and rows and add them with actions Grid.SetUnhideColumn should work? I have one fixed row as default for the headers. The helpfile does not give many detail sabout it, only "Sets whether or not 0 width columns can be resized by the user via mouse in a grid object." but this does not seem to work if you have a default fixed row.
      Bl4ckSh33p-Soft - Custom Software and Indie Games

      Comment

      Working...
      X