By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,665 Members | 1,229 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,665 IT Pros & Developers. It's quick & easy.

Update only few columns DATAGRID

P: n/a
Is it possible to update only few columns in datagrid during OnUpdateCommand
event ? If so, could you help me ....

-thanks
Jay
Nov 19 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Jay,

That is how the datagrid works by default. Only rows with changes will be
updated...

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Jay Villa" <ja******@community.nospam> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Is it possible to update only few columns in datagrid during
OnUpdateCommand event ? If so, could you help me ....

-thanks
Jay

Nov 19 '05 #2

P: n/a
Hi Jay,

As for the update few column in asp.net datagrid, do you means update the
displayed UI data on the page or updating the underlying data in database
or datasource? For displayed data on webpage UI, the current implemented
datagrid doesn't support update portion of the displayed data directly. The
only means to update the Datagrid's display data is to modify the
DataSource and rebind the Grid through DataBind() method. This is the same
with other template DataBound control such as DataList and Repeater...

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "Jay Villa" <ja******@community.nospam>
| Subject: Update only few columns DATAGRID
| Date: Tue, 6 Sep 2005 15:42:45 -0400
| Lines: 7
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| Message-ID: <#V**************@TK2MSFTNGP10.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: net-66-94-94-66.arpa.fidelityaccess.net 66.94.94.66
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP10.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:122693
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Is it possible to update only few columns in datagrid during
OnUpdateCommand
| event ? If so, could you help me ....
|
| -thanks
| Jay
|
|
|

Nov 19 '05 #3

P: n/a
Does the ReadOnly attibute of a bound column not work for you?
<asp:BoundField DataField="Code" HeaderText="Code" ReadOnly="true" />

This way the update command will not need this paramater.

HTH

Gerhard
"Jay Villa" <ja******@community.nospam> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Is it possible to update only few columns in datagrid during
OnUpdateCommand event ? If so, could you help me ....

-thanks
Jay

Nov 19 '05 #4

P: n/a
Thanks this is what I am looking for. But the problem here is if I make the
column readonly then how can I get the value of it. I need to get the value
bcoz it is the primary key of the table ....

-Jay

"Gerhard Pretorius" <ge*****@comprehendit.co.za> wrote in message
news:uE**************@TK2MSFTNGP12.phx.gbl...
Does the ReadOnly attibute of a bound column not work for you?
<asp:BoundField DataField="Code" HeaderText="Code" ReadOnly="true" />

This way the update command will not need this paramater.

HTH

Gerhard
"Jay Villa" <ja******@community.nospam> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Is it possible to update only few columns in datagrid during
OnUpdateCommand event ? If so, could you help me ....

-thanks
Jay


Nov 19 '05 #5

P: n/a
Don;t put the primary key in the Columns.

Specify it as the DataKey of the Grid.
Then ASP.NET 2.0 adds it in as a parameter automatically using the
OldValuesParamterFormatString

HTH
Gerhard

"Jay Villa" <ja******@community.nospam> wrote in message
news:OH****************@TK2MSFTNGP09.phx.gbl...
Thanks this is what I am looking for. But the problem here is if I make
the column readonly then how can I get the value of it. I need to get the
value bcoz it is the primary key of the table ....

-Jay

"Gerhard Pretorius" <ge*****@comprehendit.co.za> wrote in message
news:uE**************@TK2MSFTNGP12.phx.gbl...
Does the ReadOnly attibute of a bound column not work for you?
<asp:BoundField DataField="Code" HeaderText="Code" ReadOnly="true" />

This way the update command will not need this paramater.

HTH

Gerhard
"Jay Villa" <ja******@community.nospam> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Is it possible to update only few columns in datagrid during
OnUpdateCommand event ? If so, could you help me ....

-thanks
Jay



Nov 19 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.