Link to home
Start Free TrialLog in
Avatar of aspnerd_55
aspnerd_55

asked on

When records from loaded gridview1 are checked and moved to gridview2, I need the record to delete in the grdiview1 each time.

Hi,

Please find attached aspx web page and code behind which loads grdiview1 from a datatable.  When each record is checked and selected in gridview1 and the button is selected to move the record to grdiview2, I need for the checked record in Gridview1 to delete and not show any longer.

How can this be done with vb coding inside the code behind file.  I have attached the web form aspx page and the web form code behind page using vb.

This application is using the Northwind database.

 My actual application using this little application as a guide will load a datatable which will fill a grdiview from a stored procedure.  When I select the record in gridview1, I need the record to move to gridview2 ,but delete out each time which indicates something has happened with this record.
Moving-aspx.docx
Moving-aspx-vb.docx
MovingwebConfigurationFile.docx
SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of aspnerd_55
aspnerd_55

ASKER

Code Cruiser,

I am getting a blue squiggly line on dvRow saying "dvrow" has not been declared.  Does the dvrow need declaring with a Dim statement somewhere?

aspnerd_55
Sorry that would be gvRow.
CodeCruiser,

I used the "gvRow" but I am getting an error message that there can't be a delete with an SQL DataSource.  You have to indicate somehow in a command for the gridview.  

I am moving spaces to each like this:

gvRow.Cells(1).Text = ""
                gvRow.Cells(2).Text = ""
                gvRow.Cells(3).Text = ""
                gvRow.Cells(4).Text = ""
                gvRow.Cells(5).Text = ""
                gvRow.Cells(6).Text = ""
                gvRow.Cells(7).Text = ""
                checkbox.Checked = False

I need to get rid of the check box even showing though if I can.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial