Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
when i select combobox in a gridview and click button which is outside gridview i need a selected value of combobox, which i am not getting please help.

<dx:ASPxPanel ID="ASPxPanel1"  runat="server" Width="100%" Height="100%" ScrollBars="Auto">
            <PanelCollection>
                <dx:HtmlEditorRoundPanelContent>
                <dx:ASPxGridView ID="gdsurveyinfo"  runat="server" KeyFieldName="csurveyid"
                    >
                    <ClientSideEvents RowClick="function(s,e){OnGridSelectionChanged(s,e);}"/>
                    <Columns>
                          <dx:GridViewCommandColumn ShowSelectCheckbox="True" VisibleIndex="0" Caption="Select" Width="5%" Name="colSelect">
                          </dx:GridViewCommandColumn>
                          <dx:GridViewDataDateColumn  FieldName="monthdate" VisibleIndex="1" Caption="MONTH" Width="7%">
                              <PropertiesDateEdit DisplayFormatString="MMM-yyyy" >

                              </PropertiesDateEdit>
                              <CellStyle HorizontalAlign="Center" Font-Bold="False">
                              </CellStyle>
                          </dx:GridViewDataDateColumn>                          
                      </Columns>
                      <SettingsBehavior AllowSelectByRowClick="true" AllowSelectSingleRowOnly="True" />
                    <SettingsPager Visible="False" Mode="EndlessPaging">
                    </SettingsPager>
                    <Settings VerticalScrollBarStyle="Virtual" />
                    <Paddings PaddingLeft="4px" />
                    <Styles>
                        <Header Font-Bold="True">
                        </Header>
                    </Styles>
                    <ClientSideEvents Init="function(s,e){fnResizeGrid(s,e);}" />
                    </dx:ASPxGridView>
                    </dx:HtmlEditorRoundPanelContent>
                    </PanelCollection>
          
            </dx:ASPxPanel>

--------------------------------
i tried this way but i am not getting

 for (int row = 0; row < gdsurveyinfo.VisibleRowCount; row++)
            {
                ASPxComboBox ddlStatus = (ASPxComboBox)gdsurveyinfo.FindRowCellTemplateControl(row, null, "colSelect");
                string status = ddlStatus.SelectedItem.ToString();
            }
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900