Please Help(Accessing Columns from a DG)

T

TheNAB

Hi
What i have actually done is that i have bounded a datagrid from a
tblTemp and then provided two checkboxes for the Admin to either
approve or reject the record. I have implemented the reject f(). I
have implemented the mechanism for detecting the checked boxes.
but when the admin approves of a record, then some fields of that
record must be copied to a tblCustomer and a tblUSer.
I just want to know Can i be able to access all of the DG fields . I
am currently not storing the info from tblTemp anywhere and am
directly binding using ExecuteREader(). Will i have to use a Data
Table or a DataSet? (CAn you give an example) . Thank You.
I am attaching the f() so that u can see what options do i have.

Regards
Nabil

'Event Handler for Post Button
' Main Function that handles all
public Sub OnPostClick(Sender as Object,e as EventArgs)

Dim Approve as CheckBox = nothing
Dim Reject as CheckBox = nothing

For Each MyItem as DataGridItem in DataGrid1.Items

' Heres the job to find the checked ones
Approve = MyItem.FindControl("Approve")
Reject = MyItem.FindControl("Reject")

if (Approve.Checked = true) then
'Check whether both have been Checked
if(Reject.Checked = true) then
' NEEED a Continue(C#-VB Equivalent) statement here
End if

'So approval is given
' Now here i need to access the elements of the
DG(or any other technique u suggest)

Else if (Reject.Checked = true) Then

'Rejection implies Deletion

' Code to delete

End If

Next
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top