473,583 Members | 3,010 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem in dropdown list in Datagrid..Its urgent

8 New Member
Hi All,

>I am using datagrid control in asp.net with C#.
>I have two dropdown list in datagrid e.g. one dropdown have Classname and another have Studentname.
>now I want to show all the studentname in second dropdown related to their class selected in first dropdown.
>plz help me in above.
>Remember i am using both dropdown in a datagrid....... ...

Thanks.
Mar 29 '07 #1
4 1441
prabunewindia
199 New Member
Hi All,

>I am using datagrid control in asp.net with C#.
>I have two dropdown list in datagrid e.g. one dropdown have Classname and another have Studentname.
>now I want to show all the studentname in second dropdown related to their class selected in first dropdown.
>plz help me in above.
>Remember i am using both dropdown in a datagrid....... ...

Thanks.
first get the selected class name from the first dropdown list
then get the students name related to that class using query
"select studentName from students where class='that selected class'"
then bind the data to the 2nd one
Mar 29 '07 #2
knknknkn
10 New Member
1.adde dropdowns dynamically to grid.if they are added statically,then u cannot access or capture their raised events .before adding classDDL bind it to its datasource.base d on selected value bind second DDL .
added the DDL"s in ITEM CREATED EVENT OF THE DATA GRID
Mar 29 '07 #3
youvrajasnsm
8 New Member
1.adde dropdowns dynamically to grid.if they are added statically,then u cannot access or capture their raised events .before adding classDDL bind it to its datasource.base d on selected value bind second DDL .
added the DDL"s in ITEM CREATED EVENT OF THE DATA GRID
Sir I want to know: Inwhich event of datagrid i have to bound the second dropdown with the selected item of first Dropdown List.
tell me in detail.....Its Urgent.
Mar 29 '07 #4
youvrajasnsm
8 New Member
first get the selected class name from the first dropdown list
then get the students name related to that class using query
"select studentName from students where class='that selected class'"
then bind the data to the 2nd one
Sir I want to know: Inwhich event of datagrid i have to bound the second dropdown with the selected item of first Dropdown List.
tell me in detail.....Its Urgent.
Mar 29 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
6920
by: Michelle | last post by:
Hello, I put a dropdown list in ItemTemplate Column. I can select its value from the dropdown list and store in a dataset, but when I retrieve records from dataset, it doesn't show up in the datagrid. Is there anything I missed? and where can I find something for reference? Thanks. Here is html code snippets.
3
7304
by: Big Dave | last post by:
I know it's been asked a million times before, but I still can't seem to find an answer that works. I've got a dropdown list in the footer template of a datagrid. The dropdown list databinds, but I can't seem to add a blank item to the top of the dropdown list. I've tried using the code to add this by placing it in both the page_load...
1
1292
by: branton ellerbee | last post by:
Has anyone had this problem: you are using a datagrid that is populated by a filter. Let say for arguments sake, it is a list of clients. And you narrow the list with the alphabet using a dropdown or textbox. Either one makes no difference in this case. So, you have a dropdown and you jump from "A" to "J", and it brings back all of the...
6
5388
by: Jenna Alten | last post by:
I have a datagrid with a template column that contains a dropdown list. I currently fill and display the dropdown list on the page load. This is working correctly. I am NOT using an Edit Column. I am receiving errors when trying to set the selected value of the dropdown within the ItemDataBound() subroutine. Below is the code I am using. I...
2
1213
by: Waran | last post by:
I Want to add a dropdown box in a datagrid on Page_Load. This Datagrid shares two tables. One table contains Employee details, and the other having the list of projects the employee is working. Table 1 ------- Name DOB Address
2
2842
by: Peter | last post by:
ASP.NET 2003 In the DataGrid how do I select current cell value in the dropdown box when I click on the edit link, currently when I click on the edit link in the DataGrid the dropdown box appears in the cell, but allways the first item in the dropdown box is shown not the current cell value? How do I make the current value in the cell ...
6
5842
by: yasodhai | last post by:
Hi, I used a dropdown control which is binded to a datagrid control. I passed the values to the dropdownlist from the database using a function as follows in the aspx itself. <asp:DropDownList ID="FldType_add" Runat="server" DataSource='< %#GetFieldType()%>' DataValueField="Type" DataTextField="Type" /> Oce the page is loaded all the...
2
1550
by: msrahul | last post by:
HI ALL Plz Help Me. I have a datagrid with a few colums. One column is conaining 1's or 0's. Its like a flag column. It either has 0 or 1. Now what i need is that if any row has 1 in this column than another column named "Status" (of that row) should have a dropdown list conatining 4 items. This column can have values...
5
10331
by: =?Utf-8?B?Y2hlY2tyYWlzZXJAY29tbXVuaXR5Lm5vc3BhbQ== | last post by:
I have a VS 2008 ASP.NET webform that has a reportview tag on it, accessing an .RLDC report in local report. The columns for the report are essentially: Month Item #1 Item#2 Item#3 I would like to add a checkbox or dropdown control to the .RLDC and have Item #1, Item #2, or Item #3 display conditionally based on a checkbox being...
0
8327
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7935
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8193
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6579
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5701
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5374
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3818
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3843
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1433
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.