Can I auto span cells?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sandyisgreat
    New Member
    • Jul 2010
    • 4

    Can I auto span cells?

    Hello All,

    I have developed an application with drag and drop functionality where I am dragging elements from one table to another.

    My problem is that if I want to span certain element for two columns or rows or both, is it possible?
    I can't think of any idea to make this. Can the border of cells be dragged and cells hide?

    I appreciate an existing code for this.

    Thank You
    Sandy
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5388

    #2
    what is the exact problem you have? of course - you could select two cells - for example click one and handle it as selected. when you click while the ctrl-button (or whatever other button) is pressed select the next one - now the cells might have a custom attribute stating that they are selected -> when now dragging just remove both of the selected nodes and add it to the drop-area together ...

    you could even implement a select mode for rows and/or cells - which would add checkboxes or similar to mark the rows/cells for dragging ...
    Last edited by gits; Jul 28 '10, 03:42 PM.

    Comment

    • Sandyisgreat
      New Member
      • Jul 2010
      • 4

      #3
      Hello Gits
      Thanks for your reply.
      My problem is, I am dragging a content in a table. while dropping it my client wants that it should give flexibility to span the element(textbox , checkbox whtever). that is it should be able to span for more than one cell.

      How can I do that?

      I thought of calling a promptbox asking for span of the column but it adds a new cell at the end of the row...and somehow changes total cellindex.

      Please suggst with a piece of code
      thank you again
      Sandy

      Comment

      • gits
        Recognized Expert Moderator Expert
        • May 2007
        • 5388

        #4
        that is to vague for me to get it ... could you please exactly describe what the usecase is? what is content, where is it dragged from and where and how should it be dropped?

        Comment

        • Sandyisgreat
          New Member
          • Jul 2010
          • 4

          #5
          Hello Gits,

          I have a table(Source_ta ble) on top where i have fields..for now consider only textboxes in the cells of this table.
          These text boxes i am dragging in a table(target_ta ble) below with empty cells.
          This i am done using some existing scripts and my own input to it.Refer this http://www.redips.net/javascript/dra...table-content/
          Now my problem is that the client wants some of the text boxes to span more cells of the target_table while drop.

          Hope you get it now.
          Let me know if you want any more input.
          Thanks

          Comment

          • gits
            Recognized Expert Moderator Expert
            • May 2007
            • 5388

            #6
            so as i understand it - you have one cell and the drop-table has a row with 3 cells for example. now you want to drag the cell to the target and while dropping 2 cells for example should be united and the dropped item should fill that area?

            how should that work from a UI side of view? if it would be 2 cells it would be quite simple to define a mouseover area between them ... when moving the mouse over that area the logic for cell-combining could be triggerd. when it are 3 or more cells ... how should that work? you might open a dialog and ask for the number that should be combined.

            to span the cols you would need to create a new table fragment ... then remove the old one and add the new instead with the added dropped node inside.

            Comment

            Working...