473,779 Members | 2,050 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to disable Delete and Insert but enable update with Datagrid?

no problem with vb6, but what's wrong with the datagrid binding with vb.net?

thanks.
Nov 20 '05 #1
3 7984
Hi,

Bind the datagrid to a dataview instead of the dataset. The
dataview has the allownew, allowedit, and allowdelete properties.

Ken
-----------------------------
"Jianfeng Chen" <ji***********@ wingson.com> wrote in message
news:uz******** *****@tk2msftng p13.phx.gbl...
no problem with vb6, but what's wrong with the datagrid binding with vb.net?
thanks.

Nov 20 '05 #2
Thanks.
In fact, the problem is not dataset or dataview, it's datagrid.
i want to disable the 'Del' key when using datagrid, or at least
let me control the relatived events.
"Ken Tucker" <vb***@bellsout h.net> wrote in message
news:#2******** ******@TK2MSFTN GP11.phx.gbl...
Hi,

Bind the datagrid to a dataview instead of the dataset. The
dataview has the allownew, allowedit, and allowdelete properties.

Ken
-----------------------------
"Jianfeng Chen" <ji***********@ wingson.com> wrote in message
news:uz******** *****@tk2msftng p13.phx.gbl...
no problem with vb6, but what's wrong with the datagrid binding with

vb.net?

thanks.


Nov 20 '05 #3
Hi,

Maybe this will help.
http://www.syncfusion.com/FAQ/WinFor...c44c.asp#q889q

Ken
----------------------
"Jianfeng Chen" <ji***********@ wingson.com> wrote in message
news:e2******** *****@TK2MSFTNG P12.phx.gbl...
Thanks.
In fact, the problem is not dataset or dataview, it's datagrid.
i want to disable the 'Del' key when using datagrid, or at least
let me control the relatived events.
"Ken Tucker" <vb***@bellsout h.net> wrote in message
news:#2******** ******@TK2MSFTN GP11.phx.gbl...
Hi,

Bind the datagrid to a dataview instead of the dataset. The
dataview has the allownew, allowedit, and allowdelete properties.

Ken
-----------------------------
"Jianfeng Chen" <ji***********@ wingson.com> wrote in message
news:uz******** *****@tk2msftng p13.phx.gbl...
no problem with vb6, but what's wrong with the datagrid binding with

vb.net?

thanks.



Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
17019
by: Philip Boonzaaier | last post by:
I want to be able to generate SQL statements that will go through a list of data, effectively row by row, enquire on the database if this exists in the selected table- If it exists, then the colums must be UPDATED, if not, they must be INSERTED. Logically then, I would like to SELECT * FROM <TABLE> WHERE ....<Values entered here>, and then IF FOUND UPDATE <TABLE> SET .... <Values entered here> ELSE INSERT INTO <TABLE> VALUES <Values...
16
3877
by: robert | last post by:
been ruminating on the question (mostly in a 390/v7 context) of whether, and if so when, a row update becomes an insert/delete. i assume that there is a threshold on the number of columns of the table, or perhaps bytes, being updated where the engine just decides, screw it, i'll just make a new one. surfed this group and google, but couldn't find anything. the context: we have some java folk who like to parametize/
0
1702
by: 4 | last post by:
Insert/Delete/Modify Statement Shortcuts??? Help!! I am working in C# and running an Oracle 9i server. I was just wonering if there is a shortcut way of updating my tables and not have to build special front end for it. What I would like to do is update the tables that I have pulled from the database in the data grid (in a form window), modify the tables, add users, information, then use a button to update the
0
3366
by: Robert Ladd | last post by:
Hi, I'm trying to disable the asp.net calendar control from a javascript function, but it doesn't disable the doPostBack. To simplify the situation, assume a page with 4 controls. A dropdownlist, a calendar control, a textbox and an update button. What I'm doing is initially setting the button to disabled, the other 3 controls are enabled. If any data is entered in the textbox, I want to disable the dropdownlist and the calendar...
1
2928
by: Geroge D. Lake | last post by:
Hi, I need to disable the resizing of a datagrid. I have tried al day and no luck. Any Ideas? Thanks. George.
1
1948
by: johnb41 | last post by:
I have a datagrid that successfully allows editing and updating (with dataadapter.update command). I want the user to be able to edit the "text" in the datagrid, but i DON'T want the user to be able to DELETE rows. The OleDbCommandBuilder automatically creates the DELETE SQL statement. Is there any way I can disable it? If not, what approach should I be using? Thanks!
1
4000
by: Net Virtual Mailing Lists | last post by:
Hello, I have a table with a rule that goes something like this: CREATE OR REPLACE RULE sometable_delete ON DELETE DO delete FROM cache WHERE tablename='sometable'; CREATE OR REPLACE RULE sometable_insert ON INSERT DO delete FROM cache WHERE tablename='sometable'; CREATE OR REPLACE RULE sometable_update ON UPDATE DO delete FROM cache WHERE tablename='sometable';
2
1800
by: Iain | last post by:
Hi All I am witing a web app using Delphi developer 2006 (C# app) and I have a datagrid. Excuse the numptyness of the question. I have a datagrid with the ability to Insert, Edit/Update and Delete records. The following is the datagrid definition <asp:datagrid id="Livery" runat="server"
3
11662
by: Pietro | last post by:
Hi all, First of all I'd like to thank you very very much ,as finally after many years of searching,I could find a code to disable/enable the shift key,but actually i cannot use the code as I'm very new to VBA,i tried to follow the instructions reported in the code,but i got no result,i still can use the shift key,can you explain in details how to use it correctly to enable/disable users from pressing shift key to view database windw?,the...
0
9633
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9474
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10305
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10137
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10074
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5373
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5503
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4037
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 we have to send another system
2
3632
muto222
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.