hello all,
kindly help me for this
i have one form with datagridview in vb.net and 5 textbox
for filing GDV i am using code:
Dim a As String = txttable.Text
DataAdapter1 = New OleDbDataAdapter("Select * From " & txttable.Text & " where [pay_year] = '" & cmbSyear.Text & "' AND" _
& "[pay_month] = '" & cmbSmonth.Text & "' ORDER BY payID", Con)
DataSet2.Clear()
DataAdapter1.Fill(DataSet2, "" & txttable.Text & "")
DGVspandey.DataSource = DataSet2
DGVspandey.DataMember = "" & txttable.Text & ""
DGVspandey.Refresh()
after that databinding with this:
lblgrossS.DataBindings.Clear()
lblgrossS.DataBindings.Add("Text", DataSet2, ("'" & txttable.Text & "'")(CInt(".grand_total "))).ToString()
but getting error
Conversion from string ".grand_total " to type 'Integer' is not valid.
kindly help me for this
thanks in advence