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

Datagrid questions

Hi,

I wanted to know if anyone know how to use the first
column of the datagrid to display values that are pulled
from a database, while the second column is one where i
can add my own heading.

i.e.

i want the first column to contain all the products
(pulled from my database), while the second column
contains blank entries so the user can enter the quantity
of that product they require. the user therefore should
not be able to edit the first column but only the second
column.

Is the datagrid the best control for this?
Is it possible to achieve this using this control?

Can anyone guive me some pointers of how to approach this?

thanks
Nov 22 '05 #1
6 1525
when you fetch data from database, fetch product code and qty column. that
would be enough.

e.g.

select productid, productname, 0 as qty from products

where qty is not a column of products table.

Regards,

Rajesh Patel

"Jade" <s@d> wrote in message news:04****************************@phx.gbl...
Hi,

I wanted to know if anyone know how to use the first
column of the datagrid to display values that are pulled
from a database, while the second column is one where i
can add my own heading.

i.e.

i want the first column to contain all the products
(pulled from my database), while the second column
contains blank entries so the user can enter the quantity
of that product they require. the user therefore should
not be able to edit the first column but only the second
column.

Is the datagrid the best control for this?
Is it possible to achieve this using this control?

Can anyone guive me some pointers of how to approach this?

thanks

Nov 22 '05 #2
when you fetch data from database, fetch product code and qty column. that
would be enough.

e.g.

select productid, productname, 0 as qty from products

where qty is not a column of products table.

Regards,

Rajesh Patel

"Jade" <s@d> wrote in message news:04****************************@phx.gbl...
Hi,

I wanted to know if anyone know how to use the first
column of the datagrid to display values that are pulled
from a database, while the second column is one where i
can add my own heading.

i.e.

i want the first column to contain all the products
(pulled from my database), while the second column
contains blank entries so the user can enter the quantity
of that product they require. the user therefore should
not be able to edit the first column but only the second
column.

Is the datagrid the best control for this?
Is it possible to achieve this using this control?

Can anyone guive me some pointers of how to approach this?

thanks

Nov 22 '05 #3
Hi Rajesh,

What do i do about making the first coloumn read-only
while allowing the user to enter and edit values for the
second column??

Also do u know how i can rename my datagrid headings as
they are appearing as i have stored them in my database.
I want to give them more meaningful names on my interface.

thx
-----Original Message-----
when you fetch data from database, fetch product code and qty column. thatwould be enough.

e.g.

select productid, productname, 0 as qty from products

where qty is not a column of products table.

Regards,

Rajesh Patel

"Jade" <s@d> wrote in message news:044501c3ac6b$1b2c1da0

$a*******@phx.gbl...
Hi,

I wanted to know if anyone know how to use the first
column of the datagrid to display values that are pulled from a database, while the second column is one where i
can add my own heading.

i.e.

i want the first column to contain all the products
(pulled from my database), while the second column
contains blank entries so the user can enter the quantity of that product they require. the user therefore should
not be able to edit the first column but only the second column.

Is the datagrid the best control for this?
Is it possible to achieve this using this control?

Can anyone guive me some pointers of how to approach this?
thanks

.

Nov 22 '05 #4
Hi Rajesh,

What do i do about making the first coloumn read-only
while allowing the user to enter and edit values for the
second column??

Also do u know how i can rename my datagrid headings as
they are appearing as i have stored them in my database.
I want to give them more meaningful names on my interface.

thx
-----Original Message-----
when you fetch data from database, fetch product code and qty column. thatwould be enough.

e.g.

select productid, productname, 0 as qty from products

where qty is not a column of products table.

Regards,

Rajesh Patel

"Jade" <s@d> wrote in message news:044501c3ac6b$1b2c1da0

$a*******@phx.gbl...
Hi,

I wanted to know if anyone know how to use the first
column of the datagrid to display values that are pulled from a database, while the second column is one where i
can add my own heading.

i.e.

i want the first column to contain all the products
(pulled from my database), while the second column
contains blank entries so the user can enter the quantity of that product they require. the user therefore should
not be able to edit the first column but only the second column.

Is the datagrid the best control for this?
Is it possible to achieve this using this control?

Can anyone guive me some pointers of how to approach this?
thanks

.

Nov 22 '05 #5
for both of your question, you need to use datagridcolumnstyle.

you have to specify style for both columns.

there, you will have readonly = true.

you can also put a header or meaningful name for the the column.

