473,385 Members | 1,400 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Question about using DataGrid in VB.Net

LLJ
Hi list,

I am using DataGrid control in my first VB.Net project. How can i use
DataGrid to do:

1. only show data from the database when user run the application at
beginning, which means user can't make any changes to the existing
data, and can't add new rows.

2. when user click on the "Insert" button, the datagrid will allow user
to add new rows, but can't edit the exiting rows.

3. when user click on "Update" button all the rows will be editable.

thanks for any help.

Nov 21 '05 #1
3 1147
Those are three tall orders, which take some pretty good chunks of code.
You would get a lot of help from Scott Mitchell's "ASP.NET Data Web Controls
Kickstart" (I use this as a reference a lot). These topics are also covered
in numerous on-line articles, so try a search engine as well.

"LLJ" <ll******@yahoo.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
Hi list,

I am using DataGrid control in my first VB.Net project. How can i use
DataGrid to do:

1. only show data from the database when user run the application at
beginning, which means user can't make any changes to the existing
data, and can't add new rows.

2. when user click on the "Insert" button, the datagrid will allow user
to add new rows, but can't edit the exiting rows.

3. when user click on "Update" button all the rows will be editable.

thanks for any help.

Nov 21 '05 #2
LLJ
I am working on Windows Form not Web Form. Do you know any good
reference books for Windows Form controls uing?

Thanks.

Nov 21 '05 #3
Lliang,

Have a look at the properties of the defaultview (dataview) from the
datatables.
(In 2005 version some of this kind of things are as well direct on the
DataGridView)

http://msdn.microsoft.com/library/de...mberstopic.asp

The Allow properties

I hope this helps,

Cor
"LLJ" <ll******@yahoo.com> schreef in bericht
news:11*********************@g44g2000cwa.googlegro ups.com...
Hi list,

I am using DataGrid control in my first VB.Net project. How can i use
DataGrid to do:

1. only show data from the database when user run the application at
beginning, which means user can't make any changes to the existing
data, and can't add new rows.

2. when user click on the "Insert" button, the datagrid will allow user
to add new rows, but can't edit the exiting rows.

3. when user click on "Update" button all the rows will be editable.

thanks for any help.

Nov 21 '05 #4

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

Similar topics

0
by: jcardenasch | last post by:
Hi: I am learning c#. I have a datagrid wich was filled with information from a sql database using stored procedure. The Datagrid is working. I have three columns: StudentID, StFirstName,...
5
by: AC | last post by:
Any reason i'm having trouble with: DataGrid1.Columns(7).ItemStyle.HorizontalAlign = HorizontalAlign.Right I'm trying to directly set the column alignment of a datagrid created at runtime.. ...
6
by: mkobus | last post by:
Im relatively new, so please be patient with me... I need to update a parent .aspx screen from a popup and close the popup. Normally I would use...
1
by: Jay | last post by:
I need to validate 21 sets of radio buttons before submission to the server for calculation and storage. Is it best to validate on the client side using javascript or to validate on the server...
1
by: Nikhil Patel | last post by:
Hi all, What is the best way to allow the administrator of the application to select which columns are displayed in a Databound grid in an aspx form. I was thinking of creating a form and display...
6
by: Shawn | last post by:
Hi. I already have a datagrid where I'm using paging. I have a stored procedure that fills a temp table with 200-500 rows and then sends back 10 records at the time. When I go to page 2 the SP...
0
by: Suzanne | last post by:
I'd like to know how can I put up a confirmation question when the user tries to delete a row in the datagrid by clicking on the row header and pressing the Delete key? I have found this code on...
3
by: Pat | last post by:
I have a 2 nested Datagrid. When i select a row in the Master Datagrid i populate the Child databrid using myDataGrid.SelectedIndex value as the filter and setting the DataKeyField. I enabled...
12
by: Joe | last post by:
Hello All: I'm sure that one of you can quickly spot the error in my script. I am using a small javascript function to retrieve the text of a hyperlink in a datagrid column. Here is my...
0
by: | last post by:
I have a question about spawning and displaying subordinate list controls within a list control. I'm also interested in feedback about the design of my search application. Lots of code is at the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.