Click here to Skip to main content
15,891,473 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to fill one dropdownlist from another dropdownlist selected change event in a datagrid in vb.net 1.1How to fill one dropdownlist from another dropdownlist in a datagrid in vb.net 1.1
Posted
Updated 18-Jul-11 20:06pm
v2
Comments
VenuKalyan 19-Jul-11 2:04am    
Iam Using vs.net 2003 with vb for coding...its web application

iam not having..that event grid_cellvaluechanged...

pls..give me another way...

1 solution

Private Sub YourGrid_CellValueChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles YourGrid.CellValueChanged
 
        If (e.ColumnIndex = -1 Or e.RowIndex = -1) Then
            Exit Sub
        End If
 
        If (TypeOf YourGrid.Item(e.ColumnIndex, e.RowIndex) Is DataGridViewComboBoxCell And YourGrid.Columns(e.ColumnIndex).Name.ToLower().Equals("YourColumn1")) Then
            Dim combotwo as DataGridViewComboBoxCell = DirectCast(YourGrid.Item("YourColumn2", e.RowIndex), DataGridViewComboBoxCell)
            combotwo.Items.Clear()
            'fill the data here
        End If
End Sub
 
Share this answer
 
Comments
VenuKalyan 19-Jul-11 10:49am    
Iam Using vs.net 2003 with vb for coding...its web application

iam not having..that event grid_cellvaluechanged...

pls..give me another way....

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