Click here to Skip to main content
15,885,086 members
Please Sign up or sign in to vote.
1.60/5 (3 votes)
See more:
I have a gridview contain dropdownlist.When i select value in first row,selected value must not to show in other rows.example i have 5 room no with 5 user if user select room 1 means ,room 1(dropdown) not to show with other users(remaining drop down).Please explain on this
Posted
Updated 28-Aug-15 0:16am
v2
Comments
Thanks7872 28-Aug-15 6:24am    
What have you tried?
SathishRam 28-Aug-15 6:39am    
This is my code:
Private Sub grdOccupants_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles grdOccupants.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
Dim ddlRoomNo As DropDownList = DirectCast(e.Row.FindControl("ddlRoomNo"), DropDownList)
Dim upto As Integer = ViewState("MaxOcc")
ddlRoomNo.Items.Insert(0, "---Select Room No---")
Dim index As Integer = 1
For i As Integer = 1 To upto
ddlRoomNo.Items.Insert(index, New ListItem(i.ToString(), i.ToString()))
index += 1
Next
End If
End Sub
SathishRam 28-Aug-15 6:40am    
Griedview Dropdown Selected value not to show in other row dropdownlistin grid

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900