473,626 Members | 3,305 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Eliminate adding rows to grid...

VM
In the Windows datagrid (if read-only is false), a user can add another row
to the grid if the Tab key is pressed when the cursor's in the last row and
last column. Is there any way to eliminate this without making the grid
read-only? I need to be able to modify the data in the grid and to add more
rows to the grid.
Thanks.
Nov 16 '05 #1
1 1385
There are some options to do this
1) make your datasource with certain number of rows
2) override insert event and make e.Cancel on add
3) make your datasouce read only

Hope it helps

--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "
"VM" <vo******@yahoo .com> wrote in message
news:eC******** *****@TK2MSFTNG P10.phx.gbl...
In the Windows datagrid (if read-only is false), a user can add another row to the grid if the Tab key is pressed when the cursor's in the last row and last column. Is there any way to eliminate this without making the grid
read-only? I need to be able to modify the data in the grid and to add more rows to the grid.
Thanks.

Nov 16 '05 #2

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

Similar topics

0
1156
by: Deepa | last post by:
Hi I need some help on adding new rows to an existing datagrid. The scenario is I have a web page with a datagrid. I have an EditCommandColumn and the others are template columns. There is a button on the page which when clicked should allow the user to add a new row to the grid. I've seen examples but they deal with adding just a single row or a row in the footer. My requirement is not just one row, but allow to add row each time a user...
2
3626
by: Clayton Hamilton | last post by:
I have a DataGrid on a webform bound to a Datasource and can successfully use <ItemTemplate> to create edit/update/cancel functionality for user maintenance of data. I use separate logic to delete a row. Everything works just fine. BUT I would like to add a button to (for example) the DataGrid header, which when pressed will add a new row to the datagrid. This should then allow the user to enter information into text boxes (in some...
3
4869
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that the best method? Do you have a sample of how to do this?
2
1959
by: Praveen Balanagendra via .NET 247 | last post by:
here is the source code private void AddRow() { TableCell tc = new TableCell(); tc.Controls.Add(new LiteralControl("NewRow")); DataGridItem di = new DataGridItem(DataGrid1.Items.Count+1,DataGrid1.Items.Count+1,ListItemType.Item); di.Cells.Add(tc); di.Cells.Add(tc1);
3
1476
by: Chris Leuty | last post by:
I have a datagrid (with viewstate enabled), and my edit/update/delete buttons in the grid are all working fine. I have a textbox and a button underneath the grid for adding items to the grid. When the button is clicked, the following code runs: Dim drNew As DataRow = dsTrades.Tables("Trades").NewRow ' create new row dsTrades.Tables("Trades").Rows.Add(drNew) ' add new row to table drNew("TradeName") = Request.Form("txtNewTrade") ...
2
4952
by: dschectman | last post by:
This appears to be a feature of IE JavaScript. I am running IE 6.0 with the latest patches from Microsoft. Are there any workarounds other than re-coding the source HTML to place all the non-visible columns at the front? I have a page with a dynamic table. The table has some visible columns and some non-visible columns. The style "hide" is .hide { display:none; } <table id="SelectedList">
2
3556
by: Flack | last post by:
Hey guys, I have a DataGrid and DataTable field in my class : private ImageDataGrid dataGrid1; //ImageDataGrid extends dataGrid and just overides OnMouseDown private DataTable dt = new DataTable("MyTable"); In the classes constructor, after InitializeComponent() I call the following
0
1031
by: John Baima | last post by:
I would like to have each row of a GridView be a text entry box and then when a "process" button outside of the grid is presses, to be able to iterate through the grid creating new rows in a completely different table than what was used to display the grid. It all of the examples I've found were cases where the grid was basically editing just one row at a time. I need to let the user modify all of the rows and then make a single update....
0
1961
by: ganesh22 | last post by:
Hi... Iam using GridView in asp.net(2.0) .My requirement is user can add,update,delete in gridview I written the code for add & update but can u help adding rows in grid view My code: <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="3" Height="237px" Style="z-index: 100; left: 155px; position: absolute; top: 132px" Width="688px" BackColor="White" BorderColor="#CCCCCC"...
0
8262
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8196
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8364
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8502
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7192
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4090
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4196
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2623
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1507
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.