Ask a Question related to ASP.NET General, Design and Development.
-
Jim Cheshire #1
RE: When updating from a DataGrid the canges in textboxes are not detected
Boris,
What's in your Page_Load? Are you databinding on each postback? If so,
this can cause this problem. You should only databind on the intial
request in Page_Load. All other databinding should take place in other
places.
Jim Cheshire
Developer Support
ASP.NET
[email]jamesche@online.microsoft.com[/email]
This post is provided as-is with no warranties and confers no rights.
--------------------detected>From: "Boris Zakharin" <zakharin@alumni.upenn.edu>
>Subject: When updating from a DataGrid the canges in textboxes are not>Date: Mon, 28 Jul 2003 13:05:52 -0400
>Lines: 30
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
>Message-ID: <OHYsBqSVDHA.2364@TK2MSFTNGP09.phx.gbl>
>Newsgroups: microsoft.public.dotnet.framework.aspnet
>NNTP-Posting-Host: pcp109626pcs.wchryh01.nj.comcast.net 68.45.80.28
>Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP09.phx.gbl
>Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:162691
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
>
>I have the following function to update data from a DataGrid
>----------------------
>private void DataGrid1_UpdateCommand(object source,
>System.Web.UI.WebControls.DataGridCommandEventArg s e)
>{
> string key = DataGrid1.DataKeys[e.Item.ItemIndex].ToString();
> TextBox tb;
> dsJobs2.jobsRow r;
> r = dsJobs21.jobs.FindByjob_id(int.Parse(key));
> for (int i = 1; i < DataGrid1.Columns.Count-1; ++i)
> {
> tb = (TextBox) e.Item.Cells[i].Controls[0];
> r.ItemArray[i] = tb.Text;
> Response.Write(tb.Text);
> }
> oleDbDataAdapter1.Update(dsJobs21);
> DataGrid1.EditItemIndex = -1;
> DataGrid1.DataBind();
>}
>
>-----------------------
>
>The Response.Write statement confirms that tb.Text lists the original value
>of the textbox, not the changes I have made. What could possibly be causing
>this?
>
>Thanks,
>Boris Zakharin
>
>
>Jim Cheshire Guest
-
TextBoxes in DataGrid/List
Hello, I need to display & edit some data comming form the middle tier in a DataGrid or DataList control. Upon databinding, the control should... -
Datagrid with textboxes on itemtemplate
Hello I have datagrid that by defect in a column of itemtemplate I place textbox. The application is of the goals of a soccer game Then it appears... -
ASP.NET Datagrid filling textboxes
I am currently filling textboxes with the data from a datagrid with the following code: Sub Fillnextrecord(ByVal e As DataGridCommandEventArgs) ... -
Datagrid EDIT using Main form textboxes
Hi Folks I am using datagrid to display ,delete ,edit records. I have main form on top of the page which are text boxes when they click on... -
Adding textboxes for filtering in DataGrid header
Hi All, - Visual Studio 2002 - VB.NET > ASP.NET I created a DataGrid on a webform. This datagrid has sorting enabled. I want to create in the... -
Boris Zakharin #2
Re: When updating from a DataGrid the canges in textboxes are not detected
Thanks a lot. That was the problem.
"Jim Cheshire (MS)" <jamesche@online.microsoft.com> wrote in message
news:4X7qI8UVDHA.2120@cpmsftngxa06.phx.gbl...> Boris,
>
> What's in your Page_Load? Are you databinding on each postback? If so,
> this can cause this problem. You should only databind on the intial
> request in Page_Load. All other databinding should take place in other
> places.
>
> Jim Cheshire
> Developer Support
> ASP.NET
> [email]jamesche@online.microsoft.com[/email]
>
> This post is provided as-is with no warranties and confers no rights.
Boris Zakharin Guest
-
Jim Cheshire #3
Re: When updating from a DataGrid the canges in textboxes are not detected
Hi Boris,
Glad to help.
Jim Cheshire
Developer Support
ASP.NET
[email]jamesche@online.microsoft.com[/email]
This post is provided as-is with no warranties and confers no rights.
--------------------<4X7qI8UVDHA.2120@cpmsftngxa06.phx.gbl>>From: "Boris Zakharin" <zakharin@alumni.upenn.edu>
>References: <OHYsBqSVDHA.2364@TK2MSFTNGP09.phx.gbl>detected>Subject: Re: When updating from a DataGrid the canges in textboxes are not>Date: Mon, 28 Jul 2003 21:18:23 -0400
>Lines: 19
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
>Message-ID: <uBgJP9WVDHA.2012@TK2MSFTNGP10.phx.gbl>
>Newsgroups: microsoft.public.dotnet.framework.aspnet
>NNTP-Posting-Host: pcp109626pcs.wchryh01.nj.comcast.net 68.45.80.28
>Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP10.phx.gbl
>Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:162825
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
>
>Thanks a lot. That was the problem.
>
>"Jim Cheshire (MS)" <jamesche@online.microsoft.com> wrote in message
>news:4X7qI8UVDHA.2120@cpmsftngxa06.phx.gbl...>>> Boris,
>>
>> What's in your Page_Load? Are you databinding on each postback? If so,
>> this can cause this problem. You should only databind on the intial
>> request in Page_Load. All other databinding should take place in other
>> places.
>>
>> Jim Cheshire
>> Developer Support
>> ASP.NET
>> [email]jamesche@online.microsoft.com[/email]
>>
>> This post is provided as-is with no warranties and confers no rights.
>
>Jim Cheshire Guest



Reply With Quote

