Click here to Skip to main content
15,889,281 members
Home / Discussions / C#
   

C#

 
AnswerRe: problem with AL.exe created DLL Pin
fjdiewornncalwe13-Oct-10 2:37
professionalfjdiewornncalwe13-Oct-10 2:37 
QuestionSpace as string in user settings file Pin
cbutle3@netzero.com12-Oct-10 5:24
cbutle3@netzero.com12-Oct-10 5:24 
AnswerRe: Space as string in user settings file Pin
#realJSOP12-Oct-10 8:07
mve#realJSOP12-Oct-10 8:07 
AnswerRe: Space as string in user settings file Pin
kevinnicol12-Oct-10 8:25
kevinnicol12-Oct-10 8:25 
GeneralRe: Space as string in user settings file Pin
cbutle3@netzero.com12-Oct-10 9:01
cbutle3@netzero.com12-Oct-10 9:01 
GeneralRe: Space as string in user settings file Pin
Ian Shlasko12-Oct-10 9:33
Ian Shlasko12-Oct-10 9:33 
AnswerRe: Space as string in user settings file [modified] Pin
PIEBALDconsult12-Oct-10 17:09
mvePIEBALDconsult12-Oct-10 17:09 
QuestionDataGridView Search [modified] Pin
boreland12-Oct-10 3:55
boreland12-Oct-10 3:55 
I'm using a DataGridView to display dynamically changing data. The first column contains a row description, two more columns contain data values. The rows are added by the following code:
foreach (DataRow symr in symdt.Rows)
{
    dataGridView1.Rows.Add();
    int RowIndex = dataGridView1.RowCount - 1;
    DataGridViewRow row = dataGridView1.Rows[RowIndex];
    row.Cells["Symbol"].Value = symr["Symbol"].ToString();
    row.Cells["Symbol"].Style.BackColor = Color.LightYellow;  
}


I wish to edit the data values based upon the row descriptor. What is the most efficient way to find the row index based upon the descriptor?

I could do this way:
int rowIndex = -1;
foreach (DataGridViewRow row in dataGridView1.Rows)
{
   if (row.Cells[0].Value.ToString().Equals(symbol to be found))
   {
       rowIndex = row.Index;
       break;
   }
}


But is there a better(faster), more direct way to do it without using a foreach loop?

Also, is the DataGridView the best control to use to display fast changing dynamic data?

Many Thanks

modified on Tuesday, October 12, 2010 10:52 AM

AnswerRe: DataGridView Search Pin
Luc Pattyn12-Oct-10 4:14
sitebuilderLuc Pattyn12-Oct-10 4:14 
GeneralRe: DataGridView Search Pin
boreland12-Oct-10 4:19
boreland12-Oct-10 4:19 
GeneralRe: DataGridView Search Pin
Luc Pattyn12-Oct-10 4:43
sitebuilderLuc Pattyn12-Oct-10 4:43 
GeneralRe: DataGridView Search Pin
boreland12-Oct-10 4:50
boreland12-Oct-10 4:50 
GeneralRe: DataGridView Search Pin
Luc Pattyn12-Oct-10 4:56
sitebuilderLuc Pattyn12-Oct-10 4:56 
AnswerRe: DataGridView Search Pin
boreland12-Oct-10 16:04
boreland12-Oct-10 16:04 
QuestionHow to create a DataSet with two tables having a 'JOIN' in ADO.NET? Pin
PravinSingh12-Oct-10 2:14
PravinSingh12-Oct-10 2:14 
AnswerRe: How to create a DataSet with two tables having a 'JOIN' in ADO.NET? Pin
OriginalGriff12-Oct-10 2:23
mveOriginalGriff12-Oct-10 2:23 
GeneralRe: How to create a DataSet with two tables having a 'JOIN' in ADO.NET? Pin
PravinSingh12-Oct-10 3:57
PravinSingh12-Oct-10 3:57 
GeneralRe: How to create a DataSet with two tables having a 'JOIN' in ADO.NET? Pin
MKAdeel12-Oct-10 23:48
MKAdeel12-Oct-10 23:48 
GeneralRe: How to create a DataSet with two tables having a 'JOIN' in ADO.NET? Pin
Pete O'Hanlon13-Oct-10 0:59
mvePete O'Hanlon13-Oct-10 0:59 
QuestionRe: How to create a DataSet with two tables having a 'JOIN' in ADO.NET? Pin
PravinSingh13-Oct-10 7:20
PravinSingh13-Oct-10 7:20 
AnswerRe: How to create a DataSet with two tables having a 'JOIN' in ADO.NET? Pin
fjdiewornncalwe12-Oct-10 2:48
professionalfjdiewornncalwe12-Oct-10 2:48 
AnswerRe: How to create a DataSet with two tables having a 'JOIN' in ADO.NET? Pin
PIEBALDconsult12-Oct-10 3:34
mvePIEBALDconsult12-Oct-10 3:34 
AnswerRe: How to create a DataSet with two tables having a 'JOIN' in ADO.NET? Pin
T M Gray12-Oct-10 8:16
T M Gray12-Oct-10 8:16 
GeneralRe: How to create a DataSet with two tables having a 'JOIN' in ADO.NET? Pin
PIEBALDconsult12-Oct-10 17:15
mvePIEBALDconsult12-Oct-10 17:15 
Questionhow to findout which drive is a cool disk? Pin
Fred 3412-Oct-10 1:40
Fred 3412-Oct-10 1:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.