ComboBox.selectedItem.Value = "" when ComboBox.Disabled=True

  1. #1

    ComboBox.selectedItem.Value = "" when ComboBox.Disabled=True

    I have problems after upgrade to 0.8.2...

    Already change the Enabled = False to Disabled = True in all objects that use Enabled = False

    In the code bellow i use the SetValue in a combobox that disable = true, the combo show the correct item, but the selecteditem.value is allways = ""

    ASP (winGrafico is the way to show the winPlano, where the error occurr):

            <ext:Window id="winGrafico" runat="server" Title="Índice de Satisfação dos Clientes" Icon="ChartBarLink" Modal="true" Center&#111;nload="true" Show&#111;nload="false" BodyStyle="padding:5px;background-color:#fff;" Width="755" Height="580">
            <Body>
                    <ext:TabPanel ID="TabPanel5" runat="server" ActiveTabIndex="0" Plain="true" AutoHeight="true" AutoWidth="true">
                    <Tabs>
                        <ext:Tab ID="Tab17" runat="server" Title="ISC" AutoHeight="true" AutoWidth="true">
                        <Body>
                            <ext:Panel ID="pnlGrafico" runat="server" Height="485">
                            <TopBar>
                                <ext:Toolbar ID="Toolbar3" runat="server">
                                    <Items>
                                        <ext:Button ID="cmdHome" runat="server" Icon="House"  Text="">
                                            <AjaxEvents>
                                            <Click OnEvent ="Home" />
                                            </AjaxEvents>
                                        </ext:Button>
                                        <ext:ToolbarSeparator></ext:ToolbarSeparator>
                                        <ext:ComboBox ID="cmbGraficos" runat="server" StoreID="strComboGraficos" ValueField="value" DisplayField="text" FieldLabel="Gráfico" Editable="false" TypeAhead="true" Mode="Local" ForceSelection="true" TriggerAction="All" EmptyText="Selecione o Gráfico..." Select&#111;nfocus="true" Width="240">
                                            <AjaxEvents>
                                            <Select OnEvent ="cmbGraficos_Select" />
                                            </AjaxEvents>
                                        </ext:ComboBox>
                                        <ext:ComboBox ID="cmbProcessosGrafico" runat="server" StoreID="strComboProcessosGrafico" ValueField="value" DisplayField="text" FieldLabel="Processo" Editable="false" TypeAhead="true" Mode="Local" ForceSelection="true" TriggerAction="All" EmptyText="Selecione o Processo..." Select&#111;nfocus="true" Width="180" Disable="true">
                                            <AjaxEvents>
                                            <Select OnEvent ="cmbProcessosGrafico_Select" />
                                            </AjaxEvents>
                                        </ext:ComboBox>
                                        <ext:ComboBox ID="cmbClientesGrafico" runat="server" StoreID="strComboClientesGrafico" ValueField="value" DisplayField="text" FieldLabel="Cliente" Editable="false" TypeAhead="true" Mode="Local" ForceSelection="true" TriggerAction="All" EmptyText="Selecione o Cliente..." Select&#111;nfocus="true" Width="180" Disable="true">
                                            <AjaxEvents>
                                            <Select OnEvent ="cmbProcessosGrafico_Select" />
                                            </AjaxEvents>
                                        </ext:ComboBox>
                                        <ext:ToolbarSeparator></ext:ToolbarSeparator>
                                        <ext:Button ID="cmdEditaNota" runat="server" Icon="Note" Text="">
                                            <AjaxEvents>
                                            <Click OnEvent ="Nota" />
                                            </AjaxEvents>
                                        </ext:Button>
                                        <ext:ToolbarSeparator></ext:ToolbarSeparator>
                                        <ext:Button ID="cmdEmail" runat="server" Icon="Email" Text="">
                                            <AjaxEvents>
                                            <Click OnEvent ="AbreEMail" />
                                            </AjaxEvents>
                                        </ext:Button>
                                        <ext:ToolbarSeparator></ext:ToolbarSeparator>
                                        <ext:Button ID="cmdPlanilha" runat="server" Icon="PageExcel" Text="">
                                            <AjaxEvents>
                                            <Click OnEvent ="PlanilhaISC" />
                                            </AjaxEvents>
                                        </ext:Button>
                                    </Items>
                                </ext:Toolbar>
                            </TopBar>
                            <AutoLoad Mode="IFrame" MaskMsg="Abrindo..." ShowMask="true" />
                            </ext:Panel>
                        </Body>
                        </ext:Tab>
                        <ext:Tab ID="Tab16" runat="server" Title="Clientes" AutoHeight="true" AutoWidth="true">
                            <Body>
                            <ext:FitLayout runat="server" ID="fitLayout2">
                            <items>
                            <ext:GridPanel ID="grdTabela" runat="server" StoreID="strTabela" Icon="UserComment" Title="Pesquisas" StripeRows="true" BodyStyle="padding:0px;" Width="250" Height="485">
                            <columnmodel id="colTabela" runat="server">
                                <columns>
                                    <ext:Column ColumnID="cod_pesquisa" Header="Pesquisa" Width="0" DataIndex="cod_pesquisa" Hidden="true" />
                                    <ext:Column ColumnID="cod_cliente_ref" Header="Código" Width="0" DataIndex="cod_cliente_ref" Hidden="true" />
                                    <ext:Column DataIndex="cliente" Header="Cliente" Width="270" />
                                    <ext:Column DataIndex="tx_desc" Header="Atendimento Valor" Width="100" />
                                    <ext:Column DataIndex="segmento" Header="Segmento" Width="100" />
                                    <ext:Column DataIndex="mes" Header="Mês" Width="80" Align="Center" />
                                    <ext:Column DataIndex="tx_isc" Header="ISC" Width="50" Align="Center" />
                                    <ext:Column DataIndex="tx_isp" Header="ISP" Width="50" Align="Center" />
                                    <ext:CommandColumn Header="Ações" Align="Center" Width="60">
                                        <Commands>
                                            <ext:GridCommand Icon="Magnifier"  CommandName="Detalhes">
                                                <ToolTip Text="Ver Detalhes" />
                                            </ext:GridCommand>
                                            <ext:CommandSeparator />
                                            <ext:GridCommand Icon="Report" CommandName="Plano">
                                                <ToolTip Text="Criar Plano de Ação" />
                                            </ext:GridCommand>
                                        </Commands>
                                        
                                    </ext:CommandColumn>
                                </columns>
                            </columnmodel>
                            <AjaxEvents>
                                <Command OnEvent="cmdGridTabela_Click">
                                <EventMask Msg="Abrindo..." ShowMask="true" />
                                <ExtraParams>
                                    <ext:Parameter Name="comando" Value="command" Mode="Raw"/>
                                    <ext:Parameter Name="codcliente" Value="record.data.cod_cliente_ref" Mode="Raw"/>
                                    <ext:Parameter Name="cliente" Value="record.data.cliente" Mode="Raw"/>
                                    <ext:Parameter Name="codpesquisa" Value="record.data.cod_pesquisa" Mode="Raw"/>
                                </ExtraParams>
                                </Command>
                            </AjaxEvents>
                            <SelectionModel>
                            <ext:RowSelectionModel ID="rowTabela" runat="server">
                            </ext:RowSelectionModel>
                            </SelectionModel>
                            <plugins>
                            <ext:GridFilters runat="server" ID="grdFilterGraficos" Local="false">
                                <filters>
                                    <ext:StringFilter DataIndex="cliente" />
                                    <ext:StringFilter DataIndex="tx_desc" />
                                    <ext:StringFilter DataIndex="segmento" />
                                    <ext:StringFilter DataIndex="mes" />
                                    <ext:NumericFilter DataIndex="tx_isc" />
                                    <ext:NumericFilter DataIndex="tx_isp" />
                                </Filters>
                            </ext:GridFilters>
                            </Plugins>
                            <bottombar>
                                <ext:PagingToolBar ID="pgtTabela" StoreID="strTabela" runat="server" PageSize="15" PrevText = "Página Anterior" NextText = "Próxima Página" BeforePageText = "Página" AfterPageText = "de {0}" LastText = "Última Página" FirstText = "Primeira Página" EmptyMsg="Nenhum registro encontrado" RefreshText="Recarregar" DisplayMsg="Registros: {0} - {1} de {2}" />
                            </bottombar>
                            </ext:GridPanel>
                            </items>
                            </ext:FitLayout>
                            </Body>
                            <Listeners>
                            <Activate Handler="#{Tab16}.doLayout()" />
                            </Listeners>
                        </ext:Tab>
                    </Tabs>
                    </ext:TabPanel>
                </body>
            <BottomBar>
                <ext:StatusBar ID="stbGrafico" runat="server" Text="Selecione um gráfico na lista."/>
            </BottomBar>
            </ext:Window>
    
            <ext:Window id="winPlano" runat="server" Title="Plano de Ação" Icon="Report" Show&#111;nload="false" Modal="true" BodyStyle="padding:5px;background-color:#fff;" Width="800" Height="420" Center&#111;nload="true" Maximizable="true">
            <Body>
                    <ext:ContainerLayout ID="ContainerLayout3" runat="server">
                        <ext:Panel ID="Panel11" runat="server" Border="false">        
                            <Body>
                                <ext:FormLayout id="FormLayout5" runat="server" LabelWidth="75">
                                    <ext:Anchor Horizontal="100%">
                                    <ext:ComboBox id="cmbClientesPlano" runat="server" StoreID="strComboClientesPlano" ValueField="value" DisplayField="text" FieldLabel="Cliente" TypeAhead="true" Mode="Local" ForceSelection="true" TriggerAction="All" EmptyText="Selecione o Cliente..." Select&#111;nfocus="true" Disabled="true">
                                    <AjaxEvents>
                                    <Select OnEvent ="cmbClientesPlano_Select" />
                                    </AjaxEvents>
                                    </ext:ComboBox>
                                    </ext:Anchor>
                                    <ext:Anchor Horizontal="100%">
                                    <ext:DateField runat="server" id="dtpInicioPlano"  Vtype="daterange" FieldLabel="Início" AllowBlank="false" BlankText="Campo 'Início' obrigatório." Format="dd/MM/yyyy" />
                                    </ext:Anchor>
                                    <ext:Anchor Horizontal="100%">
                                    <ext:DateField runat="server" id="dtpPrevisaoPlano"  Vtype="daterange" FieldLabel="Previsão" AllowBlank="false" BlankText="Campo 'Previsão' obrigatório." Format="dd/MM/yyyy" />
                                    </ext:Anchor>
                                </ext:FormLayout>
                            </Body>
                        </ext:Panel>
                        <ext:TabPanel ID="tabPanelPlano" runat="server" ActiveTabIndex="0" Plain="true" AutoHeight="true" AutoWidth="true">
                            <Tabs>
                                <ext:Tab ID="Tab5" runat="server" Title="Dados Gerais" AutoHeight="true" AutoWidth="true" BodyStyle="padding:10px;">
                                    <Body>
                                        <ext:FormLayout ID="FormLayout11" runat="server" LabelWidth="95">                
                                            <ext:Anchor Horizontal="100%">
                                            <ext:TextField id="txtPlano" runat="server" ReadOnly="true" FieldLabel="Plano de Ação" AllowBlank="false" BlankText="Campo 'Plano de Ação' obrigatório." />
                                            </ext:Anchor>
                                            <ext:Anchor Horizontal="100%">
                                            <ext:TextArea ID="txtObjetivo" runat="server" ReadOnly="false" FieldLabel="Objetivo" AllowBlank="false" BlankText="Campo 'Objetivo' obrigatório."/>
                                            </ext:Anchor>
                                            <ext:Anchor Horizontal="100%">
                                            <ext:ComboBox id="cmbStatusPlano" runat="server" ReadOnly="true" FieldLabel="Status" TypeAhead="true" Mode="Local" ForceSelection="true" TriggerAction="All" EmptyText="Selecione o Status..." Select&#111;nfocus="true">
                                            <Items>
                                                <ext:ListItem Text="Ativo" Value="Ativo" />
                                                <ext:ListItem Text="Cancelado" Value="Cancelado" />
                                                <ext:ListItem Text="Pendência Cliente" Value="Pendência Cliente" />
                                            </Items>
                                            </ext:ComboBox>
                                            </ext:Anchor>
                                            <ext:Anchor Horizontal="100%">
                                            <ext:ComboBox id="cmbForum" runat="server" StoreID="strComboForum" ValueField="value" DisplayField="text" FieldLabel="Fórum" TypeAhead="true" Mode="Local" ForceSelection="true" TriggerAction="All" EmptyText="Selecione o Assunto..." Select&#111;nfocus="true" Disabled="true"/>
                                            </ext:Anchor>
                                        </ext:FormLayout>
                                    </Body>
                                </ext:Tab>
                                <ext:Tab ID="Tab6" runat="server" Title="Tarefas" Plain="true" Height="210" BodyStyle="padding:0px;">
                                    <Body>
                                    <ext:FitLayout runat="server" ID="fitLayout1">
                                    <items>
                                        <ext:GridPanel ID="GridPanel2" runat="server" StoreID="strTarefasPlano" Icon="Script" Title="Tarefas" StripeRows="true" BodyStyle="padding:0px;">
                                        <TopBar>
                                          <ext:Toolbar ID="Toolbar2" runat="server">
                                          <Items>
                                          <ext:ToolbarButton Icon="Add" Text="Incluir">
                                           <AjaxEvents>
                                            <Click OnEvent="IncluirTarefa"></Click>
                                            </AjaxEvents>
                                          </ext:ToolbarButton>
                                          <ext:ToolbarSeparator></ext:ToolbarSeparator>
                                          <ext:ToolbarButton Icon="Delete" Text="Excluir">
                                          <Listeners>
                                          <Click Handler="Ext.Msg.alert('Excluir', 'Em desenvolvimento.');" />
                                          </Listeners>
                                           <AjaxEvents>
                                            <Click OnEvent="ExcluirTarefa"></Click>
                                            </AjaxEvents>
                                          </ext:ToolbarButton>
                                          </Items>
                                          </ext:Toolbar>
                                          </TopBar>
                                                <columnmodel id="ColumnModel1" runat="server">
                                                    <columns>
                                                        <ext:Column ColumnID="cod_tarefa" Header="Código" Width="0" DataIndex="cod_tarefa" Hidden="true" />
                                                        <ext:Column DataIndex="icone" Header="icone" Width="25">
                                                            <Renderer Fn="function(cellValue, viewProps, store){cellValue='';if (store.data.icone==3){viewProps.css='vermelho';}else if (store.data.icone==2){viewProps.css='amarelo';}else{viewProps.css='verde';}return cellValue;}" />
                                                        </ext:Column>
                                                        <ext:Column DataIndex="lida_ponto" Header="lida_ponto" Width="25">
                                                            <Renderer Fn=" function(cellValue, viewProps, store){cellValue='';viewProps.css=store.data.lida_ponto;}" />
                                                        </ext:Column>
                                                        <ext:Column DataIndex="lida_coord" Header="lida_coord" Width="25">
                                                            <Renderer Fn=" function(cellValue, viewProps, store){cellValue='';viewProps.css=store.data.lida_coord;}" />
                                                        </ext:Column>
                                                        <ext:Column DataIndex="criticidade" Header="Criticidade" Width="50" />
                                                        <ext:Column DataIndex="status_tarefa" Header="Status" Width="100">
                                                            <Renderer Fn="function(cellValue, viewProps, store){if (store.data.status_tarefa=='Rejeitada'){viewProps.css='rejeitada';}return cellValue;}" />
                                                        </ext:Column>
                                                        <ext:Column DataIndex="dt_tarefa" Header="Data"  >
                                                            <renderer fn="Ext.util.Format.dateRenderer('d/m/Y')" />
                                                        </ext:Column>
                                                        <ext:Column DataIndex="criador" Header="Criador" Width="100" />
                                                        <ext:Column DataIndex="telefone" Header="Telefone" Width="100" />
                                                        <ext:Column DataIndex="email" Header="E-Mail" Width="100" />
                                                        <ext:Column DataIndex="dt_previsao_tarefa" Header="Previsão"  >
                                                            <renderer fn="Ext.util.Format.dateRenderer('d/m/Y')" />
                                                        </ext:Column>
                                                        <ext:Column DataIndex="dt_termino_tarefa" Header="Término"  >
                                                            <renderer fn="Ext.util.Format.dateRenderer('d/m/Y')" />
                                                        </ext:Column>
                                                        <ext:Column DataIndex="produto" Header="Produto" Width="100" />
                                                    </columns>
                                                </columnmodel>
                                          <SelectionModel>
                                            <ext:RowSelectionModel ID="RowSelectionModel2" runat="server">
                                                <Listeners>
                                                    <RowSelect Handler="#{txtCod2}.setValue(#{GridPanel2}.getSelectionModel().getSelected().get(#{GridPanel2}.getColumnModel().getDataIndex(0)))" />
                                                </Listeners>
                                            </ext:RowSelectionModel>
                                          </SelectionModel>
                                            <plugins>
                                            <ext:GridFilters runat="server" ID="grdFilterTarefaPlano" Local="false">
                                                <filters>
                                                    <ext:NumericFilter DataIndex="cod_tarefa" /> 
                                                    <ext:StringFilter DataIndex="criticidade" />
                                                    <ext:DateFilter DataIndex="dt_tarefa">
                                                        <datepickeroptions runat="server" todaytext="Now" />
                                                    </ext:DateFilter>
                                                    <ext:StringFilter DataIndex="criador" />
                                                    <ext:StringFilter DataIndex="telefone" />
                                                    <ext:StringFilter DataIndex="email" />
                                                    <ext:DateFilter DataIndex="dt_previsao_tarefa">
                                                        <datepickeroptions runat="server" todaytext="Now" />
                                                    </ext:DateFilter>
                                                    <ext:DateFilter DataIndex="dt_termino_tarefa">
                                                        <datepickeroptions runat="server" todaytext="Now" />
                                                    </ext:DateFilter>
                                                    <ext:StringFilter DataIndex="produto" />
                                                </Filters>
                                            </ext:GridFilters>
                                            </Plugins>
                                           <AjaxEvents>
                                                <RowDblClick OnEvent="EditarTarefa">
                                                    <EventMask Msg="Abrindo..." ShowMask="true" />
                                                    <ExtraParams>
                                                        <ext:Parameter Name="cod_grid" Value="#{GridPanel2}.getSelectionModel().getSelected().get(#{GridPanel2}.getColumnModel().getDataIndex(0))" Mode="Raw" />
                                                    </ExtraParams>
                                                </RowDblClick>
                                            </AjaxEvents>
                                            <bottombar>
                                                <ext:PagingToolBar ID="pgtTarefas" StoreID="strTarefasPlano" runat="server" PageSize="15" PrevText = "Página Anterior" NextText = "Próxima Página" BeforePageText = "Página" AfterPageText = "de {0}" LastText = "Última Página" FirstText = "Primeira Página" EmptyMsg="Nenhum registro encontrado" RefreshText="Recarregar" DisplayMsg="Registros: {0} - {1} de {2}" />
                                            </bottombar>
                                           </ext:GridPanel>
                                    </items>
                                    </ext:FitLayout>
                                    </Body>
                                </ext:Tab>
                                <ext:Tab ID="Tab18" runat="server" Title="Histórico" Height="210" AutoWidth="true" BodyStyle="padding:0px;">
                                    <Body>
                                        <ext:FitLayout runat="server" ID="fitLayout5">
                                        <items>
                                        <ext:GridPanel ID="GridPanel3" runat="server" StoreID="strHistoricoPlano" Icon="BookMark" Title="Histórico" StripeRows="true" BodyStyle="padding:0px;" Width="250" Height="165">
                                        <columnmodel id="Columnmodel4" runat="server">
                                            <columns>
                                                <ext:Column ColumnID="cod_historico" Header="Pesquisa" Width="0" DataIndex="cod_historico" Hidden="true" />
                                                <ext:Column DataIndex="data_historico" Header="Data" Width="100">
                                                    <renderer fn="Ext.util.Format.dateRenderer('d/m/Y')" />
                                                </ext:Column>
                                                <ext:Column DataIndex="usuario" Header="Usuário" Width="150" />
                                                <ext:Column DataIndex="historico" Header="Histórico" Width="350" />
                                            </columns>
                                        </columnmodel>
                                        <SelectionModel>
                                        <ext:RowSelectionModel ID="RowSelectionModel5" runat="server">
                                        </ext:RowSelectionModel>
                                        </SelectionModel>
                                        <bottombar>
                                            <ext:PagingToolBar ID="PagingToolBar1" StoreID="strHistoricoPlano" runat="server" PageSize="15" PrevText = "Página Anterior" NextText = "Próxima Página" BeforePageText = "Página" AfterPageText = "de {0}" LastText = "Última Página" FirstText = "Primeira Página" EmptyMsg="Nenhum registro encontrado" RefreshText="Recarregar" DisplayMsg="Registros: {0} - {1} de {2}" />
                                        </bottombar>
                                        </ext:GridPanel>
                                        </items>
                                        </ext:FitLayout>
                                    </body>
                                    <Listeners>
                                    <Activate Handler="#{Tab18}.doLayout()" />
                                    </Listeners>
                                </ext:Tab>
                            </Tabs>
                        </ext:TabPanel>
                    </ext:ContainerLayout>
                </body>
                <BottomBar>
                    <ext:StatusBar ID="stbPlano" runat="server"></ext:StatusBar>
                </BottomBar>
                <Buttons>
                    <ext:Button id="cmdPlano" runat="server" Text="Salvar" Icon="Disk">
                       <ajaxevents>
                           <Click onevent="cmdPlano_Click">
                           <EventMask Msg="Salvando..." ShowMask="true" />
                           </Click>
                        </ajaxevents>
                    </ext:Button>
                 </Buttons>
            </ext:Window>
    VB (cmdGridTabela_Click is where i setvalue for the comboclienteplano and the cmdPlano_click is where i dont get the correct value, only the ""):

        Protected Sub cmdGridTabela_Click(ByVal sender As Object, ByVal e As Coolite.Ext.Web.AjaxEventArgs)
            If e.ExtraParams("comando").ToString = "Plano" Then
                If Session("Admin").ToString = "1" Then
                    strComboClientesPlano.DataSource = RS("SELECT cod_cliente, nome_fantasia FROM time.tb_clientes ORDER BY nome_fantasia")
                    strComboClientesPlano.DataBind()
                Else
                    strComboClientesPlano.DataSource = RS("SELECT c.cod_cliente AS cod_cliente, nome_fantasia FROM time.tb_clientes c INNER JOIN time.tb_usuario_clientes u ON c.cod_cliente = u.cod_cliente WHERE u.cod_usuario = " &amp; Session("CodigoUsuario").ToString &amp; " ORDER BY nome_fantasia")
                    strComboClientesPlano.DataBind()
                End If
                cmbClientesPlano.SetValue(e.ExtraParams("codcliente").ToString)
                dtpInicioPlano.Value = vbNullString
                dtpPrevisaoPlano.Value = vbNullString
                txtPlano.Text = e.ExtraParams("cliente").ToString
                txtObjetivo.Text = vbNullString
                strComboForum.DataSource = RS("SELECT cod_forum, forum FROM time.tb_foruns ORDER BY forum")
                strComboForum.DataBind()
                txtObjetivo.Text = vbNullString
                cmbStatusPlano.SetValue("Ativo")
                cmbForum.SetValue(2)
                strTarefasPlano.DataSource = RS("SELECT cod_tarefa, icone, lida_ponto, lida_coord, criticidade, dt_tarefa, status_tarefa, plano, nome_fantasia, c.usuario as criador, c.telefone, email, dt_previsao_tarefa, dt_termino_tarefa, produto FROM time.tb_tarefas t INNER JOIN time.tb_produtos p ON t.cod_produto = p.cod_produto INNER JOIN time.tb_usuarios c ON t.cod_usuario = c.cod_usuario INNER JOIN time.tb_planos l ON t.cod_plano = l.cod_plano INNER JOIN time.tb_clientes i ON l.cod_cliente = i.cod_cliente INNER JOIN time.tb_criticidades r ON t.cod_criticidade = r.cod_criticidade INNER JOIN time.tb_detalhes_criticidade d ON r.cod_criticidade = d.cod_criticidade AND (DATEDIFF(IF(dt_termino_tarefa IS NULL, Now(), dt_termino_tarefa), DATE(dt_tarefa)) * 100) / IF(DATEDIFF(dt_previsao_tarefa, DATE(dt_tarefa)) = 0, 1,DATEDIFF(dt_previsao_tarefa, DATE(dt_tarefa))) >= de AND IF((DATEDIFF(IF(dt_termino_tarefa IS NULL, Now(), dt_termino_tarefa), DATE(dt_tarefa)) * 100) / IF(DATEDIFF(dt_previsao_tarefa, DATE(dt_tarefa)) = 0, 1,DATEDIFF(dt_previsao_tarefa, DATE(dt_tarefa))) > 100, 100, (DATEDIFF(IF(dt_termino_tarefa IS NULL, Now(), dt_termino_tarefa), DATE(dt_tarefa)) * 100) / IF(DATEDIFF(dt_previsao_tarefa, DATE(dt_tarefa)) = 0, 1,DATEDIFF(dt_previsao_tarefa, DATE(dt_tarefa)))) <= ate WHERE t.cod_plano = 0 ORDER BY dt_tarefa DESC")
                strTarefasPlano.DataBind()
                tabPanelPlano.SetActiveTab(Tab5)
                Tab6.Disabled = True
                stbPlano.Text = vbNullString
                winPlano.Show()
            Else
                txtCod3.Text = e.ExtraParams("codpesquisa").ToString
                winRespostas.Show()
            End If
        End Sub
    
        Protected Sub cmdPlano_Click(ByVal sender As Object, ByVal e As Coolite.Ext.Web.AjaxEventArgs)
            If cmbClientesPlano.SelectedItem.Value = vbNullString Then
    'THE CODE ALLWAYS ENTER HERE, BECAUSE THE SELECTDETITEM.VALUE IS ALLWAYS ""
                stbPlano.Text = "O campo 'Cliente' não pode ficar em branco." 
                cmbClientesPlano.Focus()
            ElseIf dtpInicioPlano.Value = vbNullString Then
                stbPlano.Text = "O campo 'Início' não pode ficar em branco."
                dtpInicioPlano.Focus()
            ElseIf dtpPrevisaoPlano.Value = vbNullString Then
                stbPlano.Text = "O campo 'Previsão' não pode ficar em branco."
                dtpPrevisaoPlano.Focus()
            ElseIf dtpInicioPlano.Value > dtpPrevisaoPlano.Value Then
                stbPlano.Text = "O campo 'Início' não ser maior que o campo 'Previsão'."
                dtpPrevisaoPlano.Focus()
            ElseIf txtPlano.Text = vbNullString Then
                stbPlano.Text = "O campo 'Plano de Ação' não pode ficar em branco."
                txtPlano.Focus()
            ElseIf txtObjetivo.Text = vbNullString Then
                stbPlano.Text = "O campo 'Objetivo' não pode ficar em branco."
                txtObjetivo.Focus()
            ElseIf cmbStatusPlano.SelectedItem.Text = vbNullString Then
                stbPlano.Text = "O campo 'Status' não pode ficar em branco."
                cmbStatusPlano.Focus()
            ElseIf cmbForum.SelectedItem.Value = vbNullString Then
                stbPlano.Text = "O campo 'Fórum' não pode ficar em branco."
                cmbForum.Focus()
            Else
                If txtCod.Text = "0" Then
                    txtCod.Text = Executar("INSERT INTO time.tb_planos (cod_usuario, cod_cliente, dt_plano, dt_inicio_plano, plano, status_plano, objetivo, dt_previsao_plano, cod_forum) VALUES (" &amp; Session("CodigoUsuario").ToString &amp; ", " &amp; cmbClientesPlano.SelectedItem.Value &amp; ", Now(), " &amp; Aspas(dtpInicioPlano.Value, False) &amp; ", " &amp; Aspas(txtPlano.Text, False) &amp; ", " &amp; Aspas(cmbStatusPlano.SelectedItem.Text, False) &amp; ", " &amp; Aspas(txtObjetivo.Text, False) &amp; ", " &amp; Aspas(dtpPrevisaoPlano.Value, False) &amp; ", " &amp; cmbForum.SelectedItem.Value &amp; ")")
                    Executar("UPDATE time.tb_planos SET plano = CONCAT(plano, ' (', " &amp; txtCod.Text &amp; ", ')') WHERE cod_plano = " &amp; txtCod.Text)
                    txtPlano.Text = txtPlano.Text &amp; " (" &amp; txtCod.Text &amp; ")"
                    Historico(Session("CodigoUsuario").ToString, 1, "Plano", txtCod.Text, "Plano inserido", DB)
                Else
                    Executar("UPDATE time.tb_planos SET cod_cliente = " &amp; cmbClientesPlano.SelectedItem.Value &amp; ", dt_inicio_plano = " &amp; Aspas(dtpInicioPlano.Value, False) &amp; ", status_plano = " &amp; Aspas(cmbStatusPlano.SelectedItem.Text, False) &amp; ", dt_previsao_plano = " &amp; Aspas(dtpPrevisaoPlano.Value, False) &amp; ", plano = " &amp; Aspas(txtPlano.Text, False) &amp; ", objetivo = " &amp; Aspas(txtObjetivo.Text, False) &amp; ", cod_forum = " &amp; cmbForum.SelectedItem.Value &amp; " WHERE cod_plano = " &amp; txtCod.Text)
                    Historico(Session("CodigoUsuario").ToString, 1, "Plano", txtCod.Text, "Plano atualizado", DB)
                End If
                strComboPlano.DataSource = RS("SELECT cod_plano, plano FROM time.tb_planos WHERE cod_usuario = " &amp; Session("CodigoUsuario").ToString &amp; " ORDER BY plano")
                strComboPlano.DataBind()
                cmbPlano.SetValue(txtCod.Text)
                stbPlano.Text = "Plano salvo com sucesso. Já é possível se criar as Tarefas."
                'RecarregaGrid(txtMenu.Text)
                Tab6.Disabled = False
            End If
        End Sub
    Please, help someone help me.

    Tks, Puia.
  2. #2

    RE: ComboBox.selectedItem.Value = "" when ComboBox.Disabled=True

    Hi,

    Try to use SetValueAndFireSelect instead SetValue
  3. #3

    RE: ComboBox.selectedItem.Value = "" when ComboBox.Disabled=True

    Hi Vlad, tks for the reply.

    I change to SetValueAndFireSelect but continue without work. :^(


    I dont know if i have a Reference problem...


    I am using:


    UX - 0.8.0.30889
    WEB - 0.8.2.983
    Utilities - 1.0.0.981
    Newtonsoft - 3.5.0.0




  4. #4

    RE: ComboBox.selectedItem.Value = "" when ComboBox.Disabled=True

    Hi,

    Here is my test case which works fine
    <%@ Page Language="C#"%>
    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
        <script runat="server">
            protected void Set3(object sender, AjaxEventArgs e)
            {
                Combo1.SetValue(3);
            }
    
            protected void Show(object sender, AjaxEventArgs e)
            {
                Ext.Msg.Alert("Value", Combo1.SelectedItem.Value).Show();
            }
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
            <ext:ScriptManager ID="ResourceManager1" runat="server" />
            
            <ext:ComboBox runat="server" ID="Combo1" Disabled="true">
                <Items>
                    <ext:ListItem Text="Item 1" Value="1" />
                    <ext:ListItem Text="Item 2" Value="2" />
                    <ext:ListItem Text="Item 3" Value="3" />
                    <ext:ListItem Text="Item 4" Value="4" />
                    <ext:ListItem Text="Item 5" Value="5" />
                </Items>
            </ext:ComboBox> 
            
            <ext:Button runat="server" Text="Set 3">
                <AjaxEvents>
                    <Click OnEvent="Set3" />
                </AjaxEvents>
            </ext:Button>
            
            <ext:Button runat="server" Text="Show selected">
                <AjaxEvents>
                    <Click OnEvent="Show" />
                </AjaxEvents>
            </ext:Button>
        </form>
    </body>
    </html>
  5. #5

    RE: ComboBox.selectedItem.Value = "" when ComboBox.Disabled=True

    Dear Vlad,

    I use your sample with the DLLs here and works good (changing to VB project), then i copy the Store and the combo from my project and simulate the same thing that i do on him, and work too...


    So i create a new project, add the DLLs and ASP files that i use in the old project, and not work again...


    Any idea what can causing this problem ??? In FireBug no errors are show, no script errors, nothing that i can start to resolve...




    Tks for your patient, Puia.






Similar Threads

  1. ComboBox and selectedItem.value
    By cwolcott in forum 1.x Help
    Replies: 3
    Last Post: Feb 01, 2012, 7:48 AM
  2. Replies: 4
    Last Post: Nov 30, 2011, 5:25 AM
  3. combobox.selectedItem
    By gidi in forum 1.x Help
    Replies: 2
    Last Post: Jul 07, 2011, 7:42 PM
  4. ComboBox SelectedItem according to Value problem
    By juredecman in forum 1.x Help
    Replies: 0
    Last Post: Aug 25, 2010, 8:57 PM
  5. ComboBox's SelectedItem in MVC App
    By danni in forum 1.x Help
    Replies: 4
    Last Post: Oct 02, 2009, 5:06 PM

Posting Permissions