Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > TextBox Value

Reply
Thread Tools

TextBox Value

 
 
Simon Abolnar
Guest
Posts: n/a
 
      04-24-2005
I have TextBox column in datagrid.
I would like to update database with values when user click on button
(outside datagrid).

Dim cell As TableCell=datagrid.Items(row).Cells(col)
textbox=CType(cell.FindControl("TextBox1"), TextBox)

If user change text of TextBox in one column, command:
textbox.Text

display old value (not entered).
How can I find out changed text.

Thanks for help!

Simon


 
Reply With Quote
 
 
 
 
Elton W
Guest
Posts: n/a
 
      04-24-2005
Hi Simon,

If you rebind the datagrid's data source, the user entered
value is overwrited by data source (old) value. In order
to get user entered value, don't run command

datagrid.DataSource = dataobject

before button_click event.

HTH

Elton Wang



>-----Original Message-----
>I have TextBox column in datagrid.
>I would like to update database with values when user

click on button
>(outside datagrid).
>
>Dim cell As TableCell=datagrid.Items(row).Cells(col)
>textbox=CType(cell.FindControl("TextBox1"), TextBox)
>
>If user change text of TextBox in one column, command:
>textbox.Text
>
>display old value (not entered).
>How can I find out changed text.
>
>Thanks for help!
>
>Simon
>
>
>.
>

 
Reply With Quote
 
 
 
 
Simon Abolnar
Guest
Posts: n/a
 
      04-25-2005
Thank you for help!
I don't understand the answer. I don't do nothing to grid before
button_click event.

Simon

"Elton W" <> wrote in message
news:178b01c5491d$7178d270$...
> Hi Simon,
>
> If you rebind the datagrid's data source, the user entered
> value is overwrited by data source (old) value. In order
> to get user entered value, don't run command
>
> datagrid.DataSource = dataobject
>
> before button_click event.
>
> HTH
>
> Elton Wang
>
>
>
>>-----Original Message-----
>>I have TextBox column in datagrid.
>>I would like to update database with values when user

> click on button
>>(outside datagrid).
>>
>>Dim cell As TableCell=datagrid.Items(row).Cells(col)
>>textbox=CType(cell.FindControl("TextBox1"), TextBox)
>>
>>If user change text of TextBox in one column, command:
>>textbox.Text
>>
>>display old value (not entered).
>>How can I find out changed text.
>>
>>Thanks for help!
>>
>>Simon
>>
>>
>>.
>>



 
Reply With Quote
 
Elton W
Guest
Posts: n/a
 
      04-26-2005
Do you only bind datagrid's data source when it's not
postback? If not, when you click button, it re-binds the
datagrid's data source first, then goes to button_click
event.

HTH

Elton


>-----Original Message-----
>Thank you for help!
>I don't understand the answer. I don't do nothing to grid

before
>button_click event.
>
>Simon
>
>"Elton W" <> wrote in

message
>news:178b01c5491d$7178d270$...
>> Hi Simon,
>>
>> If you rebind the datagrid's data source, the user

entered
>> value is overwrited by data source (old) value. In order
>> to get user entered value, don't run command
>>
>> datagrid.DataSource = dataobject
>>
>> before button_click event.
>>
>> HTH
>>
>> Elton Wang
>>
>>
>>
>>>-----Original Message-----
>>>I have TextBox column in datagrid.
>>>I would like to update database with values when user

>> click on button
>>>(outside datagrid).
>>>
>>>Dim cell As TableCell=datagrid.Items(row).Cells(col)
>>>textbox=CType(cell.FindControl("TextBox1"), TextBox)
>>>
>>>If user change text of TextBox in one column, command:
>>>textbox.Text
>>>
>>>display old value (not entered).
>>>How can I find out changed text.
>>>
>>>Thanks for help!
>>>
>>>Simon
>>>
>>>
>>>.
>>>

>
>
>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pass value from activex textbox to webform textbox AGSHAR ASP .Net 1 05-31-2008 12:00 PM
how to transfer textbox value from .net page to html page textbox? Steve Javascript 4 02-07-2006 06:30 PM
ASP.NET textbox loses text value in composite control but Textbox subclass doesn't!? ErwinP ASP .Net Web Controls 1 08-19-2005 01:50 PM
RE: Textbox postback putting value,value =?Utf-8?B?QW5hY2hvc3RpYw==?= ASP .Net 1 06-21-2004 10:50 AM
Re: VERY STRANGE BUG? Adding a textbox control causes other textbox control to fail??? S. Justin Gengo ASP .Net 0 07-16-2003 06:51 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57