Nov 23, 2011, 6:18 PM
Change the selection checkbox in the codebehind
Hello guys.
I have a TreePanel with checkbox and a combobox, I need that, in the event of the combobox I can change the selection of the checkbox in the treepanel in codebehind.
Thanks for the help.
I have a TreePanel with checkbox and a combobox, I need that, in the event of the combobox I can change the selection of the checkbox in the treepanel in codebehind.
Thanks for the help.
Public Sub cboDtFaturamento_OnChange(ByVal sender As Object, ByVal e As Ext.Net.SubmitEventArgs)
???????????????????
End Sub
<ext:ComboBox ID="cboDtFaturamento" Editable="false" runat="server" FieldLabel="Mês/Ano Referencia" LabelWidth="110" Width="200">
<Listeners>
<Change Handler="#{treeEmpresas}.submitNodes();" AutoPostBack="false"/>
</Listeners>
</ext:ComboBox>
<ext:TreePanel
ID="treeEmpresas"
runat="server"
Icon="Accept"
OnSubmit="cboDtFaturamento_OnChange"
Width="450"
Height="600"
AutoExpandColumn="Common"
Frame="true"
Layout="fit"
UseArrows="true"
AutoScroll="true"
Animate="true"
EnableDD="false"
ContainerScroll="true"
RootVisible="false">
<Listeners>
<Render Handler="this.getRootNode().expand(true);" Delay="50" />
</Listeners>
<TopBar>
<ext:Toolbar ID="Toolbar2" runat="server">
<Items>
<ext:Button ID="Button2" runat="server" Text="Selecionar Todos" Icon="Anchor">
<Listeners>
<Click Handler="#{treeEmpresas}.getRootNode().cascade(function(n){n.ui.toggleCheck(true);});" />
</Listeners>
</ext:Button>
<ext:ToolbarSeparator ID="ToolbarSeparator1"/>
<ext:Button ID="Button3" runat="server" Text="Deselecionar Todos" Icon="BuildingGo">
<Listeners>
<Click Handler="#{treeEmpresas}.getRootNode().cascade(function(n){n.ui.toggleCheck(false);});" />
</Listeners>
</ext:Button>
</Items>
</ext:Toolbar>
</TopBar>
<BottomBar>
<ext:Toolbar ID="Toolbar3" runat="server">
<Items>
<ext:ToolbarFill ID="ToolbarFill2" runat="server" />
<ext:Button ID="btnGerarFaturamento" runat="server" Text="Gerar Faturamento">
<DirectEvents>
<Click OnEvent="btnGerarFaturamento_Click">
<ExtraParams>
<ext:Parameter Name="nodes"
Value="#{treeEmpresas}.serializeTree({withChildren:true, attributeFilter: function (attrName, attrValue) {
return typeof attrValue!='function' && attrName!='children';}})" Mode="Raw" Encode="false"/>
</ExtraParams>
<EventMask ShowMask="true" Msg="Processando..." />
</Click>
</DirectEvents>
<Listeners>
<Click Handler="#{treeEmpresas}.submitNodes();" AutoPostBack="false"/>
</Listeners>
<ToolTips>
<ext:ToolTip ID="ToolTip1" runat="server" Html="Gerar Faturamento" />
</ToolTips>
</ext:Button>
</Items>
</ext:Toolbar>
</BottomBar>
</ext:TreePanel>