[SOLVED] [1.0] ColumnTree Help
New Community Forums available at http://forums.ext.net
 

Coolite Forums

Welcome Guest ( Login | Register )
 
«««123
[SOLVED] [1.0] ColumnTree Help
Subscribe
Last Login: 7/5/2010 10:10:13 AM
Posts: 7,853,
Posted 3/11/2010 2:25:52 PM

Group: Core Development Team
Hi,

Use the following code

<Html>
    <tpl if="Ext.isDefined(values.Available)">
          ....
    </tpl>
</Html>


Also see the following example which demonstrates XTemplate functionality
http://examples.coolite.com/?/Miscellaneous/XTemplate/Overview/

--
Vladimir Shcheglov
Coolite Inc.
Development Team
Forum Guidelines | Coolite Examples | Coolite API Docs | ExtJS API Docs | Twitter
Last Login: 6/17/2010 4:30:38 PM
Posts: 1,239,
Posted 3/11/2010 4:38:54 PM

Group: Coolite Premium Member & Early Adopter
vladsch (3/11/2010)
Hi,

You need to use TreeGrid. Its TreeGridColumn suppost Template (as inner property XTemplate or as simple string property Template)
Unfortunatelly you can place controls inside tree node ui representation (button in your image)
I can suggest to emulate anchor link, like

1. Use the following template inside TreeGridColumn
 

     <XTemplate runat="server">
          <Html>                           
               <span class="x-node-cmd" style="text-decoration:underline;color:Blue;">Show details</span>
          </Html>
     </XTemplate>
 

 
2. Use the following TreeGrid Click listener
 
<Click Handler="if(e.getTarget('.x-node-cmd')){alert(node.attributes.User);}" />


Also you can investigate TreeGrid example from SVN which demonstrate template column also

Hmm, vladsch would there be a problem with using the following? I'm not getting the click to initiate

<XTemplate runat="server">
<Html>
<div class="x-node-cmd" style="display: inline;">
<table cellspacing="0" class="x-btn x-btn-text-icon" style="width: 140px;">
<tbody class="x-btn-medium x-btn-icon-medium-left">
<tr>
<td class="x-btn-tl"><i>&nbsp;</i></td>
<td class="x-btn-tc"></td>
<td class="x-btn-tr"><i>&nbsp;</i></td>
</tr>
<tr>
<td class="x-btn-ml"><i>&nbsp;</i></td>
<td class="x-btn-mc">
<em unselectable="on">
<button type="button" class="x-btn-text icon-calendar-edit">Manage Course</button>
</em>
</td>
<td class="x-btn-mr"><i>&nbsp;</i></td>
</tr>
<tr>
<td class="x-btn-bl"><i>&nbsp;</i></td>
<td class="x-btn-bc"></td>
<td class="x-btn-br"><i>&nbsp;</i></td>
</tr>
</tbody>
</table>
</div>
</Html>
</XTemplate>

Would be nice in the future if you added some command support to the TreeGrid -- very useful control

Cheers,
Timothy


----
Timothy Grant Vogelsang
tvogelsang [at] esolutionsgroup [dot] ca
Project Manager / Senior Software Developer
Microsoft .NET Framework 3.5
Coolite Toolkit 1.0

Last Login: 7/5/2010 10:10:13 AM
Posts: 7,853,
Posted 3/12/2010 3:56:53 AM

Group: Core Development Team
Hi,

TreeEventModel cannot work with such complex node structure. After click on tree the model search up 6 level only (search node element). Your node markup creates too many levels

I can suggest to add onclick attribute for the button
<button type="button" class="x-btn-text icon-calendar-edit" onclick="doNodeAction('{id}');">Manage Course</button>


In the doNodeAction just search node by id
TreePanel1.getNodeById(nodeId);


--
Vladimir Shcheglov
Coolite Inc.
Development Team
Forum Guidelines | Coolite Examples | Coolite API Docs | ExtJS API Docs | Twitter
Last Login: 6/17/2010 4:30:38 PM
Posts: 1,239,
Posted 3/12/2010 5:11:40 AM

Group: Coolite Premium Member & Early Adopter
Thanks vladsch


----
Timothy Grant Vogelsang
tvogelsang [at] esolutionsgroup [dot] ca
Project Manager / Senior Software Developer
Microsoft .NET Framework 3.5
Coolite Toolkit 1.0

« Prev Topic | Next Topic »
«««123
Reading This Topic
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.
All times are GMT -5:00, Time now is 8:51pm