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

Getting a DataRow From A DataTable

Hello,
I Have A Datatable With Rows Full With Data and i want
to get or address a specific row using an index number.
i vb.net its easy but in c# i cant use a number to get the
specific row i want.
i want to do something like datarow=Datatable.rows(4)
to get row number 4
thanks

Eyal
Nov 15 '05 #1
2 21459
"Eyal Cohen" <li******@yahoo.com> wrote in news:025001c39a01$8bf85b60
$a*******@phx.gbl:
Hello,
I Have A Datatable With Rows Full With Data and i want
to get or address a specific row using an index number.
i vb.net its easy but in c# i cant use a number to get the
specific row i want.
i want to do something like datarow=Datatable.rows(4)
to get row number 4
thanks

Eyal


DataRow dr = myDataTable.Rows[4]

--
best regards

Peter Koen
-----------------------------------
MCAD, CAI/R, CAI/S, CASE/RS, CAT/RS
http://www.kema.at
Nov 15 '05 #2
-----Original Message-----
"Eyal Cohen" <li******@yahoo.com> wrote in news:025001c39a01$8bf85b60$a*******@phx.gbl:
Hello,
I Have A Datatable With Rows Full With Data and i want
to get or address a specific row using an index number.
i vb.net its easy but in c# i cant use a number to get the specific row i want.
i want to do something like datarow=Datatable.rows(4)
to get row number 4
thanks

Eyal


DataRow dr = myDataTable.Rows[4]

--
best regards

Peter Koen
-----------------------------------
MCAD, CAI/R, CAI/S, CASE/RS, CAT/RS
http://www.kema.at
.
Thanks Peter

It wa one of those syntax things that i just didnt find
thanks
Nov 15 '05 #3

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

Similar topics

8
by: Allan Bredahl | last post by:
Hi All I have a problem with getting a DataTable to submit changes back to the database when calling AcceptChanges. What I do is simplyfied this : 1) I set up a SqlDataAdapter with...
1
by: microsoft.news.com | last post by:
is it possible to run a SELECT statement against a datatable, and if so how? this is what i have, its populating an excel document, I have my dataset, creatig a data table, now i need to group the...
2
by: Newbie | last post by:
Im getting an exception: System.FormatException: Input string was not in a correct format. at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) at...
2
by: =?Utf-8?B?TWFyYw==?= | last post by:
In Visual Studio 2005, I am developing a Windows Mobile application, using Mobile SQL 2005. I need Data from a Database to be shown in a DataGrid, this works. But now I want to be able to get the...
1
by: jobs | last post by:
I have a GRIDVIEW I have bound to an OBJECTDATASOURCE that has the select pointing to a class method that uses ADO to grab a dataset from SQL Server Stored Procedure. One of the columns that...
13
by: =?Utf-8?B?UGV0ZXI=?= | last post by:
I want to create a new column in a datatable from two existing columns. I have no problem to create the new column using the datatable.columns.add method. The problem is the value of the new...
0
by: Dawnyy | last post by:
I have a typed dataset which I am populating using fill methods based on stored procedures. I have a form which contains a summary list of records and when a record is selected the detail of that...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.