Home All Groups Group Topic Archive Search About

HELP PLEASE !! DataGrid Questions

Author
13 Jan 2006 1:59 AM
Enrique Santa Cruz
Hi I've been trying to read the greek-like dictionary help on the
datagrid control with little success in some things and I hope you can
help me:

I have a datagrid populated with a data set with two related tables so I
can see them as master-detail. in the contruction of the data set I
defined readonly cells. So far everything is fine but:

1.- How do I prevent people to add new records but allowing:
a) editing cells
b) deleting child records but no master records

In this forum I read an advice on doing something like that with a
dataview, but it only works with one table

2.- When I press the plus sign at the master record a web like link
appears with the relation name, since I have only one, I would like the
child records to be displayed without clicking a link


thanks in advance


*** Sent via Developersdex http://www.developersdex.com ***

Author
13 Jan 2006 7:44 AM
Cor Ligthert [MVP]
Enrique,

That is one of the advantages that you can do it in a datagridview direct.

However in a datagrid that works only if you work with a dataview, which you
cannot use in a relation.

However, see this sample on our website to fake a relation to be able to use
a dataview and a datagrid.

http://www.vb-tips.com/default.aspx?ID=cb1408ff-030d-4ea8-80b1-af26354b1fa0

I hope this helps,

Cor
Author
14 Jan 2006 5:49 PM
Marc R.
Hi Enrique,

you will need to use a dataview for the control of edit and add new line
that you bind to your grid


for your point number 2, can't help  here.

at lease you get half way there.

Marc R.

Show quoteHide quote
"Enrique Santa Cruz" <informat***@cela.edu.mx> wrote in message
news:%235OSuT%23FGHA.3944@tk2msftngp13.phx.gbl...
>
> Hi I've been trying to read the greek-like dictionary help on the
> datagrid control with little success in some things and I hope you can
> help me:
>
> I have a datagrid populated with a data set with two related tables so I
> can see them as master-detail. in the contruction of the data set I
> defined readonly cells. So far everything is fine but:
>
> 1.- How do I prevent people to add new records but allowing:
> a) editing cells
> b) deleting child records but no master records
>
> In this forum I read an advice on doing something like that with a
> dataview, but it only works with one table
>
> 2.- When I press the plus sign at the master record a web like link
> appears with the relation name, since I have only one, I would like the
> child records to be displayed without clicking a link
>
>
> thanks in advance
>
>
> *** Sent via Developersdex http://www.developersdex.com ***