473,405 Members | 2,261 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

How to hide the add new row of DataGrid?

the datagrid display addnew row with star(*) at the bottom of the the table,
I do not want to see this star(*) row, can I do that?

llyang
Nov 21 '05 #1
6 9237
Hi,

To prevent the user from adding a new row set the
datatables.defaultview.allownew = false.

http://msdn.microsoft.com/library/de...ownewtopic.asp
Ken
-------------------
"llyang" <ll****@discussions.microsoft.com> wrote in message
news:CA**********************************@microsof t.com...
the datagrid display addnew row with star(*) at the bottom of the the table,
I do not want to see this star(*) row, can I do that?

llyang
Nov 21 '05 #2
thanks for your instant reply.

I have do that, this is just for preventing user's adding a new row. My
purpose is:
I do not wnat to see the last row with star(*) in datagrid.

"Ken Tucker [MVP]" wrote:
Hi,

To prevent the user from adding a new row set the
datatables.defaultview.allownew = false.

http://msdn.microsoft.com/library/de...ownewtopic.asp
Ken
-------------------
"llyang" <ll****@discussions.microsoft.com> wrote in message
news:CA**********************************@microsof t.com...
the datagrid display addnew row with star(*) at the bottom of the the table,
I do not want to see this star(*) row, can I do that?

llyang

Nov 21 '05 #3
llyang,

http://64.78.52.104/FAQ/WinForms/FAQ_c44c.asp#q653q

5.8 How do I prevent the datagrid from displaying its append row (the row at
the end with an asterisk)?

Kerry Moorman
"llyang" wrote:
the datagrid display addnew row with star(*) at the bottom of the the table,
I do not want to see this star(*) row, can I do that?

llyang

Nov 21 '05 #4
Hi,

The * is the new row line.

Ken
----------------
"llyang" <ll****@discussions.microsoft.com> wrote in message
news:D5**********************************@microsof t.com...
thanks for your instant reply.

I have do that, this is just for preventing user's adding a new row. My
purpose is:
I do not wnat to see the last row with star(*) in datagrid.

"Ken Tucker [MVP]" wrote:
Hi,

To prevent the user from adding a new row set the
datatables.defaultview.allownew = false.

http://msdn.microsoft.com/library/de...ownewtopic.asp
Ken
-------------------
"llyang" <ll****@discussions.microsoft.com> wrote in message
news:CA**********************************@microsof t.com...
the datagrid display addnew row with star(*) at the bottom of the the
table,
I do not want to see this star(*) row, can I do that?

llyang

Nov 21 '05 #5
thanks Kerry Moorman & Ken Tucker, I'll try to translate the C# into VB.net
soon even I'm not familiar with C#

sincerely,

llyang
Nov 21 '05 #6
now I got the solution from:

http://www.dotnet247.com/247referenc.../15/77602.aspx

Ctype(DataGrid.DataSource, DataTable).DefaultView.AllowNew = False

this works fine for me

thanks ken & kerry, both of you gave me a lot of information for me.

kindly,

llyang
Nov 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: jez123456 | last post by:
Not sure if I'm in the right thread but here goes. I have an ASP.Net web page with a datagrid. The code behind is C#. If the datagrid has no records the datagrid header section is still shown....
6
by: Das | last post by:
Hi everyone, I'm using datagrid control to display the data. I want to hide column to be displayed into the data grid. I'm using the code as given below: Method given below is used to bind the...
2
by: Thanh Nu | last post by:
Hi, I would like to hide a column in a web datagrid (with create columns automatically at runtime checked), and I cannot refer to the columns collection like this: DataGrid1.Columns(0).Visible...
8
by: Hanson | last post by:
I have a datagrid control in an aspx page. The datagrid columns will be dynamically generated according to the pre-page's search condition, I want to hide some columns in the datagrid. is that...
3
by: sivaraman.S | last post by:
Hi friends, How to hide a column in datagrid. regards, Sivaraman.S
5
by: J | last post by:
Ok, they have changed a lot of stuff in VB.net. How in the world do you hide a column on the Datagrid? -- Jason
5
by: Shane Story | last post by:
I have a dataset with two tables. I make data view of each table, connect the parent table to one data grid and the child table to the other datagrid, with a row filter, that gets set when a...
1
by: nuhura01 | last post by:
Hi all.. I have a datagrid in my system and I preview the datagrid in other html page. Below are the code that I'm using: Dim oStringWriter As System.IO.StringWriter = New...
4
by: wassssup | last post by:
i want to know is there a way to check wherether is there data inside a datagrid and hide the datagrid when there isn't any. for example i drag the datagridview from the toolbox and put it on the...
9
by: moondaddy | last post by:
using c# 3.5 I have list of business objects which I will use in lists for databinding and I want to hide some of the fields so they don't show up in the list control. some of my list will be:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.