473,396 Members | 1,918 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,396 software developers and data experts.

DataGrid, with editable fields in form

Hi
I want to display a datagrid summary of a datatable.
The grid will not show all the fields, but when the user selects a row, I
want the other controls (text boxes) to also bind to the same row that is
selected in the grid. However, the controls will bind to ALL of the fields,
where the grid will only show some of them.

I want to be able to edit the data using the text boxes, and then update.

I also want to be able to add data using the text boxes, via the creation of
a new row.

Seems simple in concept.

Does anyone have any working code of this?

Thanks
Apr 17 '06 #1
1 2381
You have the ability to specify whether a particular column is editable by
determining how it is bound. Bound fields = not editable. Templated fields =
editable. You specify the item template and the edit template. This gives you
the option of making some fields drop down lists.

If you want to do this with the designer. Turn off auto gen of columns. Then
create each column as a bound column. If you drag a data table onto a form,
this is what you get for most items (bit fields will be a checkbox). Change
the columns you wish to edit to Template Columns. They will default to
textboxes. You can change this if you wish to bind to a list of items, like a
type table. There are plenty of tutorials for this on the web.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
"Joe Spears" wrote:
Hi
I want to display a datagrid summary of a datatable.
The grid will not show all the fields, but when the user selects a row, I
want the other controls (text boxes) to also bind to the same row that is
selected in the grid. However, the controls will bind to ALL of the fields,
where the grid will only show some of them.

I want to be able to edit the data using the text boxes, and then update.

I also want to be able to add data using the text boxes, via the creation of
a new row.

Seems simple in concept.

Does anyone have any working code of this?

Thanks

Apr 18 '06 #2

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

Similar topics

2
by: mrstrong | last post by:
Gday, Am new to using datagrids so if anyone could assist or point in the right direction in terms of resources - that would be much appreciated... I have a form that has: - a datagrid...
5
by: Dalibor Kusic | last post by:
The DataTable contains, for example, only one column of lets say Person class. Person class has three fields, and a constructor that takes a single string and parses it over those three fields. ...
2
by: Mark Perona | last post by:
I created an ASP.net form with an editable datagrid on it. I can create new records, and update and delete existing records. The problem I have is that I want a field in the grid to be editible...
2
by: Jesper Stocholm | last post by:
I have a challenge, that I do not seem to be able to solve. I have an "overview"-page that presently displays data from 2 columns in a database table. The users should be allowed to edit data in...
1
by: sianan | last post by:
I tried to use the following example, to add a checkbox column to a DataGrid in an ASP.NET application: http://www.codeproject.com/aspnet/datagridcheckbox.asp For some reason, I simply CAN'T get...
3
by: S P Arif Sahari Wibowo | last post by:
Hi! I would like to make an editable continous form, where most fields will be from table A and editable, except 1-3 fields are a glimpse into table B and uneditable. Table A relate to table B...
1
by: Beginner | last post by:
I am a newbie in ASP.NET. I am using VB.NET to write my codes. I have a project to be done this week but I am stucked on one thing. I want to make a datagrid of a form and display the form multiple...
7
by: julian.tklim | last post by:
Hi, I need to build an editable Datagrid with add & delete buttons on each row using javascript. DataGrid need not be pre-populated with values. To make the thing complicated, one of the...
9
by: rn5a | last post by:
A Form has a DataGrid which displays records from a SQL Server 2005 DB table. Users can modify the records using this DataGrid for which I am using EditCommandColumn in the DataGrid. This is the...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
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,...
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...
0
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,...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.