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
elton_wang@hotmail.com
[quoted text, click to view] >-----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
>
>
>.
Thank you for help!
I don't understand the answer. I don't do nothing to grid before
button_click event.
Simon
[quoted text, click to view] "Elton W" <anonymous@discussions.microsoft.com> wrote in message
news:178b01c5491d$7178d270$a401280a@phx.gbl...
> 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
> elton_wang@hotmail.com
>
>
>>-----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
>>
>>
>>.
>>
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
[quoted text, click to view] >-----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" <anonymous@discussions.microsoft.com> wrote in
message
>news:178b01c5491d$7178d270$a401280a@phx.gbl...
>> 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
>> elton_wang@hotmail.com
>>
>>
>>>-----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
>>>
>>>
>>>.
>>>
>
>
>.
Don't see what you're looking for? Try a search.