-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: Guru
Message 1 in Discussion
Hello guys,
i have a datagrid with the checkbox in it.
i have filled my datagrid with Datset
dim obj_ds as new dataset
objadapter = New SqlDataAdapter(sqlqry, cn)
cmdb = New SqlCommandBuilder(objadapter)
objadapter.Fill(obj_ds, "orders")
ldata.DataSource = obj_ds
ldata.DataBind()
when i click on a update button.
following code runs
minpageval = (ldata.CurrentPageIndex) * 10
maxpageval = obj_ds.Tables(0).Rows.Count
For x = minpageval To maxpageval
If CType(ldata.Items(gridrowcount).Cells(3).FindControl("ch1"),
CheckBox).Checked = True Then
obj_ds.Tables(0).Rows(x).Item("voiddate") = "0-" & Format(Now, "MM/dd/yyyy")
End If
gridrowcount += 1
Next
objadapter.Update(obj_ds, "orders")
but when i execute this code, its showing me error
Index was out of range. Must be non-negative and less than the size of the
collection. Parameter name: index
on this line
If CType(ldata.Items(gridrowcount).Cells(3).FindControl("ch1"),
CheckBox).Checked = True
please advice.
guru
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/BDOTNET/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you
received this message by mistake, please click the "Remove" link below. On the
pre-addressed e-mail message that opens, simply click "Send". Your e-mail
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]