Actually i have a Combo Box and button in my application .In this Appn I used autogeneratecolumns = false and i added some columns to datagridview with datapropertyname in the Button. First time When i click the button it properly Binding but When i select Combo Box After button click some columns of query related data is not binding.
Note:Whatever i mentioned the columns with datapropertyname is not binding in datagridview when i select Combo box. Vb.net
Dim cmd As New SqlCommand("SELECT * FROM Queries where Querys like '%" + ddlQuerys.Text + "%'", con)
cmd.CommandType = CommandType.Text
Dim sda As New SqlDataAdapter(cmd)
Dim ds As New DataSet()
gvInsuredData.Columns(0).Visible = True
gvInsuredData.Columns(1).Visible = True
sda.Fill(ds)
gvInsuredData.AutoGenerateColumns = False
gvInsuredData.DataSource = dt
gvInsuredData.Columns(2).Name = "personalPropertyItemID"
gvInsuredData.Columns(2).HeaderText = " Item ID"
gvInsuredData.Columns(2).DataPropertyName = "personalPropertyItemID"
gvInsuredData.Columns(3).Name = "personalPropertyQuantity"
gvInsuredData.Columns(3).HeaderText = "Qty"
gvInsuredData.Columns(3).DataPropertyName = "personalPropertyQuantity"
gvInsuredData.Columns(7).Name = "Age(y)"
gvInsuredData.Columns(7).HeaderText = "Age(y)"
gvInsuredData.Columns(7).DataPropertyName = "personalPropertyAge"
gvInsuredData.Columns(8).Name = "Age(m)"
gvInsuredData.Columns(8).HeaderText = "Age(m)"
gvInsuredData.Columns(8).DataPropertyName = "Personalpropertyagem"
gvInsuredData.Columns(9).Name = "Unit Cost"
gvInsuredData.Columns(9).HeaderText = "Unit Cost"
gvInsuredData.Columns(9).DataPropertyName = "personalPropertyCost"
gvInsuredData.Columns(10).Name = "Total Cost"
gvInsuredData.Columns(10).HeaderText = "Total Cost"
gvInsuredData.Columns(10).DataPropertyName = "PersonalPropertyTotalCost"
Dim AytC As Keyoti.RapidSpell.Grid.AYTDataGridViewTextBoxColumn = New Keyoti.RapidSpell.Grid.AYTDataGridViewTextBoxColumn()
AytC.HeaderText = "DescriptionProperty"
AytC.Name = "Description"
AytC.DataPropertyName = "personalPropertyDescription"
gvInsuredData.Columns(5).DataPropertyName = "personalPropertyDescription"
gvInsuredData.DataSource = ds.Tables(0)
Dim AytCtb As Keyoti.RapidSpell.Grid.AYTDataGridViewTextBoxColumn = New Keyoti.RapidSpell.Grid.AYTDataGridViewTextBoxColumn()
AytCtb.HeaderText = "SourceProperty"
AytCtb.Name = "Source"
gvInsuredData.Columns(6).DataPropertyName = "personalPropertySource"
gvInsuredData.DataSource = ds.Tables(0)
Item ID,Qty,Age(Y),Age(m),unit cost and total cost columns are not binding when i select combobox but other columns data is binding