implement Drop Down list item in Gridview

Posted by New2net under ASP.NET on 3/16/2012 | Points: 10 | Views : 1456 | Status : [Member] | Replies : 5
implement Drop Down list item in Gridview


Hi All,

I have a big clarification in grid view, this question something interesting and also little duff.

I have table of three field namely id, name and destination

I know already how to add and display this three columns in grid view including check box & button for each row generated and fetching third column in drop down list.

I need to know when i checked the check box of particular column,then the drop down list item is selected and last finally the button is click, the output needed is another grid view (nested grid view)displaying the select row information.

I know its very interesting and simple for experts? I have attached the file for your reference.




Responses

Posted by: Sksamantaray on: 3/16/2012 [Member] Silver | Points: 25

Up
0
Down
Hi,
When user clicks on checkbox of row-2 the designation of that person to be automatically selected in Dropdown and then clicking on Show button it should show the innergrid with details of designation. is it?

Thanks,
Sanjay

New2net, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Nachi on: 3/17/2012 [Member] Starter | Points: 25

Up
0
Down
Yes and additionally following requirement needed

Grid view one, showing checkbox, id, name , destination. and button from table one, destination are Primary key
After selecting the destination from ddl when the show button is clicked, the another Grid view two will show at bottom of the same page of table two wants to display details column having full description of the destination code. In table two destination are Foreign key which reference to the table destination

Like if M02 meaning software engineer
M03 meaning Senior Software engineer

For your reference i have clearly make table 1 and table 2

table 1= id, name, destination
table2=destination, details
Gridview1 output= checkbox, id, name, destination(dropdownlist), button (checkbox and button generated for every row)
Gridview2 output = After checking the checkbox the destination changed and when button is clicked the gridview2 output will display with the details of destination.

Is this clear friend?

-N

New2net, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Nachi on: 3/17/2012 [Member] Starter | Points: 25

Up
0
Down
Yes and additionally following requirement needed

Grid view one, showing checkbox, id, name , destination. and button from table one, destination are Primary key
After selecting the destination from ddl when the show button is clicked, the another Grid view two will show at bottom of the same page of table two wants to display details column having full description of the destination code. In table two destination are Foreign key which reference to the table destination

Like if M02 meaning software engineer
M03 meaning Senior Software engineer

For your reference i have clearly make table 1 and table 2

table 1= id, name, destination
table2=destination, details
Gridview1 output= checkbox, id, name, destination(dropdownlist), button (checkbox and button generated for every row)
Gridview2 output = After checking the checkbox the destination changed and when button is clicked the gridview2 output will display with the details of destination.

Is this clear friend?



-N

New2net, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sksamantaray on: 3/17/2012 [Member] Silver | Points: 25

Up
0
Down

You have to have 3 stored procedures
1)to get id,name
2)to get Distination and DestinationID to fill the dropdownlist
3)to get DestinationDetails by DestinationID
In the page load Call procedure1 which will id,name and name for the outer gridview
Then in the row databound call the fillDropdown Method
You need to also check here if check box is selected and select button clicked
if yes the fill the inner grid passing the destinationid of selected destination(ddl) of the selected row which should fill the innergridview as well.




Thanks,
Sanjay

New2net, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Nachi on: 3/17/2012 [Member] Starter | Points: 25

Up
0
Down
friend can you share me the code here?

-N

New2net, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response