By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,723 Members | 975 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,723 IT Pros & Developers. It's quick & easy.

Datagrid questions

P: n/a
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
Share this Question
Share on Google+
6 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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.