getting row index of a table in data source
-
can i get rowindex of paricular row in a table
-
can i get rowindex of paricular row in a table
amarnath n.n wrote:
can i get rowindex of paricular row in a table
which kind of table ? Are you talking about GridView or what ?
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article
-
amarnath n.n wrote:
can i get rowindex of paricular row in a table
which kind of table ? Are you talking about GridView or what ?
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article
Table in a datasource
-
Table in a datasource
sorry wrongly sent Table in a DataSet
-
sorry wrongly sent Table in a DataSet
amarnath n.n wrote:
Table in a DataSet
Yes you can. Load the
DataSet Table
data inDataTable
. Then you can read the data from each and every row based on row index.DataSet Ds= LoadDataSet();
if (Ds.Tables["Table1"].Rows.Count>0)
{
DataTable dtable = new DataTable();
dtable = Ds.Tables["Table1"];
//Read data
string Name= dt1.Rows[0]["Name"].ToString();}
This is an sample example, Hope this will help you :-D
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article
-
amarnath n.n wrote:
Table in a DataSet
Yes you can. Load the
DataSet Table
data inDataTable
. Then you can read the data from each and every row based on row index.DataSet Ds= LoadDataSet();
if (Ds.Tables["Table1"].Rows.Count>0)
{
DataTable dtable = new DataTable();
dtable = Ds.Tables["Table1"];
//Read data
string Name= dt1.Rows[0]["Name"].ToString();}
This is an sample example, Hope this will help you :-D
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article
Not like this i want to get the rowindex of particular row.see the code which i am trying to do that DataRow[] row =dsphotos.Tables[0].Select("PHOTO_ID",Session["ID"].ToString()); int rowindex= dsphotos.Tables[0].Rows.IndexOf(row[0]);
-
Not like this i want to get the rowindex of particular row.see the code which i am trying to do that DataRow[] row =dsphotos.Tables[0].Select("PHOTO_ID",Session["ID"].ToString()); int rowindex= dsphotos.Tables[0].Rows.IndexOf(row[0]);
So what's your question? You are fine with your implementation or you want something else.:confused:
Regards, Arindam Sinha MyBlog - http://arindamsinha.wordpress.com/ Please give your feedback on this answer.