473,473 Members | 1,947 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Update only few columns DATAGRID

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
5 2417
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: D. Shane Fowlkes | last post by:
I have a Datagrid which in theory, should allow you to edit and update the records. I've stripped my test page down so that it's only attempting to update one field - "description". Yet when I...
2
by: Ron | last post by:
Hello, I am trying to create a page that pulls class rosters from an SQLServer database. The roster table definition is: emp_id(pk, fk), sec_id(pk, fk), reg_date and reg_status. Status can be...
25
by: Neo Geshel | last post by:
This works: <form> <asp:TextBox id="name" /> <%= name.ClientID %> </form> But this DOES NOT work: <form>
4
by: Jonathan Upright | last post by:
Greetings to anyone who can help: I'm using WebMatrix to make ASP.NET pages, and I chose the "Editable DataGrid" at the project selector screen. As you may know, it defaults to the Microsoft...
1
by: mursyidatun ismail | last post by:
Dear all, database use: Ms Access. platform: .Net i'm trying to update a record/records in a table called t_doctors by clicking da edit link provided in the database. when i ran through da...
2
by: andrew.roberts | last post by:
This is my second post now on this subject has I seem to be getting no where and the problem is really starting to bug me now. I can get a datagrid into an editable state but then neither the...
13
by: shookim | last post by:
I don't care how one suggests I do it, but I've been searching for days on how to implement this concept. I'm trying to use some kind of grid control (doesn't have to be a grid control, whatever...
1
by: geeteshss | last post by:
Dear all, actually i spent a whole month on the R&D of datagrid edit ,update,cancel events but recently my guide told me to make it user friendly because no user would like to go on searching rows...
1
by: radhikabista | last post by:
hey friends , i m not being able to save the updates in datagrid view when i press buttonsave_ gridview i have a class customer with two methods one to get the dataset and other to update database:...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.