Dear All,
please check for belows...
Creating the scenes:
1- setting the sources for grid and combocolumn...
Dim Mycon As New SqlConnection
Mycon.ConnectionString = "Data Source=YAGESRV\SQLSRV2008;Initial Catalog=TEST;User ID=sa;Password=1234sax."
Mycon.Open()
Dim Mycmd As New SqlCommand("", Mycon)
Mycmd.CommandText = "select ID, BEDEN from tbl_Beden "
For Each table In MyDset.Tables
If table.ToString = "BEDEN" Then MyDset.Tables("BEDEN").Clear()
Next
Dim MyDAdp As New SqlDataAdapter(Mycmd)
MyDAdp.Fill(MyDset, "BEDEN")
RadGridView1.DataSource = MyDset.Tables("BEDEN")
RadGridView1.Refresh()
Mycmd.CommandText = "select ID, MUSTERITANIM, SENARYOTANIM, BEDENID from tbl_Musteri "
For Each table In MyDset.Tables
If table.ToString = "MUSTERI" Then MyDset.Tables("MUSTERI").Clear()
Next
MyDAdp.Fill(MyDset, "MUSTERI")
RadGridView2.DataSource = MyDset.Tables("MUSTERI")
RadGridView2.Refresh()
Dim ComboBox2 As New GridViewComboBoxColumn()
ComboBox2.DataSource = MyDset.Tables("BEDEN")
ComboBox2.ValueMember = "ID"
ComboBox2.DisplayMember = "BEDEN"
ComboBox2.FieldName = "BEDENID"
RadGridView2.Columns.Add(ComboBox2)
MyDAdp.Dispose()
Mycmd.Dispose()
Mycon.Dispose()
Mycon.Close()
2- actions:
a. at the first grid left top of the picture, we are defining the items which will be used in the 2nd grid's combo column datas.
b. then we add a row to the second grid, no problem when adding.
c. then i delete all rows from 2nd grid. no problem when deleting.
d. then i delete all rows from first grid.no problem when deleting.
e. then i add new row to first grid, no problem when adding
f. then we choice the second grid and start to ad a new row... but at the begining of key press these is an item is coming to column BEDENID1 but i havent choiced anything yet !!! please look at the picture attached.
finally i realised that when i delete first main grid's all rows, there is a problem comes up about the realtions between 2nd grids comboboxcolumn...
Question: plese read the (2) and inform us if there are ant way to fix it up ?
please check for belows...
Creating the scenes:
1- setting the sources for grid and combocolumn...
Dim Mycon As New SqlConnection
Mycon.ConnectionString = "Data Source=YAGESRV\SQLSRV2008;Initial Catalog=TEST;User ID=sa;Password=1234sax."
Mycon.Open()
Dim Mycmd As New SqlCommand("", Mycon)
Mycmd.CommandText = "select ID, BEDEN from tbl_Beden "
For Each table In MyDset.Tables
If table.ToString = "BEDEN" Then MyDset.Tables("BEDEN").Clear()
Next
Dim MyDAdp As New SqlDataAdapter(Mycmd)
MyDAdp.Fill(MyDset, "BEDEN")
RadGridView1.DataSource = MyDset.Tables("BEDEN")
RadGridView1.Refresh()
Mycmd.CommandText = "select ID, MUSTERITANIM, SENARYOTANIM, BEDENID from tbl_Musteri "
For Each table In MyDset.Tables
If table.ToString = "MUSTERI" Then MyDset.Tables("MUSTERI").Clear()
Next
MyDAdp.Fill(MyDset, "MUSTERI")
RadGridView2.DataSource = MyDset.Tables("MUSTERI")
RadGridView2.Refresh()
Dim ComboBox2 As New GridViewComboBoxColumn()
ComboBox2.DataSource = MyDset.Tables("BEDEN")
ComboBox2.ValueMember = "ID"
ComboBox2.DisplayMember = "BEDEN"
ComboBox2.FieldName = "BEDENID"
RadGridView2.Columns.Add(ComboBox2)
MyDAdp.Dispose()
Mycmd.Dispose()
Mycon.Dispose()
Mycon.Close()
2- actions:
a. at the first grid left top of the picture, we are defining the items which will be used in the 2nd grid's combo column datas.
b. then we add a row to the second grid, no problem when adding.
c. then i delete all rows from 2nd grid. no problem when deleting.
d. then i delete all rows from first grid.no problem when deleting.
e. then i add new row to first grid, no problem when adding
f. then we choice the second grid and start to ad a new row... but at the begining of key press these is an item is coming to column BEDENID1 but i havent choiced anything yet !!! please look at the picture attached.
finally i realised that when i delete first main grid's all rows, there is a problem comes up about the realtions between 2nd grids comboboxcolumn...
Question: plese read the (2) and inform us if there are ant way to fix it up ?