| Author: satya 25 Jun 2009 | Member Level: Diamond | Rating: Points: 1 |
DataTable dt1=(DataTable)Cache["TABLE"]; DataView dv=new DataView(dt1); string criteria=" Col1 = Col2"; dv.RowFilter=criteria; DataGrid2.DataSource=dv; DataGrid2.DataBind();
|
| Author: Narendra Reddy vajrala 25 Jun 2009 | Member Level: Diamond | Rating:  Points: 2 |
try like this
foreach (DataRow row in tableTimeStatus.Rows) { //Here check condition if ((row[1].ToString() == entertedTime) && (row[2].ToString() == enteredSatus)) { //Implement your Functionality } }
--Naren Challenge the Limits, But Don't limit the Challenges. http://dotnethelpbynaren.blogspot.com/
|
| Author: ABitSmart 25 Jun 2009 | Member Level: Diamond | Rating:  Points: 2 |
Modified Narendra's code.
List<int> ids = new List<int>(); foreach (DataRow row in tableTimeStatus.Rows) { if ((row[1].ToString() == row[2].ToString()) { ids.Add(row[0].ToString()); } }
|
| Author: Abhay 25 Jun 2009 | Member Level: Diamond | Rating:  Points: 2 |
use for loop compare two columns and if match add to another databale or store in string concate with specialcharacter(as it is number).
Thanks and Regards, Abhay
|