如何在AspxGridView的编辑模式下隐藏级联的组合框. [英] How to hide cascaded combo boxes in edit mode of AspxGridView.

查看:90
本文介绍了如何在AspxGridView的编辑模式下隐藏级联的组合框.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


当在AspxGridview的编辑模式下使用时,能否请您提供一些解决方案,以使级联下拉菜单按预期工作.
我正在使用DevExpress控件.

我的要求如下:

如果我选择country ="United States",则填充州"组合框,并在选择州"时填充城市"组合框.

如果我选择国家/地区"以外的其他名称,则选择美国",然后仅使用所选国家/地区"的城市填充城市"组合框,而无需填充州"组合框.另外,我需要隐藏状态"组合框.

Hi
Can you please provide me some resolution to make the cascading dropdowns work as expected when used inside edit mode of AspxGridview.
I am using DevExpress Controls.

My requirement is as follow:

If I select country="United States" then populate the "State" combobox and on selection of "State" populate the "City" combobox.

If I select "country" other then "United States" then populate only "City" combobox with cities of selected "country" and no need to populate the "State" combobox. Also I need to hide the "State" combobox.

i.e. like----------Country---------State--------City
---------ROW1------united states---Alaska-------Douglas
---------ROW2------Canada-----------------------Toronto
---------ROW3------Australia--------------------Sydeny
---------ROW4------united states---California---Yuba City



在Editmode中也需要相同的内容.
请帮助我,我需要尽快.

问候,
Pankaj.



Same is required in Editmode also.
Please help me I need to do it ASAP.

Regards,
Pankaj.

推荐答案

Protected Sub ddlCountry_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs)
      If ddlCountry.SelectedItem.Value = "US" Then
             ddlState.Visible = True
             txtState.Visible = False
             PopulateState();//Based on Country
      Else
             ddlState.Visible = False
             txtState.Visible = True
             PopulateCity();//Based on Country
      End If
End Sub



顺便说一句,根据您的需要进行更改.



BTW Do changes based on your need.


这篇关于如何在AspxGridView的编辑模式下隐藏级联的组合框.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