CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2002
    Posts
    41

    Adding Columns using ArrayList and BoundColumn

    Hi,

    How to add new columns using an ArrayList without creating a class ?
    Notice: bc.DataField="!" works when AutoGenerateColumns is off. Otherwise nothing is displayed.

    ArrayList a=new ArrayList();
    a.Add("hello world");
    DataGrid1.DataSource=a;
    BoundColumn bc=new BoundColumn();
    bc.DataField="!";
    DataGrid1.Columns.Add(bc);
    DataGrid1.DataBind();

    Yours sincerely
    Andla

  2. #2
    Join Date
    Jul 2003
    Location
    Singapore
    Posts
    1,822
    dude stop spamming all the forums!!!
    i see your message is all the forums!!!
    have some patience!
    R. Thomas
    "Be anxious for nothing, but in everything by prayer and supplication, with thanksgiving, let your requests be made know to God; and the peace of God, which surpasses all understanding, will guard your hearts and minds through Christ Jesus."Philippians 4:6-7
    "Rejoice always, pray without ceasing, in everything give thanks; for this is the will of God in Christ Jesus for you."1Thess. 5:16-18

  3. #3
    Join Date
    Sep 2002
    Posts
    41
    Hi!

    I don't spam

    Spamming is sending message to multiple recipents that doesn't want them.

    I send one question to a couple of forumsites. This is not wrong everybody should be able to post to more than one forumsite.

    I know that i sent a similar question some days before and I was afraid that this question was to long or something else was wrong because I have not get any help. This question that I sent here was an attempt to make it shorter and easier to read.

    Maybe that I missed some edit button on my old question and I wrote a new message instead and then this is my misstake if this is the main cause of your accusation.

    Please don't accuse me of spamming in the future.

    Regards
    Andla
    Last edited by andlag; March 31st, 2004 at 07:27 AM.

  4. #4
    Join Date
    Jul 2003
    Location
    Singapore
    Posts
    1,822
    use POST REPLY instead of NEW THREAD to clarify your question...!!!
    R. Thomas
    "Be anxious for nothing, but in everything by prayer and supplication, with thanksgiving, let your requests be made know to God; and the peace of God, which surpasses all understanding, will guard your hearts and minds through Christ Jesus."Philippians 4:6-7
    "Rejoice always, pray without ceasing, in everything give thanks; for this is the will of God in Christ Jesus for you."1Thess. 5:16-18

  5. #5
    Join Date
    Sep 2002
    Posts
    41
    You are right I could use reply to ********. I will do that in the future.

    How long time would be ok to post another qestion if I havent get any response ?

    BTW did you try my samplecode ?
    the '!' in bc.DataField="!" is very odd I think.

    Regards
    Andla

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured