Re: form detailview question

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



then it is the users wish to go against company policy to make meaningful
name. and he is going to suffer from the potential gain of meaning.
autogenerated key has no meaning neither. for alpha key in large table,
wide scatter of key values help performance but I double if small number of
similar key name make much difference in small tables of 100 entries or
less.

Furthermore, as long as the entry is not referenced, user will be allowed to
rename, change, delete. Once the entry is referenced , no change is allowed.
except for the admin person.

"Bob Powell [MVP]" <bob@xxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:D0A0C151-64BE-4B8C-B034-36037F7AA9A6@xxxxxxxxxxxxxxxx
I think that even with advanced users, the primary key is best left to
some
automated process. User entered data tends to be subject to abuse, like
someone calling all their entries "fred" or such.

--
--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.


"GS" <gsmsnews.microsoft.comGS@xxxxxxxxxxxxxxxxx> wrote in message
news:OTX$hzuPIHA.1208@xxxxxxxxxxxxxxxxxxxxxxx
Ordinarily, no.
this form deals with only a small number of named entries possibly less
than
50.
the name field is only 16 characters.

and the users using this form is either developer or advanced users
trying
to customize the application data extraction pattern.

I suppose I could generate primary key and have unique index on name
field.. however in the application the references are by name not by
other
key for ease of use and maintenance by user.



"Bob Powell [MVP]" <bob@xxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:3ABEDF9C-F6E0-4AF6-B140-AAF217390DEE@xxxxxxxxxxxxxxxx
Are you sure that allowing the user to fill the primary key is a good
idea?
These are often left to the database and the insert statement will
often
accept all fields _except_ the primary key which is often, by
convention,
autogenerated.

--
--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.


"GS" <gsmsnews.microsoft.comGS@xxxxxxxxxxxxxxxxx> wrote in message
news:eRPPE2oPIHA.3556@xxxxxxxxxxxxxxxxxxxxxxx
in Windows form, I have Datagridview and detailview with the same
binding
data manager. upon clicking the + in the navigator, the primary key
field
is
blank as expected, but I need to enable it for new record to let user
to
fill it. On the other hand I don't want to allow change to the field
for
existing record. so disable that on existing non new record. How do I
do
that?


I notice the property of the fields are enabled in the form design,
but
could not find any code for disable them.








.



Relevant Pages

  • Re: Custom Zoom & Performance
    ... Find great Windows Forms articles in Windows Forms Tips and Tricks ... Answer those GDI+ questions with the GDI+ FAQ ... the scaled pixel ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Printing graphics/text that span multiple pages
    ... Find great Windows Forms articles in Windows Forms Tips and Tricks ... Answer those GDI+ questions with the GDI+ FAQ ... You need to figure out how many pages you need and then render your ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Drawing backgeound image slows down form performance
    ... Find great Windows Forms articles in Windows Forms Tips and Tricks ... Answer those GDI+ questions with the GDI+ FAQ ... > I have a windows form application that draws the background with a color ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Hotspots in graphic
    ... Find great Windows Forms articles in Windows Forms Tips and Tricks ... Answer those GDI+ questions with the GDI+ FAQ ... > What is the best way to draw that image on the screen? ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: Hotspots in graphic
    ... Find great Windows Forms articles in Windows Forms Tips and Tricks ... Answer those GDI+ questions with the GDI+ FAQ ... > What is the best way to draw that image on the screen? ...
    (microsoft.public.dotnet.framework.windowsforms.controls)