how delete a 1 row data in data table?

hi !

i know this is a newbie type of question! Im afraid!

anyone knows how delete a 1 row data in data table?

thanks in advanced!


practice makes perfect but nobody is perfect so why practice!
0
ranvox
3/28/2006 2:48:07 AM
asp.net.getting-started 91979 articles. 4 followers. Follow

1 Replies
847 Views

Similar Articles

[PageSpeed] 55
Get it on Google Play
Get it on Apple App Store

You can remove a row one of two ways.

DataTable.Remove(DataRow)
DataTable.RemoveAt(Index)

HTH,
Ryan


Ryan Olshan
ASPInsider | Microsoft MVP, ASP.NET
http://ryanolshan.com

How to ask a question
0
StrongTypes
3/28/2006 4:54:38 AM
Reply:

Similar Artilces:

How to move a row in a data table object to the top of the table? The data table is in a data set. The data is bound to a drop down list box.
I am maintaining some 2003 C#/asp.net code for a web application. In the application a table in a data set is usedto populate a drop down list box.(The drop down list box will display a list of names) Before the data set table is bound to the list box control, blank characters are inserted at the topof the data set table. The purpose of this, is to display a blank line in the drop down list box, when the list box isinitially displayed. This code works fine. (See lines 1-14 below). Now I have been asked to modify the source code so that instead of a blank line being inserted at to top of th...

data, data, data
Hello, I need some advice on the best method to keep a database updated in this scenario. I have a local Solomon SQL Server where we keep our inventory. I want to build an application that will be hosted at a remote hosting location which provides a SQL database. I want to build the application to allow clients to access the inventory items and make requests based on the remote SQL data. The order will be sent to our fulfillment department via email; they will fiill the request and ship.  I'm not sure the method to do this while keeping the data current on the remote and the l...

Data row from a Data Table
Hi All, I have a method which returns all the rows to a DataTable.  So from that Data Table I want a particular Row whose values should be assigned to text boxes on the webpage. Please can any help me out on how to do this ? Thanks for your time..   // assuming that you want the first row DataRow r=dataTable1.Rows[0]; TextBox1.Text=r["Column1"]; TextBox2.Text=r["Column2"];  Regards,Anas Ghanem.Note:Please Don't hesitate to click "Report Abuse" link if you noticed something wrong on the forums (like duplicate ,Off-topic,offensiv...

read data, write to table, delete data then save other data to DB
hi basically its as it says in the title, i have a page where a user enters a stock_id and qty, then when the click the proceed button, i need a loop to find all enteries in a tbl_location, the table looks like this loc_id    stock_id    loc1   qty1   loc2   qty2  ....... loc 5   qty5============================================== all values are numbers. it needs to loop through that (there will usually be more than one line) and compare it with the qty entered by the user then save the qty and loc's from that t...

Need to get whole data from data grid view into data table
Hi I have one gridview. which have some textboxes and some are data boud columns. I want to fetch whole the data in the gridview into one data set or datatable.And then insert that dataset or datatable into one other database table. Is there any way to do that. Please reply as soon as possible at max_ashu@yahoo.com and ashish.gautam@rbs.com  regards Ashish Gautam Hi,Can you check this article helps you http://www.aspdotnetcodes.com/GridView_Insert_Edit_Update_Delete.aspx. becoz they took data input from gridview control and insert into the database then display it again. p...

which is shou i use? Microsoft .NET Framework 1.1 Data Provider for Oracle and the Oracle Data Provider for .NET
Microsoft .NET Framework 1.1 Data Provider for Oracle and the Oracle Data Provider for .NETI am confused?Which is better or which one should I use?BTW, I am going to use .net 2.0 with oracle 9. Can anyone tell me what shou I use for working with oracle database?Thanks very much in advance!Justin Oracle's data provider has more functionality than Microsoft's.If your doing transaction processing you can have SAVEPOINTs, which Microsoft's data provider does not provide.Also, Oracle has PL/SQL Associative Arrays which are very powerful.Oracle also allows you to bind parameters by name and pos...

How to update Data of First row when I delete Data of Second row?
 assume my Table's Columns looks like below1  ,   Annie,   History, pass, 12  ,   Colin,   Math   , Pass, 17  ,   Annie,   History, Fail, 011 ,   Colin,   Math   , Fail, 0you can see the No1 and No7 with same people AnnieWhen I delete the No7's Data I want to update which last 2 columns "Fail" and "1" to No1so After I delete Row of No.7 the result will looks like below1  ,   Annie,   History, Fail, 0 ( update this row'...

Adding Rows from different Data table to a single Data Table
Hi, I have 3 data tables say dt1, dt2, dt3. None of the tables have any relation with each other. Now i my requirement is to merge all these 3 datatables into 1.  But, i dont want it into different rows. Means to say, record from 1st, 2nd and 3rd table shud be merged as a single row in resultant datatable. Below example explains better Table 1 : 123 abc 890 Table 2 : rew 234 Table 3: sdfsd 234 dfg 45645 Now Resultant table shud be :  123 abc 890 rew 234 sdfsd 234 dfg 45645 Any help is appreciated :) Thanks in advance   If you keep your feet firmly on ...

