Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / November 2007

Tip: Looking for answers? Try searching our database.

datagrid

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DLI - 30 Nov 2007 13:58 GMT
I have a datagrid that displays related child rows from a master table.

I have set the datagrids datasource to the relation I set up in the main
dataset

I created a dataview in order to keep all the form's controls in sync

This all works great EXCEPT

I would like to set the datagrid so the user may not delete a record or add
a record, just click a checkbox within the record.

I cannot set the datagrid's readonly property as this would not allow them
to change the checkbox.

I try to set the two related tables defaultview to not allowInserts but that
didn't have any affect.

I also tried setting the Relation's defaultview but that didn't work.

Any suggestions?

TIA
cfps.Christian - 30 Nov 2007 14:19 GMT
> I have a datagrid that displays related child rows from a master table.
>
[quoted text clipped - 19 lines]
>
> TIA

As far as the datagrid itself goes if you change the properties under
Behavior:
AllowUserToAddRows = False
AllowUserToDeleteRows = False

And individually set columns' readonly property to true you can leave
off your one checkbox.

If you're using the dataview directly you can set DV.AllowDelete =
false and DV.AllowNew = False and each of the columns within the
dataview.table.columns collection also have a readonly property that
you can set individually to true/false.
DLI - 30 Nov 2007 14:33 GMT
Sorry,
I should have stated that I am still using dotnet 1.1

I don't think that functionality is in this version.

Maybe it is time to upgrade.

>> I have a datagrid that displays related child rows from a master table.
>>
[quoted text clipped - 35 lines]
> dataview.table.columns collection also have a readonly property that
> you can set individually to true/false.
cfps.Christian - 30 Nov 2007 15:02 GMT
> Sorry,
> I should have stated that I am still using dotnet 1.1
[quoted text clipped - 42 lines]
> > dataview.table.columns collection also have a readonly property that
> > you can set individually to true/false.

The Add/Delete functionality is still on the dataview in 1.1 as far as
the readonly properties on the datatable object contained within the
dataview I don't have 1.1 here to tell you.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.