Click here to Skip to main content
15,905,566 members
Home / Discussions / C#
   

C#

 
GeneralRe: MouseMove in a container Pin
Ajay.k_Singh19-Sep-08 3:31
Ajay.k_Singh19-Sep-08 3:31 
GeneralRe: MouseMove in a container Pin
Rafone19-Sep-08 5:31
Rafone19-Sep-08 5:31 
AnswerRe: MouseMove in a container Pin
Rafone19-Sep-08 6:50
Rafone19-Sep-08 6:50 
QuestionCan a template parameter be restricted to primitive types? Pin
HosamAly18-Sep-08 11:24
HosamAly18-Sep-08 11:24 
AnswerRe: Can a template parameter be restricted to primitive types? Pin
Pete O'Hanlon18-Sep-08 11:31
mvePete O'Hanlon18-Sep-08 11:31 
GeneralRe: Can a template parameter be restricted to primitive types? Pin
HosamAly19-Sep-08 23:38
HosamAly19-Sep-08 23:38 
QuestionConcatenation or Data Type problem :s Pin
Muammar©18-Sep-08 11:11
Muammar©18-Sep-08 11:11 
AnswerRe: Concatenation or Data Type problem :s Pin
Mbah Dhaim18-Sep-08 12:54
Mbah Dhaim18-Sep-08 12:54 
i've tried your code but no error found

here my code
private DataTable CreateDataTable()
        {
            DataTable result = new DataTable();
            result.Columns.AddRange(new DataColumn[]{new DataColumn("ID", typeof(int)), new DataColumn("NAME")});
            return result;
        }

        public List<string[]> CreateList()
        {
            List<string[]> result = new List<string[]>();
            for (int i = 0; i < 100; i++)
            {
                string[] data = new string[] { string.Format("{0}", i + 1), string.Format("data_{0}", i + 1) };
                result.Add(data);
            }
            return result;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            DataTable dtb = CreateDataTable();
            List<string[]> result = CreateList();
            for (int i = 0; i < result.Count; i++)
            {
                dtb.Rows.Add(result[i]);
            }
            dataGridView1.DataSource = dtb;
            try
            {
                string strExpression = "ID = 1";
                DataRow[] dr = dtb.Select(strExpression);                 MessageBox.Show(dr[0].ToString());
            }
            catch (Exception ex)
            {

                MessageBox.Show(ex.Message);
            }
        }


D'Oh! | :doh:

dhaim
programming is a hobby that make some money as side effect Smile | :)

GeneralRe: Concatenation or Data Type problem :s Pin
Muammar©18-Sep-08 23:06
Muammar©18-Sep-08 23:06 
QuestionProblems connecting to excel with c# 2005 over windows2000 Pin
R.A.C18-Sep-08 10:05
R.A.C18-Sep-08 10:05 
AnswerRe: Problems connecting to excel with c# 2005 over windows2000 Pin
Paul Conrad18-Sep-08 10:27
professionalPaul Conrad18-Sep-08 10:27 
GeneralRe: Problems connecting to excel with c# 2005 over windows2000 Pin
R.A.C18-Sep-08 12:10
R.A.C18-Sep-08 12:10 
GeneralRe: Problems connecting to excel with c# 2005 over windows2000 Pin
Paul Conrad18-Sep-08 12:20
professionalPaul Conrad18-Sep-08 12:20 
QuestionWho can help ? Pin
Mohammad Dayyan18-Sep-08 10:03
Mohammad Dayyan18-Sep-08 10:03 
AnswerRe: Who can help ? Pin
Giorgi Dalakishvili18-Sep-08 10:14
mentorGiorgi Dalakishvili18-Sep-08 10:14 
AnswerRe: Who can help ? Pin
Eslam Afifi18-Sep-08 15:15
Eslam Afifi18-Sep-08 15:15 
GeneralRe: Who can help ? Pin
Mohammad Dayyan19-Sep-08 2:25
Mohammad Dayyan19-Sep-08 2:25 
AnswerRe: Who can help ? Pin
Eslam Afifi19-Sep-08 4:12
Eslam Afifi19-Sep-08 4:12 
GeneralRe: Who can help ? Pin
Mohammad Dayyan19-Sep-08 4:31
Mohammad Dayyan19-Sep-08 4:31 
GeneralRe: Who can help ? Pin
Eslam Afifi19-Sep-08 5:53
Eslam Afifi19-Sep-08 5:53 
QuestionReliabilityContractAttribute Pin
HosamAly18-Sep-08 9:26
HosamAly18-Sep-08 9:26 
Questionhow to fire button1_click event while pressing enter key Pin
Shuaib wasif khan18-Sep-08 8:39
Shuaib wasif khan18-Sep-08 8:39 
AnswerRe: how to fire button1_click event while pressing enter key Pin
DaveyM6918-Sep-08 8:56
professionalDaveyM6918-Sep-08 8:56 
AnswerRe: how to fire button1_click event while pressing enter key Pin
Alan N18-Sep-08 8:58
Alan N18-Sep-08 8:58 
QuestionHow to convert an object array to string Pin
soniaiq18-Sep-08 7:32
soniaiq18-Sep-08 7:32 

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.