locked
Devexpress Combobox After Change postback RRS feed

  • Question

  • User197255166 posted

    Hi everyone,

    I will list the gridview according to the category I want to do. But when choosing categories, there will be no page postback. How can I do that

    Code Behind

    private void Kategori()
            {
                Entities uye = new Entities();
    
                ASPxComboBox1.TextField = "Dil";
                ASPxComboBox1.ValueField = "ID";
                ASPxComboBox1.DataSource = uye.Diller.ToList();
                ASPxComboBox1.DataBind();
            }
    
            
    
           protected void ASPxGridView1_DataBinding(object sender, EventArgs e)
           {
               Entities uye = new Entities();
                var slider = (from v in uye.Slider
                              select new
                              {
                                  v.ID,
                                  v.AdminID,
                                  v.SliderAciklama,
                                  v.SliderBaslik,
                                  v.SliderYol,
                                  v.Tarih,
                                  v.Diller.Dil,                       
                                  v.Ok,
                                  v.Sira
    
                              }).ToList();
    
                ASPxGridView1.DataSource = slider;
            
            }

    Html

    <dx:ASPxComboBox ID="ASPxComboBox1" runat="server" ValueType="System.String">
                    
                </dx:ASPxComboBox>
    
                <dx:ASPxComboBox ID="ASPxComboBox2" runat="server" ValueType="System.String">
                </dx:ASPxComboBox>
    
                <dx:ASPxComboBox ID="ASPxComboBox3" runat="server" ValueType="System.String">
                </dx:ASPxComboBox>
    
                <dx:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False" KeyFieldName="ID" OnDataBinding="ASPxGridView1_DataBinding">
                    <SettingsPager NumericButtonCount="5" PageSize="5">
                    </SettingsPager>
                    <Settings ShowFilterRow="True" ShowGroupPanel="True" />
                    <Columns>
                        <dx:GridViewCommandColumn ShowClearFilterButton="True" VisibleIndex="0">
                        </dx:GridViewCommandColumn>
                        <dx:GridViewDataTextColumn FieldName="ID" ReadOnly="True" ShowInCustomizationForm="True" VisibleIndex="1">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="Dil" ShowInCustomizationForm="True" VisibleIndex="2">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="SliderBaslik" ShowInCustomizationForm="True" VisibleIndex="3">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="SliderAciklama" ShowInCustomizationForm="True" VisibleIndex="4">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="SliderYol" ShowInCustomizationForm="True" VisibleIndex="5">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="Sira" ShowInCustomizationForm="True" VisibleIndex="6">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="AdminID" ShowInCustomizationForm="True" VisibleIndex="7">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataDateColumn FieldName="Tarih" ShowInCustomizationForm="True" VisibleIndex="8">
                        </dx:GridViewDataDateColumn>
                        <dx:GridViewDataCheckColumn FieldName="Ok" ShowInCustomizationForm="True" VisibleIndex="9">
                        </dx:GridViewDataCheckColumn>
                    </Columns>
                </dx:ASPxGridView>
    
    
            </div>

    Saturday, August 12, 2017 8:31 PM

All replies

  • User-1716951449 posted

    https://www.devexpress.com/Support/Center/

    Wednesday, August 16, 2017 5:18 AM