Hi guys. This is my first post here. Please guide me in posting here. :wave:
I have a Datatable that is filled in from user inputs which i got from different forms.
Then i converted my Datatable to a binding source and applied a filter
Then I Set my Datagridview1.Datasource to my Binding Source.
My question is:
I need to update/delete data from my Datatable
but i dont know how to access it because i cant use
because my data in my datagrid is filtered by my binding source.
Here Sample data/columns in my table
Sorry i dont know how to use tables here :(
Name Id auto increment) Color Address
John 1 Red USA
Mark 2 Green USA
Peter 3 Blue Australia
Mary 4 Yellow Australia
Jack 5 Orange Australia
Now here is my datagrid filtered by address('usa')
Name Id auto increment) Color Address
John 1 Red USA DELETEbutton
Mark 2 Green USA DELETEbutton
Now here is my datagrid filtered by address('australia')
Name Id auto increment) Color Address
Peter 3 Blue Australia DELETEbutton
Mary 4 Yellow Australia DELETEbutton
Jack 5 Orange Australia DELETEbutton
How Can i Delete the actual data right straight to my Datatable if im showing it using Bindsource in my Datagrid?
Thank you More Power!
I have a Datatable that is filled in from user inputs which i got from different forms.
Code:
Dim temptable as Datatable
Code:
Dim bs as new BindingSource
bs.DataSource = temptable
bs.Filter = "WorkName LIKE '%" & txtWorkName.Text & "%' "
Code:
DataGridView1.DataSource = bs
I need to update/delete data from my Datatable
Code:
Temtable
Code:
Rowindex
Here Sample data/columns in my table
Sorry i dont know how to use tables here :(
Code:
TempTable
John 1 Red USA
Mark 2 Green USA
Peter 3 Blue Australia
Mary 4 Yellow Australia
Jack 5 Orange Australia
Now here is my datagrid filtered by address('usa')
Code:
bs.Filter("Address LIKE" "& USA &"")
Code:
Datagridview1.Datasource = bs
John 1 Red USA DELETEbutton
Mark 2 Green USA DELETEbutton
Now here is my datagrid filtered by address('australia')
Code:
bs.Filter("Address LIKE" "& australia &"")
Code:
Datagridview1.Datasource = bs
Peter 3 Blue Australia DELETEbutton
Mary 4 Yellow Australia DELETEbutton
Jack 5 Orange Australia DELETEbutton
How Can i Delete the actual data right straight to my Datatable if im showing it using Bindsource in my Datagrid?
Thank you More Power!