找到用户控件的问题 [英] Problem in finding user control

查看:68
本文介绍了找到用户控件的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Everyone,



我有一个类GridView - > Page:GridView.cs

使用这个类我要添加用户控件

(两个DropDownList:1.ddlSubject,2.ddlTeacher)
GridView的每个单元格中的
,位于 - >页面:Default.aspx



现在当我更改ddlSubject的所选索引时调用SelectedIndexChange,这是在GridView.cs中(由于用户控制)

i可以找出发送者-ddlSubject的行索引



现在我想在ddlTeacher中绑定ddlSubject的所选索引更改中的数据



请帮助我..

Hello Everyone,

I have a class GridView -->Page: GridView.cs
using this class i am adding user controls
(two DropDownList: 1.ddlSubject, 2.ddlTeacher)
in each cell of GridView, which is in -->page: Default.aspx

Now when i change the selected index of ddlSubject SelectedIndexChange is called which is in GridView.cs (Because of user control)
i can find out the row index by sender-ddlSubject

Now i want to bind data in ddlTeacher in selected index change of ddlSubject

Please Help me..

推荐答案

虽然您没有将其标记为ASP.NET,但基于问题内容,​​它看起来像是一个ASP.NET问题。



现在,你问的是Grid中的Cascading下拉列表。您需要具有Cascading Dropdown,然后根据下拉值对Grid数据进行过滤。以下将有所帮助:

在ASP.NET GridView中实现Cascading DropDownList [< a href =http://www.dotnetcurry.com/ShowArticle.aspx?ID=221target =_ blanktitle =New Window> ^ ]

使用GridView中的数据库示例的Ajax级联DropDownList [ ^ ]
Though you have not tagged it as ASP.NET, based on the question content it does look like an ASP.NET question.

Now, what you ask is a Cascading dropdown in Grid. You need to have Cascading Dropdown in place and then based on the dropdown values a filter on Grid data. Following will help:
Implementing Cascading DropDownList in ASP.NET GridView[^]
Ajax Cascading DropDownList With Database Example in GridView[^]


这篇关于找到用户控件的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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