Change value component inside ComponentColumn

  1. #1

    Change value component inside ComponentColumn

    help me please!!!

    I need change value of checkbox to disable=true




    <script>
            var onGroupCommand = function (column, command, group) {            
                var isDisable = column.groupCommands[0].disabled;
    
                if (command === 'comando2') {
                    if (isDisable === true) {                                        
                        column.groupCommands[0].disabled = false;
                        column.grid.columns[4].commands[0].disabled = false;
                        column.grid.view.refresh();
                    }
                    else {
                        column.groupCommands[0].disabled = true;                    
                        column.grid.columns[4].commands[0].disabled = true;
                        column.grid.view.refresh();
                    }
                }            
            }
    </script>
    
    <ext:GridPanel ID="grdGeocerca" HideHeaders="true"  runat="server" Border="false" RowLines="false" Layout="FitLayout" Region="Center" Frame="false" ForceFit="false" AutoScroll="true" Resizable="false" MinHeight="50">
                                                    <Store>
                                                        <ext:Store ID="strGeocercas" runat="server" GroupField="GC_grupo">
                                                            <Model>
                                                                <ext:Model ID="mdlGeocerca" runat="server">
                                                                    <Fields>
                                                                        <ext:ModelField Name="id" />                                                                    
                                                                        <ext:ModelField Name="nombre" />
                                                                        <ext:ModelField Name="tipo" />                                                                 
                                                                    </Fields>
                                                                </ext:Model>
                                                            </Model>
                                                            <Sorters>
                                                                <ext:DataSorter Property="nombre" Direction="ASC" />
                                                            </Sorters>
                                                        </ext:Store>
                                                    </Store>
    
                                                    <ColumnModel ID="grupo" runat="server">
                                                        <Columns>
                                                            <ext:Column ID="id" runat="server" Text="Id" MenuDisabled="true" DataIndex="id" Hidden="true" />
                                                            <ext:Column ID="nombre" runat="server" Text="Nombre" MenuDisabled="true" Groupable="true"  DataIndex="nombre" Hidden="true" />
                                                            <ext:Column ID="tipo" runat="server" Text="tipo"  Width="150" DataIndex="tipo" MenuDisabled="true" />                                                                                                                  
                                                            <ext:Column ID="centrar" runat="server" Width="30">                                                            
                                                                <Columns>
                                                                    <ext:CommandColumn ID="cmdClmCentrar" Width="30" runat="server">                                                                                                                                        
                                                                        <Commands>
                                                                            <ext:GridCommand Disabled="true" Icon="Zoom">  
                                                                            </ext:GridCommand>                                                                        
                                                                        </Commands>
                                                                    </ext:CommandColumn>
                                                                </Columns>
                                                            </ext:Column>
                                                            <ext:ComponentColumn ID="CL_verEtiqueta" Width="25" runat="server">                                                            
                                                                <Component>
                                                                    <ext:Checkbox  ID="chkEtiqueta" runat="server">                                                                      
                                                                    </ext:Checkbox>                                                                                                                                
                                                                </Component>                                                                                                                               
                                                            </ext:ComponentColumn>                                                        
                                                            <ext:CommandColumn ID="cmdClm" runat="server" >                                                            
                                                                <GroupCommands> 
                                                                    <ext:GridCommand Icon="Note" Disabled="true" CommandName="comando1">                                                                                                                                        
                                                                    </ext:GridCommand>
                                                                    <ext:GridCommand Icon="MapStart" CommandName="comando2">
                                                                    </ext:GridCommand>                                                                
                                                                </GroupCommands>                                                            
                                                                <Listeners>                                                                                                                                                                                                                                                                                        
                                                                    <GroupCommand Fn="onGroupCommand" >
                                                                    </GroupCommand>                                                                
                                                                </Listeners>
                                                            </ext:CommandColumn>
                                                        </Columns>
                                                    </ColumnModel>
                                                    <SelectionModel>
                                                        <ext:RowSelectionModel Mode="Simple"></ext:RowSelectionModel>
                                                    </SelectionModel>
                                                    <View>
                                                        <ext:GridView ID="grdVwGeocercas" runat="server" TrackOver="false" StripeRows="false" />
                                                    </View>                                                
                                                    <Features>
                                                        <ext:Grouping ID="Grouping2"
                                                            runat="server"
                                                            HideGroupedHeader="true" />
                                                    </Features>
       </ext:GridPanel>
    Last edited by krizalid0; Feb 28, 2015 at 3:11 PM.

Similar Threads

  1. Replies: 0
    Last Post: Jun 27, 2014, 8:20 AM
  2. Replies: 1
    Last Post: Jun 12, 2014, 9:54 AM
  3. [CLOSED] [MVC] Use Devexpress component inside Ext.Net
    By Tactem in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Aug 21, 2013, 12:09 PM
  4. Replies: 2
    Last Post: Apr 21, 2012, 10:15 AM
  5. Window component inside desktop control
    By Shuaib in forum 1.x Help
    Replies: 0
    Last Post: Apr 20, 2012, 3:30 PM

Tags for this Thread

Posting Permissions