Rajesh Patel
"Jade" <an*******@discussions.microsoft.com> wrote in message
news:03****************************@phx.gbl...
Hi Rajesh,

What do i do about making the first coloumn read-only
while allowing the user to enter and edit values for the
second column??

Also do u know how i can rename my datagrid headings as
they are appearing as i have stored them in my database.
I want to give them more meaningful names on my interface.

thx
-----Original Message-----
when you fetch data from database, fetch product code

and qty column. that
would be enough.

e.g.

select productid, productname, 0 as qty from products

where qty is not a column of products table.

Regards,

Rajesh Patel

"Jade" <s@d> wrote in message news:044501c3ac6b$1b2c1da0

$a*******@phx.gbl...
Hi,

I wanted to know if anyone know how to use the first
column of the datagrid to display values that are pulled from a database, while the second column is one where i
can add my own heading.

i.e.

i want the first column to contain all the products
(pulled from my database), while the second column
contains blank entries so the user can enter the quantity of that product they require. the user therefore should
not be able to edit the first column but only the second column.

Is the datagrid the best control for this?
Is it possible to achieve this using this control?

Can anyone guive me some pointers of how to approach this?
thanks

.

Nov 22 '05 #6
for both of your question, you need to use datagridcolumnstyle.

you have to specify style for both columns.

there, you will have readonly = true.

you can also put a header or meaningful name for the the column.

Rajesh Patel
"Jade" <an*******@discussions.microsoft.com> wrote in message
news:03****************************@phx.gbl...
Hi Rajesh,

What do i do about making the first coloumn read-only
while allowing the user to enter and edit values for the
second column??

Also do u know how i can rename my datagrid headings as
they are appearing as i have stored them in my database.
I want to give them more meaningful names on my interface.

thx
-----Original Message-----
when you fetch data from database, fetch product code

and qty column. that
would be enough.

e.g.

select productid, productname, 0 as qty from products

where qty is not a column of products table.

Regards,

Rajesh Patel

"Jade" <s@d> wrote in message news:044501c3ac6b$1b2c1da0

$a*******@phx.gbl...
Hi,

I wanted to know if anyone know how to use the first
column of the datagrid to display values that are pulled from a database, while the second column is one where i
can add my own heading.

i.e.

i want the first column to contain all the products
(pulled from my database), while the second column
contains blank entries so the user can enter the quantity of that product they require. the user therefore should
not be able to edit the first column but only the second column.

Is the datagrid the best control for this?
Is it possible to achieve this using this control?

Can anyone guive me some pointers of how to approach this?
thanks

.

Nov 22 '05 #7

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

Similar topics

3
by: Dmitry Akselrod | last post by:
Hi, I am using a standard .NET 1.0 Datagrid. Actually, I am using two, bound to a master-detail relationship. Both DataGrids are bound to a datasource. I have the MSDN version of the...
0
by: Phil Townsend | last post by:
I am building an online testing application that uses a usercontrol to navigate through a list of questions. The questions are multiple choice. I have a stored procedure that returns two tables:...
7
by: Matthew Wieder | last post by:
Hi - I have a datagrid that has a black header and the rows alternate white and gray. The problem is that until items are added to the grid, the grid appears as a large black rectangle, which is...
5
by: VB Programmer | last post by:
I have an ASP.NET form that allows people to answer survey questions. There could be from 5 to an unlimited amt of questions, depending on which questions the admin wants to users to answer (he...
10
by: JohnR | last post by:
I have a datatable as the datasource to a datagrid. The datagrid has a datagridtablestyle defined. I use the datagridtablestyle to change the order of the columns (so they can be different than...
2
by: Maarten | last post by:
Hi all, I have a datagrid with questions where the user has to make a choice (yes or no questions) But for some questions there are rules, like if you choose (yes or no) for some questions I...
9
by: Tony Girgenti | last post by:
Hello. I'm developing and testing a web application using VS.NET 2003, VB, .NET Framework 1.1.4322, ASP.NET 1.1.4322 and IIS5.1 on a WIN XP Pro, SP2 computer. I'm using a web form. For a...
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...
1
by: RN1 | last post by:
Consider the following DataGrid: -------------------------------------------------------------------------------- <asp:DataGrid ID="dgMarks" AutoGenerateColumns="false" runat="server"> <Columns>...
2
by: =?Utf-8?B?Y3JlYXZlczA2MjI=?= | last post by:
I have a nested datagrid in a xaml file, the parent datagrid loads the vendor information and the details loads the documents for that vendor in a datagrid. Everything is working fine until I click...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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...

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.