RE: innertext, javascript, datagrid, database update
- From: "Phillip Williams" <Phillip.Williams@xxxxxxxxxxxx>
- Date: Mon, 22 Aug 2005 10:46:02 -0700
Hello Lyners,
In this very simple demo, I copy the value and am still able to retrieve it
upon postback: http://www.societopia.net/samples/datagrid_2.aspx
Maybe there is a step in your code that is resetting this value.
BTW, did you find out why the image title was not working when you moved the
mouse over the copy image in the last example (in a previous thread on this
issue)?
--
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Lyners" wrote:
> Hi Phillip,
> I did the dgi.Cells(11).Controls.count and got a result of 0. I tried
> attributes too only to get a zero value for that. I don't have any controls
> in the datagrid cell. I am just loading the cells innertext with the users id
> for everyline that they modify.
>
> What I want to have happen is when they "update" the page via a postback
> that the cell value is passed back to the server so the code can update the
> userid field in the database. it appears that the cell is not passing back
> any values.
>
> Any suggestions on a better way to code this, or how to make this work?
>
>
> "Phillip Williams" wrote:
>
> > In VS.net, use the debugger to step through the code and examine the value of
> > dgi.Cells(11).Controls.count. Are there other controls in this cell? The
> > value you are looking for might be in one of those controls rather than in
> > the Text property of the cell itself.
> >
> > HTH
> > --
> > Phillip Williams
> > http://www.societopia.net
> > http://www.webswapp.com
> >
> >
> > "Lyners" wrote:
> >
> > > I have a web page writen in ASP.NET that contains some javascript so that
> > > when a user presses a button, or edits a certain field in a datagrid, another
> > > cell in the datagrid is filled with a value.
> > >
> > > My probelm.... when I have the user press the update button (which does a
> > > post back that loops through the datagrid and updates a database) the
> > > field/cell that is filled by the javascript appears to be blank in my update
> > > code, even though I can see it on the screen.
> > >
> > > My java script code that populates the desired cell (this works);
> > >
> > > function AddRequesterName(imgObj)
> > > {
> > > imgObj.parentNode.parentNode.childNodes(8).innerText=UserName.outerText;
> > > }
> > >
> > > My code in the VB.NET that updates the database;
> > >
> > > Dim strEntryID As String = dgi.Cells(11).Text
> > >
> > > This works for all the other fields in the grid, except this one? The reason
> > > why it is cell(11) is because there are 3 hidden cells in the display.
> > >
> > > I have a felling it has something to do with innertext and referencing
> > > cell.text, but the cells attribute doesn't have an innertext.
> > >
> > > Any help on this?
> > >
> > > Lyners
> > >
.
- Follow-Ups:
- RE: innertext, javascript, datagrid, database update
- From: Lyners
- RE: innertext, javascript, datagrid, database update
- References:
- innertext, javascript, datagrid, database update
- From: Lyners
- RE: innertext, javascript, datagrid, database update
- From: Phillip Williams
- RE: innertext, javascript, datagrid, database update
- From: Lyners
- innertext, javascript, datagrid, database update
- Prev by Date: Downloading a file through http:
- Next by Date: Re: Not able to load web user control dynamically in ASP .Net 2.0
- Previous by thread: RE: innertext, javascript, datagrid, database update
- Next by thread: RE: innertext, javascript, datagrid, database update
- Index(es):
Relevant Pages
|