hi i have a DataGrid with a checkbox written in vb.net code i want to save the
viewstate of the checkbox in the DataGrid throught the postback i use this code
Private Sub Render_Page(ByVal sender As Object, ByVal e As EventArgs) Handles
MyBase.PreRender
Dim Lint As Integer
Dim Unique As String
For Lint = 0 To ContactsGrid.Items.Count - 1
Unique = CStr(CInt(ContactsGrid.CurrentPageIndex * ContactsGrid.PageSize + Lint))
If ViewState("MyGridCheckboxStatus" + Unique) <> Null Then
CType(ContactsGrid.Items(Lint).Cells(0).FindControl("DeleteThis"), CheckBox).Checked =
CType(ViewState("MyGridCheckboxStatus" + Unique), Boolean)
End If
Next
End Sub
and i try to rewrite the entire code in the Sub in the PageIndexChange function and
the problem not solved
Thank's
---------------------------------
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/