Hello Brian,
if you are working with datasets/datatables, you can do this by using a
DataView component. You just need to set the DataView.Table property to the
DataSet table you're working with, then bind the DataGrid control to that
DataView. The DataView exposes a number of properties that you can set to
tell the DataGrid control how to behave (AllowNew, AllowEdit, AllowDelete,
etc.).
HTH
Antoine
Microsoft Visual Basic .NET
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: br*********@yahoo.com (Brian)
Newsgroups: microsoft.public.dotnet.languages.vb
Subject: Datagrid: prevent new row at bottom
Date: 30 Sep 2003 10:36:30 -0700
Organization: http://groups.google.com
Lines: 8
Message-ID: <be*************************@posting.google.com>
NNTP-Posting-Host: 68.164.245.107
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1064943390 31189 127.0.0.1 (30 Sep 2003
17:36:30 GMT)X-Complaints-To: gr**********@google.com
NNTP-Posting-Date: Tue, 30 Sep 2003 17:36:30 +0000 (UTC)
Path:
cpmsftngxa06.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTN GXA05.phx.gbl!TK2MSFTNGP08
.phx.gbl!newsfeed00.sul.t-online.de!t-online.de!skynet.be!skynet.be!newshub1
.home.nl!home.nl!in.100proofnews.com!in.100proofne ws.com!pd2nf1so.cg.shawcab
le.net!residential.shaw.ca!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!postn
ews1.google.com!not-for-mailXref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:142609
X-Tomcat-NG: microsoft.public.dotnet.languages.vb
Hello -
Is there a way to prevent the user from creating a blank row at the
bottom of a datagrid? I want a read only grid that allows the user to
view data but not select specific cells or create a blank row, etc.
Thanks,
Brian