How to select data from a table and insert the selected data in the same table as new row
Hi    I have a table called Version and its attributes are Version_ID, Project_ID , Hospital_ ID , Date_Created and comments. I want to select the data by Version_ID,Project_ID and  Hospital_ID and the selected data is inserted in the same table(Version) as new row . Table: Version (Version_ID(Primary_key), Project_ID(Foreign_Key),Hospital_ID(Foreign_Key),Date_Created,Comments).  Iam using Visual Web Developer Express 2005 and SQL Server 2005. Iam doing on asp.net 2.0. Could anyone please send me the code in asp.net 2.0 for the above problem. ...

Select data from sourse table to insert to destination table and then delete those data ?
Hello everyone , I need to do something with Sql server 2005 from visual studio 2008. I have two tables in the database names students , Temporarilystudents : My question is how I can select specifics data from temporarilystudents table and insert those data to Students table and after that delete those data from temporarily table. Can you please give me the SQL Statement to achieve functionality? Actions Speaks Loader than words insert into Students select * from TempStudents drop table TempStudents. Or insert into Students select * from TempStudents where my conditions delete fr...

Get cell data from data table
Dim objDT As System.Data.DataTable  Sub Delete_Item(s As Object, e As DataGridCommandEventArgs) objDT = Session("Cart") objDT.Rows(e.Item.ItemIndex).Delete() <- here i need the cell contents of my product column->Session("Cart") = objDT dg.DataSource = objDT dg.DataBind()  lblTotal.Text = "$" & GetItemTotal()Dim total As String = "$" & GetItemTotal() lblTotal.Text = totalSession("TotalCost") = total   End Sub Dim str as String = objDT.Rows(e.Item.ItemIndex)("ColumnName").ToString() ...

Inserting Data Into Two Tables (Getting ID from Table 1 and inserting into Table 2)
I am trying to insert data into two different tables. I will insert into Table 2 based on an id I get from the Select Statement from Table1.  Insert Table1(Title,Description,Link,Whatever)Values(@title,@description,@link,@Whatever)Select WhateverID from Table1 Where Description = @DescriptionInsert into Table2(CategoryID,WhateverID)Values(@CategoryID,@WhateverID)  This statement is not working. What should I do? Should I use a stored procedure?? I am writing in C#. Can someone please help!!  Insert Table1(Title,Description,Link,Whatever)Values(@title,@descri...

is there an sql statement to insert data to one table and getting the data from another table
Ok I have a table that have general categories with just name and CatNo. Now what I want to know is when I create a client to move all the data in general categories to another table called categories that have the clientid to associate it with the client. I would appreciate for any help what is your question here??Shravan Addaypally MCP...

to fetch data gridview data into a data table
Hi I have one gridview. which have some textboxes and some are data boud columns. I want to fetch whole the data in the gridview into one data set or datatable.And then insert that dataset or datatable into one other database table. Is there any way to do that. Please reply as soon as possible at max_ashu@yahoo.com and ashish.gautam@rbs.com  regards Ashish Gautam Hi, >>"...and some are data boud columns..."  Where does the original data on the GridView come from? From you words, seems that it also from a DataSet? If so, you can save the input values ...

Web resources about - how delete a 1 row data in data table? - asp.net.getting-started

Control-Alt-Delete - Wikipedia, the free encyclopedia
or in DOS , Windows 3.0 and earlier version of Windows or OS/2 , the key combination reboots the computer. Starting with Windows 3.1 , the command ...

Free Speech Group Angered After Facebook Deletes Post On Syria
Facebook issued an apology after mistakenly deleting a post from free speech group Article 19 about human rights abuses in Syria . continued… ...

Facebook brings activity log to mobile devices so users can delete stories and check privacy settings ...
... added an activity log feature to some mobile devices, allowing users to see all their recent activity, verify their privacy settings and delete ...

Tweets MPs Delete (@deletedbyMPs) on Twitter
Sign in Sign up You are on Twitter Mobile because you are using an old version of Internet Explorer. Learn more here Tweets MPs Delete @ deletedbyMPs ...

Pixar Animation Studios : Did Pixar accidentally delete Toy Story 2 during production?
Answer (1 of 2): Hi everyone, I'm the Oren Jacob in the video. Hopefully I can offer some first person color commentary about the video above ...

Flic – Delete & Manage Camera Roll Photos on the App Store on iTunes
Get Flic – Delete & Manage Camera Roll Photos on the App Store. See screenshots and ratings, and read customer reviews.

Delete - Flickr - Photo Sharing!
Delete buttons on an Apple keyboard. (This image is free to use on your blog or website. If you do so, please credit Cari McGee with a link to ...

iOS 9 How-To: Quickly delete multiple images in Messages to free up space without losing your conversations ...
... Photos actually gets stored twice on the device: within Photos and within Messages. In this How-To article, I’m going to discuss how to delete ...

Marie Claire Does the Tweet-Delete Dance
... from within the Hearst family only to generate angry social media responses is the very definition of Hump Day (the tweet was quickly deleted). ...

Viber now lets you attach files, delete messages and more
... and public chat forwarding in late September , the app keeps growing. In an update today, Nov. 24, Viber users can now attach files, delete ...

Resources last updated: 11/30/2015 5:45:40 AM