Datagrid

T

Tonya

Hi,

I need help on datagrid control. I am currently using it
to display all the data from a particular table from my
DB. What i want is the ability for the user to select a
row (the whole row and not individual items. I want to
avoid giving the user the ability to select an indivdual
item if poss). I want the user to be able to then click a
remove button which will display a confirmation message
before deleting the row from the Database.

However i have populated the datagrid, but the grid also
gives the option for the user to enter new rows as well
as delete existing rows. I do not want the to be able to
add tuples. Is there any way of stopping this? I have
tried to set the grids readonly property to true, but now
i cannot delete or update :blush:(

Can someone please help and point me in the right
direction
 
S

Steve S

Tonya you need to look at the ALLOWEdit, ALLOWDelete and ALLOWNew properties
on a DataView which can be applied to the datagrid like you would a
table........

HTH
 
T

Tonya

Hi Steve,

how do i access these properties? i had a look in the
properties list that is provided for the datagrid and i
could not locate it.
 
S

Steve S

They are properties of the DataView.........

You can create a DataView out of the table....... and assign the DataView
to the dataGrid..........
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top