How to use ComponentArt's snap and ajax grid

hi,

i tried going to componentart's own user forum, but hasn't gotten an answer.  the question is this:

1) the ajax grid that componentart provides allows you to do drag and drop of whole columns
2) the snap control allows you to do drag and drop of just a cell

is there anyway to combine the two capabilities?  for example, can i embed snap elements within an ajax grid so that now i can drag and drop each individual cell?

the source code for the two controls are available at:

http://www.componentart.com/webui/demos/demos_control-specific/grid/features/ajax_grid/webform1.aspx

http://www.componentart.com/webui/demos/demos_control-specific/snap/features/core_features/webform1.aspx

thanks.
mmingfeilamAsked:
Who is Participating?
 
rdivilbissConnect With a Mentor Commented:
Just looking at the code for the grid....the "cells" are being populated from callbacks, such as:

<nobr>## DataItem.GetMember('StartedBy').Value ##</nobr>

To fill that cell with a snap item, would require the code and data for the snap item.

e.g. something like:

<nobr><ComponentArt:Snap id="Snap1" runat="server"
       MustBeDocked="True"
       DraggingStyle="GhostCopy"
       DockingStyle="TransparentRectangle"
       DockingContainers="ParentSnapDock"
       CurrentDockingContainer="ParentSnapDock"
       CurrentDockingIndex="1"
       CollapseDuration="300"
       ExpandDuration="300"
       IsCollapsed="false"            
       Height="70" Width="160" >
     <Header>
       <table cellSpacing="0" cellPadding="0" width="100%" border="0">
         <tr>
           <td class="SnapHeader" style="cursor:default;">## DataItem.GetMember('Header').Value ##</td>
           <td width="10" style="cursor: hand" align="right"><img onclick="Snap3.toggleExpand();" src="images/i_open.gif" width="22" height="19" border="0"></td>
         </tr>
       </table>
     </Header>
     <CollapsedHeader>
       <table cellSpacing="0" cellPadding="0" width="100%" border="0">
         <tr>
           <td class="SnapHeaderClosed" style="cursor:default;">## DataItem.GetMember('Header').Value ##</td>
           <td width="10" style="cursor: hand" align="right"><img onclick="Snap3.toggleExpand();" src="images/i_closed.gif" width="22" height="19" border="0"></td>
         </tr>
       </table>
     </CollapsedHeader>
     <Content>
       <table class="SnapContent" width="100%" cellpadding="0" cellspacing="0" border="0">
       <tr>
         <td class="maintext"></td>
       </tr>
       <tr>
         <td class="maintext">## DataItem.GetMember('CellContent').Value ##<img src="images/bullet.gif" width="13" height="13" border="0">&nbsp;Visual C++</td>
       </tr>
         </table>
     </Content>
     <Footer>
       <img height="2" src="images/clear.gif" border="0">
     </Footer>
     </ComponentArt:Snap>

And of course you would need to initialize the Snap and Grid components verry carefully to get the correct ID's in the right places.

If it works, it is going to be a huge amount of code, and extremely fragile.

FWIW, I haven't tried to do this.
0
All Courses

From novice to tech pro — start learning today.