Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Questions on Lanes in Timeline widget

    Hi,

    I have 2 questions on Lanes in Timeline widget:

    1. Trying to figure out how to sort based on Lane field. Is it supported.?

    2. Trying to figure out how to define a style class for Lanes (we need to have different background colors based on lane type). Is it supported?

    Thanks!

    Sarkis

    #2
    1. We're not sure what you mean by this - can you expand on your use-case?

    2. We've just added two attributes to the Lane class - styleName and fieldStyleName - you can set these to stateful CSS styles that affect the main body cells and the frozen lane-field cells respectively. You can test those out in builds of 6.1 date January 17 and later.

    Comment


      #3
      1. We have a large number of entities in Lanes and we're also displaying more than one column, such as entity Name and Status and users want to be able to sort on Name or Status, similar to how they would do in a ListGrid.

      2. Will download and try these out - thank you!

      Sarkis

      Comment


        #4
        Ok - styles work now - thank you!

        Can you help with sorting too? Client side sorting on Lane fields will be very helpful.

        Thanks!

        Sarkis

        Comment


          #5
          CalendarViews are ListGrid extensions - so you can call getTimelineView().setSort(), or provide initialSort in config, for example.

          Comment


            #6
            Note that, if you want users to be able to sort by clicking the LaneField headers, you'll need to provide canSort: true for the timelineViewProperties AutoChild and apply canSort: true also to each LaneField

            Comment


              #7
              Thanks for you help - I did the following

              ListGrid timelineProps = new ListGrid();
              timelineProps.setCanSort(true);
              timeline.setAutoChildProperties("timelineView", timelineProps);

              And columns are now sortable - did not need to even set canSort on individual fields.

              One(relatively minor) issue still persists - I am unable to force the widget to show initial sort condition.
              I tried timelineProps.setInitialSort() and setSort().
              I also tried adding onDrawHandler to Timeline widget where I do timeline.getTimelineView().setSort()

              But nothing works...

              Thanks!
              Sarkis

              Comment


                #8
                We're seeing setInitialSort() and setSortField() both work.

                If those don't work for you, please provide your Timeline source - possibly other settings are causing issues.

                Comment


                  #9
                  Found an issue in my code while stripping it down to reproduce - so basically user error. setInitialSort() works for me too now.

                  Thank you!

                  Sarkis

                  Comment


                    #10
                    Hi,

                    Unfortunately, we ran into another issue with sorting lanes. It looks like it's sorting lanes only and leaves corresponding timeline rows untouched.
                    I implemented a workaround like this:

                    ListGrid timelineProps = new ListGrid();
                    timelineProps.setCanSort(true);
                    timelineProps.addSortChangedHandler(new SortChangedHandler()
                    {
                    @Override
                    public void onSortChanged(SortEvent event)
                    {
                    updateTimeline();
                    }
                    });
                    timeline.setAutoChildProperties("timelineView", timelineProps);

                    Where update() reloads CalendarEvents from the server. And it's working fine. But I think this should be handled automatically.

                    Thanks!

                    Sarkis

                    Comment


                      #11
                      Hi,

                      Just discovered that newly added Lane.setFieldStyleName works on Chrome but not on IE11.
                      Can you please check.

                      Thanks!

                      Sarkis

                      Comment


                        #12
                        We were not able to reproduce this issue, but if you still see it, we are going to need a sample code to test it.

                        Regards
                        Isomorphic Software

                        Comment

                        Working...
                        X