Hi:
I'm having trouble with the DataGrids Update Project. It all seems fine, except the update never happens. I've tried to troubleshoot it, and I think I see where the problem is, but I have no idea how to fix it.
After editing the title field and clicking on the 'Update Now' link and placing a breakpoint on
objTextBox = E.Item.FindControl("edit_title")
objCommand.Parameters("@Title").Value = objTextBox.Text
I used the immediate window to show the value of objTextBox.Text, and it still refers to the unmodified value. Obviously, that's a problem, but I don't know what to do about it. If I use the immediate window to modify the objTextBox.Text value for '@Title' and then continue to run, the update works just fine.
If it helps, here is the source from my page while in edit mode:
<tr style="background-color:WhiteSmoke;">
<td nowrap="nowrap">
<a href="javascript
:__doPostBack('grdAuthors:_ctl5:_c tl0','')">Update Row</a> <a href="javascript
:__doPostBack('grdAuthors:_ctl5:_c tl1','')">Cancel Edit</a>
</td>
<td nowrap="nowrap">
DeFrance
</td>
<td nowrap="nowrap">
Michel
</td>
<td nowrap="nowrap">
<input name="grdAuthors:_ctl5:edit_title" type="text" value="The Gourmet Microwave" id="grdAuthors__ctl5_edit_title" style="font-family:Verdana;font-size:8pt;width:400px;" />
</td>
<td align="Right">
<input name="grdAuthors:_ctl5:edit_price" type="text" value="$2.99" id="grdAuthors__ctl5_edit_price" style="font-family:Verdana;font-size:8pt;width:50px;" />
</td>
</tr>
The only other potential gotcha that I can think of is that I'm currently using
VB.Net 2002, not 2003. Waiting for my 2003 update. I'd be surprised if that is the difference, but not overly so. I looked for a specific
VB.NET 2003 requirement, but I didn't find any.
I downloaded the code for the book, but this project isn't included, only the Client-Server Processing project.
Thanks for any help that you can provide.
JK