Yeah, I used this technique a lot on the good ole datagrid.
Not sure why the item.findcontrol method has been removed
from the Gridview control. I cannot seem to find any info
on this either. Maybe you will have better luck!
Thanks!
Bob
-------------- Original message --------------
From: "Dean Fiala" <dfiala gmail.com>
Bob,
Darn. You're right. I'll have take a look at this later --
looks like I'm
going to have to learn a new trick.
Dean
On 1/29/07, rherrmann05 comcast.net <rherrmann05 comcast.net> wrote:
>
> Hey Dean. Thanks for the reply. Actually I tried that
before I posted
> here. I get this error when I try this:
>
> Item is not a member of
System.Web.Iu.Webcontrols.GridviewUpdateEventArgs.
>
> Thanks,
> Bob
>
>
> -------------- Original message --------------
> From: "Dean Fiala" <dfiala gmail.com
<dfiala%40gmail.com>>
> Dim tCaseVolume As TextBox = CType(e.Item.FindControl
> ("YourTextBoxNameHere",
> TextBox)
>
> On 1/29/07, rherrmann05 comcast.net
<rherrmann05%40comcast.net> <
> rherrmann05 comcast.net
<rherrmann05%40comcast.net>> wrote:
> >
> > Hi all,
> >
> > I have a gridview on a web page and now want to
make a few columns
> > editable. I used to do this with a datagrid and
never had a problem. But
> I
> > am struggling with the gridview syntax. Presently,
I can click the Edit
> > button on a row in my grid and the editable column
becomes a textbox.
> The
> > Updat and Cancel buttons are now displayed. The
Cancel button works
> fine.
> > But I do not know how to extract the value of the
textbox so that i can
> save
> > it. I am very close. Maybe someone can help me.
Here is my code: The
> line
> > where I Dim tCaseVolume is where I am having
problems getting my value.
> >
> > Sub UpdateRow(ByVal sender As Object, ByVal e As
> > System.Web.UI.WebControls.GridViewUpdateEventArgs)
Handles
> > gvCategories.RowUpdating
> > Dim tCaseVolume As TextBox =
CType(e.NewValues().Item(0), TextBox)
> > Dim objPerformanceMinimums As New
> >
PerformanceMinimums(Session("ConnectionString"))
> > objPerformanceMinimums.Save(0,
CInt(Session("ProjectID")),
> > tCaseVolume.Text)
> > gvCategories.EditIndex = -1
> > BindGrid()
> > End Sub
> >
> > Thanks!
> > Bob
> >
> > [Non-text portions of this message have been
removed]
> >
> >
> >
>
> --
> Dean Fiala
> Very Practical Software, Inc
> Now with Blogging...
> http://www.vpsw.com/blog
baby
> Microsoft MVP
>
> [Non-text portions of this message have been removed]
>
> [Non-text portions of this message have been removed]
>
>
>
--
Dean Fiala
Very Practical Software, Inc
Now with Blogging...
http://www.vpsw.com/blog
baby
Microsoft MVP
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:AspNetAnyQuestionIsOk-digest@yahoogroups.com
mailto:AspNetAnyQuestionIsOk-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
AspNetAnyQuestionIsOk-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.c
om/info/terms/
|