471,055 Members | 1,648 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,055 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 1447
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Dmitry Akselrod | last post: by
reply views Thread by Phil Townsend | last post: by
7 posts views Thread by Matthew Wieder | last post: by
5 posts views Thread by VB Programmer | last post: by
2 posts views Thread by Maarten | last post: by
9 posts views Thread by Tony Girgenti | last post: by
9 posts views Thread by rn5a | last post: by
1 post views Thread by RN1 | last post: by
2 posts views Thread by =?Utf-8?B?Y3JlYXZlczA2MjI=?= | last post: by
reply views Thread by leo001 | last post: by

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.