473,436 Members | 1,483 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,436 software developers and data experts.

Really urgent : Programmatically deleting Datagrid rows

Hi all,

I searched everywhere today but to no avail - I need to programmatically
remove rows (DataGridItems) from a datagrid. Unfortunately,I can't have a
delete button/control of any kind but must do it in the ItemDataBound event.

Surely there must be a way to do this.

Any help regarding this would already be more than Google could offer.

Regards
John.
Nov 19 '05 #1
2 1345
Well, the cheap answer is set grid.Items[0].Visible = false;

Clint Hill
H3O Software
http://www.h3osoftware.com
John wrote:
Hi all,

I searched everywhere today but to no avail - I need to programmatically
remove rows (DataGridItems) from a datagrid. Unfortunately,I can't have a
delete button/control of any kind but must do it in the ItemDataBound event.

Surely there must be a way to do this.

Any help regarding this would already be more than Google could offer.

Regards
John.

Nov 19 '05 #2
I'm not sure your question makes sense, sorry. You want to simply not
display items before they are rendered? Delete buttons would not make
sense in this context at all, so I am not sure why they are mentioned.
Are you asking how not to include certain rows in a datagrid given a
result set from a database?

Nov 19 '05 #3

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

Similar topics

4
by: CGuy | last post by:
Hi, I have an ASPX page which has a datagrid and this datagrid is bound to a Custom Collection. sample code this.DataGrid1.DataSource = UserManager.Users; this.DataGrid1.DataBind();
2
by: Job Lot | last post by:
My DataGrid is bound to DataView as follow DataGrid1.DataSource = myDS.Tables("Client_Consultant").DefaultView User can either delete all the rows in the DataGrid on by pressing "Delete All"...
5
by: Mojtaba Faridzad | last post by:
Hi, with SetDataBinding( ) a DataGrid shows a DataView. user can select some rows in the grid by holding cotrol key. when user clicks on Delete button, I should delete all selected rows. I am...
1
by: Jay | last post by:
I'm wondering if anyone has even encountered a control or other scripting that will automatically rotate the rows of a datagrid... I am in the process of building an asp.net application that will...
2
by: NDady via DotNetMonster.com | last post by:
Hi, I have a datagrid populated from a dataset. On every row in the grid I have a delete button. When the user presses on the delete button I remove the row from the dataset and rebind the...
2
by: jaYPee | last post by:
Anyone know how to add record to a datagrid programmatically? Say for example I have two textboxes in my form and a datagrid. When I click a button the value of two textboxes will be added as a...
10
by: Nick | last post by:
Hello, Please pardon my ignorance as I'm sure this is easy to do. I have a datagrid where I want to let the user delete columns. I added a context menu to the datagrid that has a delete option....
3
by: marshallarts | last post by:
Hello, I have a datagrid (grdShots) on a form, and a button to allow the user to delete records from the dataset underlying the grid. My code appears to work, because the row disappears from...
9
by: Hamed | last post by:
Hello I have a DataGrid that a is bound to a DataTable. Some of the rows in the DataTable should not be deleted. How can I prohibit deleting of some identified rows? The problem could be...
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
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.