Announcement

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

    List Grid Editor

    1.a Is there a way to override the form that is used when a user edits a grid?
    1.b or is there a way to draw, when entering edit mode, a toolstrip rendered below the editing record.

    I am trying to create a number of buttons, for example "copy", "delete", "etc.." for each record that is being edited, and want the buttons to appear within the editor or close by. I assume that if i can override or dynamically create the form + toolstrip buttons when editing a listgrid record i could be able to add the buttons.

    Alternatively is it possible to dynamically draw the toolstrip of buttons at the position of the record, directly below the editing record on right or left.

    //success so far
    I am able to create a toolstrip and hide/show it using overrides to the editorEnter and endEditing methods, however i am unable to find how to get a reference to the bottom left corner (let's say), of the currently rendered/editing record.

    #2
    Hi mgscott,

    You can calculate the position of a record by grid.getPageTop() + headerHeight + rowNum*cellHeight - body scrollTop.

    An alternative approach would be to add some columns that contain buttons/links that perform these actions.

    Comment


      #3
      Thanks

      got something workable with the height+etc....

      Another question, how would i force a specific item, in this case a toolstrip, to redraw it'self if window status changes? for example, having now created a toolstrip which is placed on screen where i require, if i resize the window it stays where it was drawn.

      Possible?

      Comment


        #4
        Hi mgscott,

        One way to handle this is to override resizeBy on the grid, call Super, and recalculate positioning at that time.

        Be sure that your resizeBy override returns the result of the call to Super (common mistake).

        Comment

        Working...
        X