473,327 Members | 2,065 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,327 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 1523
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:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.