|
-
Dec 4th, 2008, 11:27 AM
#1
Thread Starter
New Member
-
Dec 8th, 2008, 03:03 PM
#2
Re: [2005] Problems with Gridview and Postback
Has EnableViewState been set to true for the GridView? What might be happening (cannot be sure without looking at code) is that you are not rebinding on postback and so the dynamically created rows are being lost somehow. However, if they are dynamically created, they should be recreated in the Init event before each page load, so that when the button click event (continuar) is finally raised, all the control values are available to you.
-
Dec 10th, 2008, 07:20 AM
#3
Thread Starter
New Member
Re: [2005] Problems with Gridview and Postback
Thank's for your reply...
Has EnableViewState been set to true for the GridView? -> Yes
I'll have a solution, I call the checkbox and textbox fields with:
HTML Code:
Dim Keys() As String
Dim FormElements As NameValueCollection
Dim Counter1 As Integer
FormElements = Request.Form
Keys = FormElements.AllKeys
For Counter1 = 0 To Keys.GetUpperBound(0)
If Keys(Counter1).IndexOf("check") <> -1 Then
'find a checkbox
End If
If Keys(Counter1).IndexOf("textbox") <> -1 Then
'find a textbox
End If
Next
thanks!!
-
Dec 11th, 2008, 01:41 PM
#4
Re: [2005] Problems with Gridview and Postback
That'd be another way to do it I suppose, but if you keep working with dynamic controls, you'll need to keep the recreation of controls in mind as it can be cumbersome to have to do this 'manually' each time.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|