ArrayList.RemoveAt(i)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alex Ting

    #1

    ArrayList.RemoveAt(i)

    Hi Everybody,

    I have an issue about deleting an object from an arrayList.

    I've bounded a datagrid using this code
    where it will first run through all of the code in loadQuestions() and bind
    a arrayList to the datagrid.

    private void BindQuestions()

    {

    dataGridQuestio ns.DataSource= this.AppQuiz.ge tQuestions();

    this.toolBarBtn Save.Enabled=tr ue;

    this.toolBarBtn Del.Enabled=tru e;

    }



    public void loadQuestions()

    {

    this.BindQuesti ons();//this.AppQuiz.ge tQuestions();//AppQuiz();

    if(this.DataGri dSet==false)

    {

    DataGridTableSt yle gs = new DataGridTableSt yle(); // gs = Grid Style


    gs.MappingName = AppQuiz.getQues tions().GetType ().Name;
    //dummyDataArr.Ge tType().Name;

    gs.AllowSorting = true;

    gs.AlternatingB ackColor = System.Drawing. Color.AntiqueWh ite;


    DataGridTextBox Column cs2 = new DataGridTextBox Column();

    cs2.MappingName = "QuestionID ";

    cs2.HeaderText = "No.";

    cs2.Alignment = HorizontalAlign ment.Left;

    cs2.Width = 33;

    cs2.ReadOnly = true;


    gs.GridColumnSt yles.Add(cs2);


    DataGridBoolCol umn cs = new DataGridBoolCol umn(); // cs = Column
    Style

    cs.MappingName = "Publish";

    cs.HeaderText = "Publish";

    cs.Width = 75;

    gs.GridColumnSt yles.Add(cs);

    cs = new DataGridBoolCol umn();

    cs.MappingName = "Required";

    cs.HeaderText = "Mandatory" ;

    cs.Width = 75;

    cs2.ReadOnly = true;

    gs.GridColumnSt yles.Add(cs);

    cs2 = new DataGridTextBox Column();

    cs2.MappingName = "QuestionTy pe";

    cs2.HeaderText = "Question Type";

    cs2.Alignment = HorizontalAlign ment.Center;

    cs2.Width = 80;

    cs2.ReadOnly = true;

    gs.GridColumnSt yles.Add(cs2);

    cs2 = new DataGridTextBox Column();

    cs2.MappingName = "Ask";

    cs2.HeaderText = "Question";

    cs2.Alignment = HorizontalAlign ment.Left;

    cs2.Width = 255;

    cs2.ReadOnly = true;

    gs.GridColumnSt yles.Add(cs2);

    dataGridQuestio ns.TableStyles. Add(gs);


    }

    panelDgQuestion s.Show();

    panelSplash.Hid e();

    }



    And then after that, they can delete a row from the datagrid. Then this
    function is called



    /// <summary>

    /// this will remove the questions and then shuffle up all the questions
    after it

    /// </summary>

    /// <param name="questionI D">question ID to remove</param>

    public void removeAndShuffl e(int questionID)

    {

    for(int i=0; i< this.myQuestion s.Count; i++)

    {

    if(((Learningfa st.QGM.Question )this.myQuestio ns[i]).QuestionID
    == questionID)

    {

    this.myQuestion s.RemoveAt(i);

    }

    }

    }



    In debug mode, for example if there were 2 rows, it is now 1 row and
    everything seems fine, but when i rebind the datagrid with the arraylist
    after an object has been removed,

    private void BindQuestions()

    {

    dataGridQuestio ns.DataSource= this.AppQuiz.ge tQuestions();

    this.toolBarBtn Save.Enabled=tr ue;

    this.toolBarBtn Del.Enabled=tru e;

    }

    Mind you it does not run through the initializing statements of the
    datagrid, it just rebinds the datasource. And then at this point when the
    datagrid is meant to be displayed, it gives me an error index [index number
    that was deleted] is out of bounds.

    Can someone please tell me whats happening? I've read up in several cases
    and usually this means that I'm trying to bring up the object that was
    deleted but I'm just changing the datasource to the amended arraylist. Could
    this have to do with my existing datagrid where i'm not initializing it
    again? because I've tried that and it also brings up an error saying that
    i'm using the same "mapping name"

    Thanks in advance.

    Kind Regards

    Alex Ting


    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.532 / Virus Database: 326 - Release Date: 27/10/2003


  • Jeffrey Tan[MSFT]

    #2
    RE: ArrayList.Remov eAt(i)


    Hi Alex,

    Sorry for letting you wait for so long time.
    I think your code snipet is not integrated. There is nothing code related
    to getQuestions() method.
    But I still can give you some suggestion.
    For datagrid to bind to the arraylist, you should set the MappingName
    property to "ArrayList" not others. This rule can be found in MSDN document
    in DataGrid(WinFor m).
    I think if you set the correct binding, the datagrid will reflect the
    source arraylist correctly.

    For a sample of how to bind arraylist to datagrid, you can refer to:
    http://www.syncfusion.com/FAQ/WinFor...c43c.asp#q818q

    If you still have anything unclear, please feel free to let me know.

    Best regards,
    Jeffrey Tan
    Microsoft Online Partner Support
    Get Secure! - www.microsoft.com/security
    This posting is provided "as is" with no warranties and confers no rights.

    --------------------
    | From: "Alex Ting" <ating@learning fast.com>
    | Subject: ArrayList.Remov eAt(i)
    | Date: Fri, 31 Oct 2003 16:30:57 +1100
    | Lines: 201
    | X-Priority: 3
    | X-MSMail-Priority: Normal
    | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
    | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
    | Message-ID: <OaUw5A3nDHA.39 2@TK2MSFTNGP11. phx.gbl>
    | Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
    | NNTP-Posting-Host: learningfast2.l earnfast.monash .edu.au 130.194.247.2
    | Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP11.phx.g bl
    | Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.csharp:1956 20
    | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
    |
    | Hi Everybody,
    |
    | I have an issue about deleting an object from an arrayList.
    |
    | I've bounded a datagrid using this code
    | where it will first run through all of the code in loadQuestions() and
    bind
    | a arrayList to the datagrid.
    |
    | private void BindQuestions()
    |
    | {
    |
    | dataGridQuestio ns.DataSource= this.AppQuiz.ge tQuestions();
    |
    | this.toolBarBtn Save.Enabled=tr ue;
    |
    | this.toolBarBtn Del.Enabled=tru e;
    |
    | }
    |
    |
    |
    | public void loadQuestions()
    |
    | {
    |
    | this.BindQuesti ons();//this.AppQuiz.ge tQuestions();//AppQuiz();
    |
    | if(this.DataGri dSet==false)
    |
    | {
    |
    | DataGridTableSt yle gs = new DataGridTableSt yle(); // gs = Grid
    Style
    |
    |
    | gs.MappingName = AppQuiz.getQues tions().GetType ().Name;
    | //dummyDataArr.Ge tType().Name;
    |
    | gs.AllowSorting = true;
    |
    | gs.AlternatingB ackColor = System.Drawing. Color.AntiqueWh ite;
    |
    |
    | DataGridTextBox Column cs2 = new DataGridTextBox Column();
    |
    | cs2.MappingName = "QuestionID ";
    |
    | cs2.HeaderText = "No.";
    |
    | cs2.Alignment = HorizontalAlign ment.Left;
    |
    | cs2.Width = 33;
    |
    | cs2.ReadOnly = true;
    |
    |
    | gs.GridColumnSt yles.Add(cs2);
    |
    |
    | DataGridBoolCol umn cs = new DataGridBoolCol umn(); // cs = Column
    | Style
    |
    | cs.MappingName = "Publish";
    |
    | cs.HeaderText = "Publish";
    |
    | cs.Width = 75;
    |
    | gs.GridColumnSt yles.Add(cs);
    |
    | cs = new DataGridBoolCol umn();
    |
    | cs.MappingName = "Required";
    |
    | cs.HeaderText = "Mandatory" ;
    |
    | cs.Width = 75;
    |
    | cs2.ReadOnly = true;
    |
    | gs.GridColumnSt yles.Add(cs);
    |
    | cs2 = new DataGridTextBox Column();
    |
    | cs2.MappingName = "QuestionTy pe";
    |
    | cs2.HeaderText = "Question Type";
    |
    | cs2.Alignment = HorizontalAlign ment.Center;
    |
    | cs2.Width = 80;
    |
    | cs2.ReadOnly = true;
    |
    | gs.GridColumnSt yles.Add(cs2);
    |
    | cs2 = new DataGridTextBox Column();
    |
    | cs2.MappingName = "Ask";
    |
    | cs2.HeaderText = "Question";
    |
    | cs2.Alignment = HorizontalAlign ment.Left;
    |
    | cs2.Width = 255;
    |
    | cs2.ReadOnly = true;
    |
    | gs.GridColumnSt yles.Add(cs2);
    |
    | dataGridQuestio ns.TableStyles. Add(gs);
    |
    |
    | }
    |
    | panelDgQuestion s.Show();
    |
    | panelSplash.Hid e();
    |
    | }
    |
    |
    |
    | And then after that, they can delete a row from the datagrid. Then this
    | function is called
    |
    |
    |
    | /// <summary>
    |
    | /// this will remove the questions and then shuffle up all the questions
    | after it
    |
    | /// </summary>
    |
    | /// <param name="questionI D">question ID to remove</param>
    |
    | public void removeAndShuffl e(int questionID)
    |
    | {
    |
    | for(int i=0; i< this.myQuestion s.Count; i++)
    |
    | {
    |
    | if(((Learningfa st.QGM.Question )this.myQuestio ns[i]).QuestionID
    | == questionID)
    |
    | {
    |
    | this.myQuestion s.RemoveAt(i);
    |
    | }
    |
    | }
    |
    | }
    |
    |
    |
    | In debug mode, for example if there were 2 rows, it is now 1 row and
    | everything seems fine, but when i rebind the datagrid with the arraylist
    | after an object has been removed,
    |
    | private void BindQuestions()
    |
    | {
    |
    | dataGridQuestio ns.DataSource= this.AppQuiz.ge tQuestions();
    |
    | this.toolBarBtn Save.Enabled=tr ue;
    |
    | this.toolBarBtn Del.Enabled=tru e;
    |
    | }
    |
    | Mind you it does not run through the initializing statements of the
    | datagrid, it just rebinds the datasource. And then at this point when the
    | datagrid is meant to be displayed, it gives me an error index [index
    number
    | that was deleted] is out of bounds.
    |
    | Can someone please tell me whats happening? I've read up in several cases
    | and usually this means that I'm trying to bring up the object that was
    | deleted but I'm just changing the datasource to the amended arraylist.
    Could
    | this have to do with my existing datagrid where i'm not initializing it
    | again? because I've tried that and it also brings up an error saying that
    | i'm using the same "mapping name"
    |
    | Thanks in advance.
    |
    | Kind Regards
    |
    | Alex Ting
    |
    |
    | ---
    | Outgoing mail is certified Virus Free.
    | Checked by AVG anti-virus system (http://www.grisoft.com).
    | Version: 6.0.532 / Virus Database: 326 - Release Date: 27/10/2003
    |
    |
    |

    Comment

    • Alex Ting

      #3
      Re: ArrayList.Remov eAt(i)

      Hi Jeff,

      Thanks for your reply.

      the getQuestions simply returns the arrayList

      public Learningfast.QG M.QuizList getQuestions()

      {

      return this.myQuestion s;

      }

      The mapping name is set to this but this is still not working. I even set
      the mapping name to "ArrayList" but to no avail.

      Thanks in advance.

      Alex Ting


      ""Jeffrey Tan[MSFT]"" <v-jetan@online.mi crosoft.com> wrote in message
      news:MhzPQQ3oDH A.2624@cpmsftng xa06.phx.gbl...[color=blue]
      >
      > Hi Alex,
      >
      > Sorry for letting you wait for so long time.
      > I think your code snipet is not integrated. There is nothing code related
      > to getQuestions() method.
      > But I still can give you some suggestion.
      > For datagrid to bind to the arraylist, you should set the MappingName
      > property to "ArrayList" not others. This rule can be found in MSDN[/color]
      document[color=blue]
      > in DataGrid(WinFor m).
      > I think if you set the correct binding, the datagrid will reflect the
      > source arraylist correctly.
      >
      > For a sample of how to bind arraylist to datagrid, you can refer to:
      > http://www.syncfusion.com/FAQ/WinFor...c43c.asp#q818q
      >
      > If you still have anything unclear, please feel free to let me know.
      >
      > Best regards,
      > Jeffrey Tan
      > Microsoft Online Partner Support
      > Get Secure! - www.microsoft.com/security
      > This posting is provided "as is" with no warranties and confers no rights.
      >
      > --------------------
      > | From: "Alex Ting" <ating@learning fast.com>
      > | Subject: ArrayList.Remov eAt(i)
      > | Date: Fri, 31 Oct 2003 16:30:57 +1100
      > | Lines: 201
      > | X-Priority: 3
      > | X-MSMail-Priority: Normal
      > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
      > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
      > | Message-ID: <OaUw5A3nDHA.39 2@TK2MSFTNGP11. phx.gbl>
      > | Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
      > | NNTP-Posting-Host: learningfast2.l earnfast.monash .edu.au 130.194.247.2
      > | Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP11.phx.g bl
      > | Xref: cpmsftngxa06.ph x.gbl[/color]
      microsoft.publi c.dotnet.langua ges.csharp:1956 20[color=blue]
      > | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
      > |
      > | Hi Everybody,
      > |
      > | I have an issue about deleting an object from an arrayList.
      > |
      > | I've bounded a datagrid using this code
      > | where it will first run through all of the code in loadQuestions() and
      > bind
      > | a arrayList to the datagrid.
      > |
      > | private void BindQuestions()
      > |
      > | {
      > |
      > | dataGridQuestio ns.DataSource= this.AppQuiz.ge tQuestions();
      > |
      > | this.toolBarBtn Save.Enabled=tr ue;
      > |
      > | this.toolBarBtn Del.Enabled=tru e;
      > |
      > | }
      > |
      > |
      > |
      > | public void loadQuestions()
      > |
      > | {
      > |
      > | this.BindQuesti ons();//this.AppQuiz.ge tQuestions();//AppQuiz();
      > |
      > | if(this.DataGri dSet==false)
      > |
      > | {
      > |
      > | DataGridTableSt yle gs = new DataGridTableSt yle(); // gs = Grid
      > Style
      > |
      > |
      > | gs.MappingName = AppQuiz.getQues tions().GetType ().Name;
      > | //dummyDataArr.Ge tType().Name;
      > |
      > | gs.AllowSorting = true;
      > |
      > | gs.AlternatingB ackColor = System.Drawing. Color.AntiqueWh ite;
      > |
      > |
      > | DataGridTextBox Column cs2 = new DataGridTextBox Column();
      > |
      > | cs2.MappingName = "QuestionID ";
      > |
      > | cs2.HeaderText = "No.";
      > |
      > | cs2.Alignment = HorizontalAlign ment.Left;
      > |
      > | cs2.Width = 33;
      > |
      > | cs2.ReadOnly = true;
      > |
      > |
      > | gs.GridColumnSt yles.Add(cs2);
      > |
      > |
      > | DataGridBoolCol umn cs = new DataGridBoolCol umn(); // cs = Column
      > | Style
      > |
      > | cs.MappingName = "Publish";
      > |
      > | cs.HeaderText = "Publish";
      > |
      > | cs.Width = 75;
      > |
      > | gs.GridColumnSt yles.Add(cs);
      > |
      > | cs = new DataGridBoolCol umn();
      > |
      > | cs.MappingName = "Required";
      > |
      > | cs.HeaderText = "Mandatory" ;
      > |
      > | cs.Width = 75;
      > |
      > | cs2.ReadOnly = true;
      > |
      > | gs.GridColumnSt yles.Add(cs);
      > |
      > | cs2 = new DataGridTextBox Column();
      > |
      > | cs2.MappingName = "QuestionTy pe";
      > |
      > | cs2.HeaderText = "Question Type";
      > |
      > | cs2.Alignment = HorizontalAlign ment.Center;
      > |
      > | cs2.Width = 80;
      > |
      > | cs2.ReadOnly = true;
      > |
      > | gs.GridColumnSt yles.Add(cs2);
      > |
      > | cs2 = new DataGridTextBox Column();
      > |
      > | cs2.MappingName = "Ask";
      > |
      > | cs2.HeaderText = "Question";
      > |
      > | cs2.Alignment = HorizontalAlign ment.Left;
      > |
      > | cs2.Width = 255;
      > |
      > | cs2.ReadOnly = true;
      > |
      > | gs.GridColumnSt yles.Add(cs2);
      > |
      > | dataGridQuestio ns.TableStyles. Add(gs);
      > |
      > |
      > | }
      > |
      > | panelDgQuestion s.Show();
      > |
      > | panelSplash.Hid e();
      > |
      > | }
      > |
      > |
      > |
      > | And then after that, they can delete a row from the datagrid. Then this
      > | function is called
      > |
      > |
      > |
      > | /// <summary>
      > |
      > | /// this will remove the questions and then shuffle up all the questions
      > | after it
      > |
      > | /// </summary>
      > |
      > | /// <param name="questionI D">question ID to remove</param>
      > |
      > | public void removeAndShuffl e(int questionID)
      > |
      > | {
      > |
      > | for(int i=0; i< this.myQuestion s.Count; i++)
      > |
      > | {
      > |
      > |[/color]
      if(((Learningfa st.QGM.Question )this.myQuestio ns[i]).QuestionID[color=blue]
      > | == questionID)
      > |
      > | {
      > |
      > | this.myQuestion s.RemoveAt(i);
      > |
      > | }
      > |
      > | }
      > |
      > | }
      > |
      > |
      > |
      > | In debug mode, for example if there were 2 rows, it is now 1 row and
      > | everything seems fine, but when i rebind the datagrid with the arraylist
      > | after an object has been removed,
      > |
      > | private void BindQuestions()
      > |
      > | {
      > |
      > | dataGridQuestio ns.DataSource= this.AppQuiz.ge tQuestions();
      > |
      > | this.toolBarBtn Save.Enabled=tr ue;
      > |
      > | this.toolBarBtn Del.Enabled=tru e;
      > |
      > | }
      > |
      > | Mind you it does not run through the initializing statements of the
      > | datagrid, it just rebinds the datasource. And then at this point when[/color]
      the[color=blue]
      > | datagrid is meant to be displayed, it gives me an error index [index
      > number
      > | that was deleted] is out of bounds.
      > |
      > | Can someone please tell me whats happening? I've read up in several[/color]
      cases[color=blue]
      > | and usually this means that I'm trying to bring up the object that was
      > | deleted but I'm just changing the datasource to the amended arraylist.
      > Could
      > | this have to do with my existing datagrid where i'm not initializing it
      > | again? because I've tried that and it also brings up an error saying[/color]
      that[color=blue]
      > | i'm using the same "mapping name"
      > |
      > | Thanks in advance.
      > |
      > | Kind Regards
      > |
      > | Alex Ting
      > |
      > |
      > | ---
      > | Outgoing mail is certified Virus Free.
      > | Checked by AVG anti-virus system (http://www.grisoft.com).
      > | Version: 6.0.532 / Virus Database: 326 - Release Date: 27/10/2003
      > |
      > |
      > |
      >[/color]


      ---
      Outgoing mail is certified Virus Free.
      Checked by AVG anti-virus system (http://www.grisoft.com).
      Version: 6.0.536 / Virus Database: 331 - Release Date: 3/11/2003


      Comment

      • Jeffrey Tan[MSFT]

        #4
        Re: ArrayList.Remov eAt(i)


        Hi Alex,

        You should set DataGridTableSt yle's MappingName to "ArrayList" , then set
        DataGridColumnS tyle's MappingName to Arraylist's public property.
        When deleting the arraylist member, you should refer to the
        CurrencyManager (Manages the collection of BindingManagerB ase objects )
        which can get from BindingContext item.
        You should decrease CurrencyManager .Position property.
        Then, you can delete an item of arraylist and update the CurrencyManager .

        There is a sample project(You should download the entire project from a
        link in this article) in the post I last replied you. It provides you a
        detailed implementation of operating the Arraylist databinding. This sample
        project works well on my machine, and I think it will meet your need

        Best regards,
        Jeffrey Tan
        Microsoft Online Partner Support
        Get Secure! - www.microsoft.com/security
        This posting is provided "as is" with no warranties and confers no rights.

        --------------------
        | From: "Alex Ting" <ating@learning fast.com>
        | References: <OaUw5A3nDHA.39 2@TK2MSFTNGP11. phx.gbl>
        <MhzPQQ3oDHA.26 24@cpmsftngxa06 .phx.gbl>
        | Subject: Re: ArrayList.Remov eAt(i)
        | Date: Thu, 6 Nov 2003 13:34:30 +1100
        | Lines: 285
        | X-Priority: 3
        | X-MSMail-Priority: Normal
        | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
        | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
        | Message-ID: <e81VU6ApDHA.96 4@TK2MSFTNGP10. phx.gbl>
        | Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
        | NNTP-Posting-Host: learningfast2.l earnfast.monash .edu.au 130.194.247.2
        | Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP10.phx.g bl
        | Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.csharp:1970 66
        | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
        |
        | Hi Jeff,
        |
        | Thanks for your reply.
        |
        | the getQuestions simply returns the arrayList
        |
        | public Learningfast.QG M.QuizList getQuestions()
        |
        | {
        |
        | return this.myQuestion s;
        |
        | }
        |
        | The mapping name is set to this but this is still not working. I even set
        | the mapping name to "ArrayList" but to no avail.
        |
        | Thanks in advance.
        |
        | Alex Ting
        |
        |
        | ""Jeffrey Tan[MSFT]"" <v-jetan@online.mi crosoft.com> wrote in message
        | news:MhzPQQ3oDH A.2624@cpmsftng xa06.phx.gbl...
        | >
        | > Hi Alex,
        | >
        | > Sorry for letting you wait for so long time.
        | > I think your code snipet is not integrated. There is nothing code
        related
        | > to getQuestions() method.
        | > But I still can give you some suggestion.
        | > For datagrid to bind to the arraylist, you should set the MappingName
        | > property to "ArrayList" not others. This rule can be found in MSDN
        | document
        | > in DataGrid(WinFor m).
        | > I think if you set the correct binding, the datagrid will reflect the
        | > source arraylist correctly.
        | >
        | > For a sample of how to bind arraylist to datagrid, you can refer to:
        | > http://www.syncfusion.com/FAQ/WinFor...c43c.asp#q818q
        | >
        | > If you still have anything unclear, please feel free to let me know.
        | >
        | > Best regards,
        | > Jeffrey Tan
        | > Microsoft Online Partner Support
        | > Get Secure! - www.microsoft.com/security
        | > This posting is provided "as is" with no warranties and confers no
        rights.
        | >
        | > --------------------
        | > | From: "Alex Ting" <ating@learning fast.com>
        | > | Subject: ArrayList.Remov eAt(i)
        | > | Date: Fri, 31 Oct 2003 16:30:57 +1100
        | > | Lines: 201
        | > | X-Priority: 3
        | > | X-MSMail-Priority: Normal
        | > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
        | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
        | > | Message-ID: <OaUw5A3nDHA.39 2@TK2MSFTNGP11. phx.gbl>
        | > | Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
        | > | NNTP-Posting-Host: learningfast2.l earnfast.monash .edu.au 130.194.247.2
        | > | Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP11.phx.g bl
        | > | Xref: cpmsftngxa06.ph x.gbl
        | microsoft.publi c.dotnet.langua ges.csharp:1956 20
        | > | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
        | > |
        | > | Hi Everybody,
        | > |
        | > | I have an issue about deleting an object from an arrayList.
        | > |
        | > | I've bounded a datagrid using this code
        | > | where it will first run through all of the code in loadQuestions() and
        | > bind
        | > | a arrayList to the datagrid.
        | > |
        | > | private void BindQuestions()
        | > |
        | > | {
        | > |
        | > | dataGridQuestio ns.DataSource= this.AppQuiz.ge tQuestions();
        | > |
        | > | this.toolBarBtn Save.Enabled=tr ue;
        | > |
        | > | this.toolBarBtn Del.Enabled=tru e;
        | > |
        | > | }
        | > |
        | > |
        | > |
        | > | public void loadQuestions()
        | > |
        | > | {
        | > |
        | > | this.BindQuesti ons();//this.AppQuiz.ge tQuestions();//AppQuiz();
        | > |
        | > | if(this.DataGri dSet==false)
        | > |
        | > | {
        | > |
        | > | DataGridTableSt yle gs = new DataGridTableSt yle(); // gs = Grid
        | > Style
        | > |
        | > |
        | > | gs.MappingName = AppQuiz.getQues tions().GetType ().Name;
        | > | //dummyDataArr.Ge tType().Name;
        | > |
        | > | gs.AllowSorting = true;
        | > |
        | > | gs.AlternatingB ackColor = System.Drawing. Color.AntiqueWh ite;
        | > |
        | > |
        | > | DataGridTextBox Column cs2 = new DataGridTextBox Column();
        | > |
        | > | cs2.MappingName = "QuestionID ";
        | > |
        | > | cs2.HeaderText = "No.";
        | > |
        | > | cs2.Alignment = HorizontalAlign ment.Left;
        | > |
        | > | cs2.Width = 33;
        | > |
        | > | cs2.ReadOnly = true;
        | > |
        | > |
        | > | gs.GridColumnSt yles.Add(cs2);
        | > |
        | > |
        | > | DataGridBoolCol umn cs = new DataGridBoolCol umn(); // cs =
        Column
        | > | Style
        | > |
        | > | cs.MappingName = "Publish";
        | > |
        | > | cs.HeaderText = "Publish";
        | > |
        | > | cs.Width = 75;
        | > |
        | > | gs.GridColumnSt yles.Add(cs);
        | > |
        | > | cs = new DataGridBoolCol umn();
        | > |
        | > | cs.MappingName = "Required";
        | > |
        | > | cs.HeaderText = "Mandatory" ;
        | > |
        | > | cs.Width = 75;
        | > |
        | > | cs2.ReadOnly = true;
        | > |
        | > | gs.GridColumnSt yles.Add(cs);
        | > |
        | > | cs2 = new DataGridTextBox Column();
        | > |
        | > | cs2.MappingName = "QuestionTy pe";
        | > |
        | > | cs2.HeaderText = "Question Type";
        | > |
        | > | cs2.Alignment = HorizontalAlign ment.Center;
        | > |
        | > | cs2.Width = 80;
        | > |
        | > | cs2.ReadOnly = true;
        | > |
        | > | gs.GridColumnSt yles.Add(cs2);
        | > |
        | > | cs2 = new DataGridTextBox Column();
        | > |
        | > | cs2.MappingName = "Ask";
        | > |
        | > | cs2.HeaderText = "Question";
        | > |
        | > | cs2.Alignment = HorizontalAlign ment.Left;
        | > |
        | > | cs2.Width = 255;
        | > |
        | > | cs2.ReadOnly = true;
        | > |
        | > | gs.GridColumnSt yles.Add(cs2);
        | > |
        | > | dataGridQuestio ns.TableStyles. Add(gs);
        | > |
        | > |
        | > | }
        | > |
        | > | panelDgQuestion s.Show();
        | > |
        | > | panelSplash.Hid e();
        | > |
        | > | }
        | > |
        | > |
        | > |
        | > | And then after that, they can delete a row from the datagrid. Then
        this
        | > | function is called
        | > |
        | > |
        | > |
        | > | /// <summary>
        | > |
        | > | /// this will remove the questions and then shuffle up all the
        questions
        | > | after it
        | > |
        | > | /// </summary>
        | > |
        | > | /// <param name="questionI D">question ID to remove</param>
        | > |
        | > | public void removeAndShuffl e(int questionID)
        | > |
        | > | {
        | > |
        | > | for(int i=0; i< this.myQuestion s.Count; i++)
        | > |
        | > | {
        | > |
        | > |
        | if(((Learningfa st.QGM.Question )this.myQuestio ns[i]).QuestionID
        | > | == questionID)
        | > |
        | > | {
        | > |
        | > | this.myQuestion s.RemoveAt(i);
        | > |
        | > | }
        | > |
        | > | }
        | > |
        | > | }
        | > |
        | > |
        | > |
        | > | In debug mode, for example if there were 2 rows, it is now 1 row and
        | > | everything seems fine, but when i rebind the datagrid with the
        arraylist
        | > | after an object has been removed,
        | > |
        | > | private void BindQuestions()
        | > |
        | > | {
        | > |
        | > | dataGridQuestio ns.DataSource= this.AppQuiz.ge tQuestions();
        | > |
        | > | this.toolBarBtn Save.Enabled=tr ue;
        | > |
        | > | this.toolBarBtn Del.Enabled=tru e;
        | > |
        | > | }
        | > |
        | > | Mind you it does not run through the initializing statements of the
        | > | datagrid, it just rebinds the datasource. And then at this point when
        | the
        | > | datagrid is meant to be displayed, it gives me an error index [index
        | > number
        | > | that was deleted] is out of bounds.
        | > |
        | > | Can someone please tell me whats happening? I've read up in several
        | cases
        | > | and usually this means that I'm trying to bring up the object that was
        | > | deleted but I'm just changing the datasource to the amended arraylist.
        | > Could
        | > | this have to do with my existing datagrid where i'm not initializing
        it
        | > | again? because I've tried that and it also brings up an error saying
        | that
        | > | i'm using the same "mapping name"
        | > |
        | > | Thanks in advance.
        | > |
        | > | Kind Regards
        | > |
        | > | Alex Ting
        | > |
        | > |
        | > | ---
        | > | Outgoing mail is certified Virus Free.
        | > | Checked by AVG anti-virus system (http://www.grisoft.com).
        | > | Version: 6.0.532 / Virus Database: 326 - Release Date: 27/10/2003
        | > |
        | > |
        | > |
        | >
        |
        |
        | ---
        | Outgoing mail is certified Virus Free.
        | Checked by AVG anti-virus system (http://www.grisoft.com).
        | Version: 6.0.536 / Virus Database: 331 - Release Date: 3/11/2003
        |
        |
        |

        Comment

        • Alex Ting

          #5
          Re: ArrayList.Remov eAt(i)

          Hi Jeffrey,

          Thanks for that!

          Such as simple solution...
          just set the databindings to null and then bind it to the arraylist straight
          after!
          Kind Regards
          Alex
          ""Jeffrey Tan[MSFT]"" <v-jetan@online.mi crosoft.com> wrote in message
          news:Y8BBI8DpDH A.1544@cpmsftng xa06.phx.gbl...[color=blue]
          >
          > Hi Alex,
          >
          > You should set DataGridTableSt yle's MappingName to "ArrayList" , then set
          > DataGridColumnS tyle's MappingName to Arraylist's public property.
          > When deleting the arraylist member, you should refer to the
          > CurrencyManager (Manages the collection of BindingManagerB ase objects )
          > which can get from BindingContext item.
          > You should decrease CurrencyManager .Position property.
          > Then, you can delete an item of arraylist and update the CurrencyManager .
          >
          > There is a sample project(You should download the entire project from a
          > link in this article) in the post I last replied you. It provides you a
          > detailed implementation of operating the Arraylist databinding. This[/color]
          sample[color=blue]
          > project works well on my machine, and I think it will meet your need
          >
          > Best regards,
          > Jeffrey Tan
          > Microsoft Online Partner Support
          > Get Secure! - www.microsoft.com/security
          > This posting is provided "as is" with no warranties and confers no rights.
          >
          > --------------------
          > | From: "Alex Ting" <ating@learning fast.com>
          > | References: <OaUw5A3nDHA.39 2@TK2MSFTNGP11. phx.gbl>
          > <MhzPQQ3oDHA.26 24@cpmsftngxa06 .phx.gbl>
          > | Subject: Re: ArrayList.Remov eAt(i)
          > | Date: Thu, 6 Nov 2003 13:34:30 +1100
          > | Lines: 285
          > | X-Priority: 3
          > | X-MSMail-Priority: Normal
          > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
          > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
          > | Message-ID: <e81VU6ApDHA.96 4@TK2MSFTNGP10. phx.gbl>
          > | Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
          > | NNTP-Posting-Host: learningfast2.l earnfast.monash .edu.au 130.194.247.2
          > | Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP10.phx.g bl
          > | Xref: cpmsftngxa06.ph x.gbl[/color]
          microsoft.publi c.dotnet.langua ges.csharp:1970 66[color=blue]
          > | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
          > |
          > | Hi Jeff,
          > |
          > | Thanks for your reply.
          > |
          > | the getQuestions simply returns the arrayList
          > |
          > | public Learningfast.QG M.QuizList getQuestions()
          > |
          > | {
          > |
          > | return this.myQuestion s;
          > |
          > | }
          > |
          > | The mapping name is set to this but this is still not working. I even[/color]
          set[color=blue]
          > | the mapping name to "ArrayList" but to no avail.
          > |
          > | Thanks in advance.
          > |
          > | Alex Ting
          > |
          > |
          > | ""Jeffrey Tan[MSFT]"" <v-jetan@online.mi crosoft.com> wrote in message
          > | news:MhzPQQ3oDH A.2624@cpmsftng xa06.phx.gbl...
          > | >
          > | > Hi Alex,
          > | >
          > | > Sorry for letting you wait for so long time.
          > | > I think your code snipet is not integrated. There is nothing code
          > related
          > | > to getQuestions() method.
          > | > But I still can give you some suggestion.
          > | > For datagrid to bind to the arraylist, you should set the MappingName
          > | > property to "ArrayList" not others. This rule can be found in MSDN
          > | document
          > | > in DataGrid(WinFor m).
          > | > I think if you set the correct binding, the datagrid will reflect the
          > | > source arraylist correctly.
          > | >
          > | > For a sample of how to bind arraylist to datagrid, you can refer to:
          > | > http://www.syncfusion.com/FAQ/WinFor...c43c.asp#q818q
          > | >
          > | > If you still have anything unclear, please feel free to let me know.
          > | >
          > | > Best regards,
          > | > Jeffrey Tan
          > | > Microsoft Online Partner Support
          > | > Get Secure! - www.microsoft.com/security
          > | > This posting is provided "as is" with no warranties and confers no
          > rights.
          > | >
          > | > --------------------
          > | > | From: "Alex Ting" <ating@learning fast.com>
          > | > | Subject: ArrayList.Remov eAt(i)
          > | > | Date: Fri, 31 Oct 2003 16:30:57 +1100
          > | > | Lines: 201
          > | > | X-Priority: 3
          > | > | X-MSMail-Priority: Normal
          > | > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
          > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
          > | > | Message-ID: <OaUw5A3nDHA.39 2@TK2MSFTNGP11. phx.gbl>
          > | > | Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
          > | > | NNTP-Posting-Host: learningfast2.l earnfast.monash .edu.au[/color]
          130.194.247.2[color=blue]
          > | > | Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP11.phx.g bl
          > | > | Xref: cpmsftngxa06.ph x.gbl
          > | microsoft.publi c.dotnet.langua ges.csharp:1956 20
          > | > | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
          > | > |
          > | > | Hi Everybody,
          > | > |
          > | > | I have an issue about deleting an object from an arrayList.
          > | > |
          > | > | I've bounded a datagrid using this code
          > | > | where it will first run through all of the code in loadQuestions()[/color]
          and[color=blue]
          > | > bind
          > | > | a arrayList to the datagrid.
          > | > |
          > | > | private void BindQuestions()
          > | > |
          > | > | {
          > | > |
          > | > | dataGridQuestio ns.DataSource= this.AppQuiz.ge tQuestions();
          > | > |
          > | > | this.toolBarBtn Save.Enabled=tr ue;
          > | > |
          > | > | this.toolBarBtn Del.Enabled=tru e;
          > | > |
          > | > | }
          > | > |
          > | > |
          > | > |
          > | > | public void loadQuestions()
          > | > |
          > | > | {
          > | > |
          > | > | this.BindQuesti ons();//this.AppQuiz.ge tQuestions();//AppQuiz();
          > | > |
          > | > | if(this.DataGri dSet==false)
          > | > |
          > | > | {
          > | > |
          > | > | DataGridTableSt yle gs = new DataGridTableSt yle(); // gs =[/color]
          Grid[color=blue]
          > | > Style
          > | > |
          > | > |
          > | > | gs.MappingName = AppQuiz.getQues tions().GetType ().Name;
          > | > | //dummyDataArr.Ge tType().Name;
          > | > |
          > | > | gs.AllowSorting = true;
          > | > |
          > | > | gs.AlternatingB ackColor = System.Drawing. Color.AntiqueWh ite;
          > | > |
          > | > |
          > | > | DataGridTextBox Column cs2 = new DataGridTextBox Column();
          > | > |
          > | > | cs2.MappingName = "QuestionID ";
          > | > |
          > | > | cs2.HeaderText = "No.";
          > | > |
          > | > | cs2.Alignment = HorizontalAlign ment.Left;
          > | > |
          > | > | cs2.Width = 33;
          > | > |
          > | > | cs2.ReadOnly = true;
          > | > |
          > | > |
          > | > | gs.GridColumnSt yles.Add(cs2);
          > | > |
          > | > |
          > | > | DataGridBoolCol umn cs = new DataGridBoolCol umn(); // cs =
          > Column
          > | > | Style
          > | > |
          > | > | cs.MappingName = "Publish";
          > | > |
          > | > | cs.HeaderText = "Publish";
          > | > |
          > | > | cs.Width = 75;
          > | > |
          > | > | gs.GridColumnSt yles.Add(cs);
          > | > |
          > | > | cs = new DataGridBoolCol umn();
          > | > |
          > | > | cs.MappingName = "Required";
          > | > |
          > | > | cs.HeaderText = "Mandatory" ;
          > | > |
          > | > | cs.Width = 75;
          > | > |
          > | > | cs2.ReadOnly = true;
          > | > |
          > | > | gs.GridColumnSt yles.Add(cs);
          > | > |
          > | > | cs2 = new DataGridTextBox Column();
          > | > |
          > | > | cs2.MappingName = "QuestionTy pe";
          > | > |
          > | > | cs2.HeaderText = "Question Type";
          > | > |
          > | > | cs2.Alignment = HorizontalAlign ment.Center;
          > | > |
          > | > | cs2.Width = 80;
          > | > |
          > | > | cs2.ReadOnly = true;
          > | > |
          > | > | gs.GridColumnSt yles.Add(cs2);
          > | > |
          > | > | cs2 = new DataGridTextBox Column();
          > | > |
          > | > | cs2.MappingName = "Ask";
          > | > |
          > | > | cs2.HeaderText = "Question";
          > | > |
          > | > | cs2.Alignment = HorizontalAlign ment.Left;
          > | > |
          > | > | cs2.Width = 255;
          > | > |
          > | > | cs2.ReadOnly = true;
          > | > |
          > | > | gs.GridColumnSt yles.Add(cs2);
          > | > |
          > | > | dataGridQuestio ns.TableStyles. Add(gs);
          > | > |
          > | > |
          > | > | }
          > | > |
          > | > | panelDgQuestion s.Show();
          > | > |
          > | > | panelSplash.Hid e();
          > | > |
          > | > | }
          > | > |
          > | > |
          > | > |
          > | > | And then after that, they can delete a row from the datagrid. Then
          > this
          > | > | function is called
          > | > |
          > | > |
          > | > |
          > | > | /// <summary>
          > | > |
          > | > | /// this will remove the questions and then shuffle up all the
          > questions
          > | > | after it
          > | > |
          > | > | /// </summary>
          > | > |
          > | > | /// <param name="questionI D">question ID to remove</param>
          > | > |
          > | > | public void removeAndShuffl e(int questionID)
          > | > |
          > | > | {
          > | > |
          > | > | for(int i=0; i< this.myQuestion s.Count; i++)
          > | > |
          > | > | {
          > | > |
          > | > |
          > | if(((Learningfa st.QGM.Question )this.myQuestio ns[i]).QuestionID
          > | > | == questionID)
          > | > |
          > | > | {
          > | > |
          > | > | this.myQuestion s.RemoveAt(i);
          > | > |
          > | > | }
          > | > |
          > | > | }
          > | > |
          > | > | }
          > | > |
          > | > |
          > | > |
          > | > | In debug mode, for example if there were 2 rows, it is now 1 row and
          > | > | everything seems fine, but when i rebind the datagrid with the
          > arraylist
          > | > | after an object has been removed,
          > | > |
          > | > | private void BindQuestions()
          > | > |
          > | > | {
          > | > |
          > | > | dataGridQuestio ns.DataSource= this.AppQuiz.ge tQuestions();
          > | > |
          > | > | this.toolBarBtn Save.Enabled=tr ue;
          > | > |
          > | > | this.toolBarBtn Del.Enabled=tru e;
          > | > |
          > | > | }
          > | > |
          > | > | Mind you it does not run through the initializing statements of the
          > | > | datagrid, it just rebinds the datasource. And then at this point[/color]
          when[color=blue]
          > | the
          > | > | datagrid is meant to be displayed, it gives me an error index [index
          > | > number
          > | > | that was deleted] is out of bounds.
          > | > |
          > | > | Can someone please tell me whats happening? I've read up in several
          > | cases
          > | > | and usually this means that I'm trying to bring up the object that[/color]
          was[color=blue]
          > | > | deleted but I'm just changing the datasource to the amended[/color]
          arraylist.[color=blue]
          > | > Could
          > | > | this have to do with my existing datagrid where i'm not initializing
          > it
          > | > | again? because I've tried that and it also brings up an error saying
          > | that
          > | > | i'm using the same "mapping name"
          > | > |
          > | > | Thanks in advance.
          > | > |
          > | > | Kind Regards
          > | > |
          > | > | Alex Ting
          > | > |
          > | > |
          > | > | ---
          > | > | Outgoing mail is certified Virus Free.
          > | > | Checked by AVG anti-virus system (http://www.grisoft.com).
          > | > | Version: 6.0.532 / Virus Database: 326 - Release Date: 27/10/2003
          > | > |
          > | > |
          > | > |
          > | >
          > |
          > |
          > | ---
          > | Outgoing mail is certified Virus Free.
          > | Checked by AVG anti-virus system (http://www.grisoft.com).
          > | Version: 6.0.536 / Virus Database: 331 - Release Date: 3/11/2003
          > |
          > |
          > |
          >[/color]


          ---
          Outgoing mail is certified Virus Free.
          Checked by AVG anti-virus system (http://www.grisoft.com).
          Version: 6.0.536 / Virus Database: 331 - Release Date: 4/11/2003


          Comment

          • Jeffrey Tan[MSFT]

            #6
            Re: ArrayList.Remov eAt(i)


            Hi Alex,

            I am glad it works.
            If you still have any question, please feel free to let me know.

            Best regards,
            Jeffrey Tan
            Microsoft Online Partner Support
            Get Secure! - www.microsoft.com/security
            This posting is provided "as is" with no warranties and confers no rights.

            --------------------
            | From: "Alex Ting" <ating@learning fast.com>
            | References: <OaUw5A3nDHA.39 2@TK2MSFTNGP11. phx.gbl>
            <MhzPQQ3oDHA.26 24@cpmsftngxa06 .phx.gbl>
            <e81VU6ApDHA.96 4@TK2MSFTNGP10. phx.gbl>
            <Y8BBI8DpDHA.15 44@cpmsftngxa06 .phx.gbl>
            | Subject: Re: ArrayList.Remov eAt(i)
            | Date: Fri, 7 Nov 2003 09:50:17 +1100
            | Lines: 362
            | X-Priority: 3
            | X-MSMail-Priority: Normal
            | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
            | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
            | Message-ID: <eWAGshLpDHA.20 12@TK2MSFTNGP12 .phx.gbl>
            | Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
            | NNTP-Posting-Host: learningfast2.l earnfast.monash .edu.au 130.194.247.2
            | Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP12.phx.g bl
            | Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.csharp:1973 17
            | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
            |
            | Hi Jeffrey,
            |
            | Thanks for that!
            |
            | Such as simple solution...
            | just set the databindings to null and then bind it to the arraylist
            straight
            | after!
            | Kind Regards
            | Alex
            | ""Jeffrey Tan[MSFT]"" <v-jetan@online.mi crosoft.com> wrote in message
            | news:Y8BBI8DpDH A.1544@cpmsftng xa06.phx.gbl...
            | >
            | > Hi Alex,
            | >
            | > You should set DataGridTableSt yle's MappingName to "ArrayList" , then set
            | > DataGridColumnS tyle's MappingName to Arraylist's public property.
            | > When deleting the arraylist member, you should refer to the
            | > CurrencyManager (Manages the collection of BindingManagerB ase objects )
            | > which can get from BindingContext item.
            | > You should decrease CurrencyManager .Position property.
            | > Then, you can delete an item of arraylist and update the
            CurrencyManager .
            | >
            | > There is a sample project(You should download the entire project from a
            | > link in this article) in the post I last replied you. It provides you a
            | > detailed implementation of operating the Arraylist databinding. This
            | sample
            | > project works well on my machine, and I think it will meet your need
            | >
            | > Best regards,
            | > Jeffrey Tan
            | > Microsoft Online Partner Support
            | > Get Secure! - www.microsoft.com/security
            | > This posting is provided "as is" with no warranties and confers no
            rights.
            | >
            | > --------------------
            | > | From: "Alex Ting" <ating@learning fast.com>
            | > | References: <OaUw5A3nDHA.39 2@TK2MSFTNGP11. phx.gbl>
            | > <MhzPQQ3oDHA.26 24@cpmsftngxa06 .phx.gbl>
            | > | Subject: Re: ArrayList.Remov eAt(i)
            | > | Date: Thu, 6 Nov 2003 13:34:30 +1100
            | > | Lines: 285
            | > | X-Priority: 3
            | > | X-MSMail-Priority: Normal
            | > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
            | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
            | > | Message-ID: <e81VU6ApDHA.96 4@TK2MSFTNGP10. phx.gbl>
            | > | Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
            | > | NNTP-Posting-Host: learningfast2.l earnfast.monash .edu.au 130.194.247.2
            | > | Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP10.phx.g bl
            | > | Xref: cpmsftngxa06.ph x.gbl
            | microsoft.publi c.dotnet.langua ges.csharp:1970 66
            | > | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
            | > |
            | > | Hi Jeff,
            | > |
            | > | Thanks for your reply.
            | > |
            | > | the getQuestions simply returns the arrayList
            | > |
            | > | public Learningfast.QG M.QuizList getQuestions()
            | > |
            | > | {
            | > |
            | > | return this.myQuestion s;
            | > |
            | > | }
            | > |
            | > | The mapping name is set to this but this is still not working. I even
            | set
            | > | the mapping name to "ArrayList" but to no avail.
            | > |
            | > | Thanks in advance.
            | > |
            | > | Alex Ting
            | > |
            | > |
            | > | ""Jeffrey Tan[MSFT]"" <v-jetan@online.mi crosoft.com> wrote in message
            | > | news:MhzPQQ3oDH A.2624@cpmsftng xa06.phx.gbl...
            | > | >
            | > | > Hi Alex,
            | > | >
            | > | > Sorry for letting you wait for so long time.
            | > | > I think your code snipet is not integrated. There is nothing code
            | > related
            | > | > to getQuestions() method.
            | > | > But I still can give you some suggestion.
            | > | > For datagrid to bind to the arraylist, you should set the
            MappingName
            | > | > property to "ArrayList" not others. This rule can be found in MSDN
            | > | document
            | > | > in DataGrid(WinFor m).
            | > | > I think if you set the correct binding, the datagrid will reflect
            the
            | > | > source arraylist correctly.
            | > | >
            | > | > For a sample of how to bind arraylist to datagrid, you can refer to:
            | > | > http://www.syncfusion.com/FAQ/WinFor...c43c.asp#q818q
            | > | >
            | > | > If you still have anything unclear, please feel free to let me know.
            | > | >
            | > | > Best regards,
            | > | > Jeffrey Tan
            | > | > Microsoft Online Partner Support
            | > | > Get Secure! - www.microsoft.com/security
            | > | > This posting is provided "as is" with no warranties and confers no
            | > rights.
            | > | >
            | > | > --------------------
            | > | > | From: "Alex Ting" <ating@learning fast.com>
            | > | > | Subject: ArrayList.Remov eAt(i)
            | > | > | Date: Fri, 31 Oct 2003 16:30:57 +1100
            | > | > | Lines: 201
            | > | > | X-Priority: 3
            | > | > | X-MSMail-Priority: Normal
            | > | > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
            | > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
            | > | > | Message-ID: <OaUw5A3nDHA.39 2@TK2MSFTNGP11. phx.gbl>
            | > | > | Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
            | > | > | NNTP-Posting-Host: learningfast2.l earnfast.monash .edu.au
            | 130.194.247.2
            | > | > | Path:
            cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP11.phx.g bl
            | > | > | Xref: cpmsftngxa06.ph x.gbl
            | > | microsoft.publi c.dotnet.langua ges.csharp:1956 20
            | > | > | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
            | > | > |
            | > | > | Hi Everybody,
            | > | > |
            | > | > | I have an issue about deleting an object from an arrayList.
            | > | > |
            | > | > | I've bounded a datagrid using this code
            | > | > | where it will first run through all of the code in loadQuestions()
            | and
            | > | > bind
            | > | > | a arrayList to the datagrid.
            | > | > |
            | > | > | private void BindQuestions()
            | > | > |
            | > | > | {
            | > | > |
            | > | > | dataGridQuestio ns.DataSource= this.AppQuiz.ge tQuestions();
            | > | > |
            | > | > | this.toolBarBtn Save.Enabled=tr ue;
            | > | > |
            | > | > | this.toolBarBtn Del.Enabled=tru e;
            | > | > |
            | > | > | }
            | > | > |
            | > | > |
            | > | > |
            | > | > | public void loadQuestions()
            | > | > |
            | > | > | {
            | > | > |
            | > | > |
            this.BindQuesti ons();//this.AppQuiz.ge tQuestions();//AppQuiz();
            | > | > |
            | > | > | if(this.DataGri dSet==false)
            | > | > |
            | > | > | {
            | > | > |
            | > | > | DataGridTableSt yle gs = new DataGridTableSt yle(); // gs =
            | Grid
            | > | > Style
            | > | > |
            | > | > |
            | > | > | gs.MappingName = AppQuiz.getQues tions().GetType ().Name;
            | > | > | //dummyDataArr.Ge tType().Name;
            | > | > |
            | > | > | gs.AllowSorting = true;
            | > | > |
            | > | > | gs.AlternatingB ackColor =
            System.Drawing. Color.AntiqueWh ite;
            | > | > |
            | > | > |
            | > | > | DataGridTextBox Column cs2 = new DataGridTextBox Column();
            | > | > |
            | > | > | cs2.MappingName = "QuestionID ";
            | > | > |
            | > | > | cs2.HeaderText = "No.";
            | > | > |
            | > | > | cs2.Alignment = HorizontalAlign ment.Left;
            | > | > |
            | > | > | cs2.Width = 33;
            | > | > |
            | > | > | cs2.ReadOnly = true;
            | > | > |
            | > | > |
            | > | > | gs.GridColumnSt yles.Add(cs2);
            | > | > |
            | > | > |
            | > | > | DataGridBoolCol umn cs = new DataGridBoolCol umn(); // cs =
            | > Column
            | > | > | Style
            | > | > |
            | > | > | cs.MappingName = "Publish";
            | > | > |
            | > | > | cs.HeaderText = "Publish";
            | > | > |
            | > | > | cs.Width = 75;
            | > | > |
            | > | > | gs.GridColumnSt yles.Add(cs);
            | > | > |
            | > | > | cs = new DataGridBoolCol umn();
            | > | > |
            | > | > | cs.MappingName = "Required";
            | > | > |
            | > | > | cs.HeaderText = "Mandatory" ;
            | > | > |
            | > | > | cs.Width = 75;
            | > | > |
            | > | > | cs2.ReadOnly = true;
            | > | > |
            | > | > | gs.GridColumnSt yles.Add(cs);
            | > | > |
            | > | > | cs2 = new DataGridTextBox Column();
            | > | > |
            | > | > | cs2.MappingName = "QuestionTy pe";
            | > | > |
            | > | > | cs2.HeaderText = "Question Type";
            | > | > |
            | > | > | cs2.Alignment = HorizontalAlign ment.Center;
            | > | > |
            | > | > | cs2.Width = 80;
            | > | > |
            | > | > | cs2.ReadOnly = true;
            | > | > |
            | > | > | gs.GridColumnSt yles.Add(cs2);
            | > | > |
            | > | > | cs2 = new DataGridTextBox Column();
            | > | > |
            | > | > | cs2.MappingName = "Ask";
            | > | > |
            | > | > | cs2.HeaderText = "Question";
            | > | > |
            | > | > | cs2.Alignment = HorizontalAlign ment.Left;
            | > | > |
            | > | > | cs2.Width = 255;
            | > | > |
            | > | > | cs2.ReadOnly = true;
            | > | > |
            | > | > | gs.GridColumnSt yles.Add(cs2);
            | > | > |
            | > | > | dataGridQuestio ns.TableStyles. Add(gs);
            | > | > |
            | > | > |
            | > | > | }
            | > | > |
            | > | > | panelDgQuestion s.Show();
            | > | > |
            | > | > | panelSplash.Hid e();
            | > | > |
            | > | > | }
            | > | > |
            | > | > |
            | > | > |
            | > | > | And then after that, they can delete a row from the datagrid. Then
            | > this
            | > | > | function is called
            | > | > |
            | > | > |
            | > | > |
            | > | > | /// <summary>
            | > | > |
            | > | > | /// this will remove the questions and then shuffle up all the
            | > questions
            | > | > | after it
            | > | > |
            | > | > | /// </summary>
            | > | > |
            | > | > | /// <param name="questionI D">question ID to remove</param>
            | > | > |
            | > | > | public void removeAndShuffl e(int questionID)
            | > | > |
            | > | > | {
            | > | > |
            | > | > | for(int i=0; i< this.myQuestion s.Count; i++)
            | > | > |
            | > | > | {
            | > | > |
            | > | > |
            | > | if(((Learningfa st.QGM.Question )this.myQuestio ns[i]).QuestionID
            | > | > | == questionID)
            | > | > |
            | > | > | {
            | > | > |
            | > | > | this.myQuestion s.RemoveAt(i);
            | > | > |
            | > | > | }
            | > | > |
            | > | > | }
            | > | > |
            | > | > | }
            | > | > |
            | > | > |
            | > | > |
            | > | > | In debug mode, for example if there were 2 rows, it is now 1 row
            and
            | > | > | everything seems fine, but when i rebind the datagrid with the
            | > arraylist
            | > | > | after an object has been removed,
            | > | > |
            | > | > | private void BindQuestions()
            | > | > |
            | > | > | {
            | > | > |
            | > | > | dataGridQuestio ns.DataSource= this.AppQuiz.ge tQuestions();
            | > | > |
            | > | > | this.toolBarBtn Save.Enabled=tr ue;
            | > | > |
            | > | > | this.toolBarBtn Del.Enabled=tru e;
            | > | > |
            | > | > | }
            | > | > |
            | > | > | Mind you it does not run through the initializing statements of
            the
            | > | > | datagrid, it just rebinds the datasource. And then at this point
            | when
            | > | the
            | > | > | datagrid is meant to be displayed, it gives me an error index
            [index
            | > | > number
            | > | > | that was deleted] is out of bounds.
            | > | > |
            | > | > | Can someone please tell me whats happening? I've read up in
            several
            | > | cases
            | > | > | and usually this means that I'm trying to bring up the object that
            | was
            | > | > | deleted but I'm just changing the datasource to the amended
            | arraylist.
            | > | > Could
            | > | > | this have to do with my existing datagrid where i'm not
            initializing
            | > it
            | > | > | again? because I've tried that and it also brings up an error
            saying
            | > | that
            | > | > | i'm using the same "mapping name"
            | > | > |
            | > | > | Thanks in advance.
            | > | > |
            | > | > | Kind Regards
            | > | > |
            | > | > | Alex Ting
            | > | > |
            | > | > |
            | > | > | ---
            | > | > | Outgoing mail is certified Virus Free.
            | > | > | Checked by AVG anti-virus system (http://www.grisoft.com).
            | > | > | Version: 6.0.532 / Virus Database: 326 - Release Date: 27/10/2003
            | > | > |
            | > | > |
            | > | > |
            | > | >
            | > |
            | > |
            | > | ---
            | > | Outgoing mail is certified Virus Free.
            | > | Checked by AVG anti-virus system (http://www.grisoft.com).
            | > | Version: 6.0.536 / Virus Database: 331 - Release Date: 3/11/2003
            | > |
            | > |
            | > |
            | >
            |
            |
            | ---
            | Outgoing mail is certified Virus Free.
            | Checked by AVG anti-virus system (http://www.grisoft.com).
            | Version: 6.0.536 / Virus Database: 331 - Release Date: 4/11/2003
            |
            |
            |

            Comment

            • Alex Ting

              #7
              Re: ArrayList.Remov eAt(i)

              Hi Jeff,

              I've done the same things for another array list like resetting the
              datasource but this time i still get the same error "index out of range"
              And like before, the arraylist that is being binded is deleting correctly
              from 4 items down to 3 etc. Do you have any ideas?

              Thanks in advance

              Alex Ting

              ""Jeffrey Tan[MSFT]"" <v-jetan@online.mi crosoft.com> wrote in message
              news:Y8BBI8DpDH A.1544@cpmsftng xa06.phx.gbl...[color=blue]
              >
              > Hi Alex,
              >
              > You should set DataGridTableSt yle's MappingName to "ArrayList" , then set
              > DataGridColumnS tyle's MappingName to Arraylist's public property.
              > When deleting the arraylist member, you should refer to the
              > CurrencyManager (Manages the collection of BindingManagerB ase objects )
              > which can get from BindingContext item.
              > You should decrease CurrencyManager .Position property.
              > Then, you can delete an item of arraylist and update the CurrencyManager .
              >
              > There is a sample project(You should download the entire project from a
              > link in this article) in the post I last replied you. It provides you a
              > detailed implementation of operating the Arraylist databinding. This[/color]
              sample[color=blue]
              > project works well on my machine, and I think it will meet your need
              >
              > Best regards,
              > Jeffrey Tan
              > Microsoft Online Partner Support
              > Get Secure! - www.microsoft.com/security
              > This posting is provided "as is" with no warranties and confers no rights.
              >
              > --------------------
              > | From: "Alex Ting" <ating@learning fast.com>
              > | References: <OaUw5A3nDHA.39 2@TK2MSFTNGP11. phx.gbl>
              > <MhzPQQ3oDHA.26 24@cpmsftngxa06 .phx.gbl>
              > | Subject: Re: ArrayList.Remov eAt(i)
              > | Date: Thu, 6 Nov 2003 13:34:30 +1100
              > | Lines: 285
              > | X-Priority: 3
              > | X-MSMail-Priority: Normal
              > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
              > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
              > | Message-ID: <e81VU6ApDHA.96 4@TK2MSFTNGP10. phx.gbl>
              > | Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
              > | NNTP-Posting-Host: learningfast2.l earnfast.monash .edu.au 130.194.247.2
              > | Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP10.phx.g bl
              > | Xref: cpmsftngxa06.ph x.gbl[/color]
              microsoft.publi c.dotnet.langua ges.csharp:1970 66[color=blue]
              > | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
              > |
              > | Hi Jeff,
              > |
              > | Thanks for your reply.
              > |
              > | the getQuestions simply returns the arrayList
              > |
              > | public Learningfast.QG M.QuizList getQuestions()
              > |
              > | {
              > |
              > | return this.myQuestion s;
              > |
              > | }
              > |
              > | The mapping name is set to this but this is still not working. I even[/color]
              set[color=blue]
              > | the mapping name to "ArrayList" but to no avail.
              > |
              > | Thanks in advance.
              > |
              > | Alex Ting
              > |
              > |
              > | ""Jeffrey Tan[MSFT]"" <v-jetan@online.mi crosoft.com> wrote in message
              > | news:MhzPQQ3oDH A.2624@cpmsftng xa06.phx.gbl...
              > | >
              > | > Hi Alex,
              > | >
              > | > Sorry for letting you wait for so long time.
              > | > I think your code snipet is not integrated. There is nothing code
              > related
              > | > to getQuestions() method.
              > | > But I still can give you some suggestion.
              > | > For datagrid to bind to the arraylist, you should set the MappingName
              > | > property to "ArrayList" not others. This rule can be found in MSDN
              > | document
              > | > in DataGrid(WinFor m).
              > | > I think if you set the correct binding, the datagrid will reflect the
              > | > source arraylist correctly.
              > | >
              > | > For a sample of how to bind arraylist to datagrid, you can refer to:
              > | > http://www.syncfusion.com/FAQ/WinFor...c43c.asp#q818q
              > | >
              > | > If you still have anything unclear, please feel free to let me know.
              > | >
              > | > Best regards,
              > | > Jeffrey Tan
              > | > Microsoft Online Partner Support
              > | > Get Secure! - www.microsoft.com/security
              > | > This posting is provided "as is" with no warranties and confers no
              > rights.
              > | >
              > | > --------------------
              > | > | From: "Alex Ting" <ating@learning fast.com>
              > | > | Subject: ArrayList.Remov eAt(i)
              > | > | Date: Fri, 31 Oct 2003 16:30:57 +1100
              > | > | Lines: 201
              > | > | X-Priority: 3
              > | > | X-MSMail-Priority: Normal
              > | > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
              > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
              > | > | Message-ID: <OaUw5A3nDHA.39 2@TK2MSFTNGP11. phx.gbl>
              > | > | Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
              > | > | NNTP-Posting-Host: learningfast2.l earnfast.monash .edu.au[/color]
              130.194.247.2[color=blue]
              > | > | Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP11.phx.g bl
              > | > | Xref: cpmsftngxa06.ph x.gbl
              > | microsoft.publi c.dotnet.langua ges.csharp:1956 20
              > | > | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
              > | > |
              > | > | Hi Everybody,
              > | > |
              > | > | I have an issue about deleting an object from an arrayList.
              > | > |
              > | > | I've bounded a datagrid using this code
              > | > | where it will first run through all of the code in loadQuestions()[/color]
              and[color=blue]
              > | > bind
              > | > | a arrayList to the datagrid.
              > | > |
              > | > | private void BindQuestions()
              > | > |
              > | > | {
              > | > |
              > | > | dataGridQuestio ns.DataSource= this.AppQuiz.ge tQuestions();
              > | > |
              > | > | this.toolBarBtn Save.Enabled=tr ue;
              > | > |
              > | > | this.toolBarBtn Del.Enabled=tru e;
              > | > |
              > | > | }
              > | > |
              > | > |
              > | > |
              > | > | public void loadQuestions()
              > | > |
              > | > | {
              > | > |
              > | > | this.BindQuesti ons();//this.AppQuiz.ge tQuestions();//AppQuiz();
              > | > |
              > | > | if(this.DataGri dSet==false)
              > | > |
              > | > | {
              > | > |
              > | > | DataGridTableSt yle gs = new DataGridTableSt yle(); // gs =[/color]
              Grid[color=blue]
              > | > Style
              > | > |
              > | > |
              > | > | gs.MappingName = AppQuiz.getQues tions().GetType ().Name;
              > | > | //dummyDataArr.Ge tType().Name;
              > | > |
              > | > | gs.AllowSorting = true;
              > | > |
              > | > | gs.AlternatingB ackColor = System.Drawing. Color.AntiqueWh ite;
              > | > |
              > | > |
              > | > | DataGridTextBox Column cs2 = new DataGridTextBox Column();
              > | > |
              > | > | cs2.MappingName = "QuestionID ";
              > | > |
              > | > | cs2.HeaderText = "No.";
              > | > |
              > | > | cs2.Alignment = HorizontalAlign ment.Left;
              > | > |
              > | > | cs2.Width = 33;
              > | > |
              > | > | cs2.ReadOnly = true;
              > | > |
              > | > |
              > | > | gs.GridColumnSt yles.Add(cs2);
              > | > |
              > | > |
              > | > | DataGridBoolCol umn cs = new DataGridBoolCol umn(); // cs =
              > Column
              > | > | Style
              > | > |
              > | > | cs.MappingName = "Publish";
              > | > |
              > | > | cs.HeaderText = "Publish";
              > | > |
              > | > | cs.Width = 75;
              > | > |
              > | > | gs.GridColumnSt yles.Add(cs);
              > | > |
              > | > | cs = new DataGridBoolCol umn();
              > | > |
              > | > | cs.MappingName = "Required";
              > | > |
              > | > | cs.HeaderText = "Mandatory" ;
              > | > |
              > | > | cs.Width = 75;
              > | > |
              > | > | cs2.ReadOnly = true;
              > | > |
              > | > | gs.GridColumnSt yles.Add(cs);
              > | > |
              > | > | cs2 = new DataGridTextBox Column();
              > | > |
              > | > | cs2.MappingName = "QuestionTy pe";
              > | > |
              > | > | cs2.HeaderText = "Question Type";
              > | > |
              > | > | cs2.Alignment = HorizontalAlign ment.Center;
              > | > |
              > | > | cs2.Width = 80;
              > | > |
              > | > | cs2.ReadOnly = true;
              > | > |
              > | > | gs.GridColumnSt yles.Add(cs2);
              > | > |
              > | > | cs2 = new DataGridTextBox Column();
              > | > |
              > | > | cs2.MappingName = "Ask";
              > | > |
              > | > | cs2.HeaderText = "Question";
              > | > |
              > | > | cs2.Alignment = HorizontalAlign ment.Left;
              > | > |
              > | > | cs2.Width = 255;
              > | > |
              > | > | cs2.ReadOnly = true;
              > | > |
              > | > | gs.GridColumnSt yles.Add(cs2);
              > | > |
              > | > | dataGridQuestio ns.TableStyles. Add(gs);
              > | > |
              > | > |
              > | > | }
              > | > |
              > | > | panelDgQuestion s.Show();
              > | > |
              > | > | panelSplash.Hid e();
              > | > |
              > | > | }
              > | > |
              > | > |
              > | > |
              > | > | And then after that, they can delete a row from the datagrid. Then
              > this
              > | > | function is called
              > | > |
              > | > |
              > | > |
              > | > | /// <summary>
              > | > |
              > | > | /// this will remove the questions and then shuffle up all the
              > questions
              > | > | after it
              > | > |
              > | > | /// </summary>
              > | > |
              > | > | /// <param name="questionI D">question ID to remove</param>
              > | > |
              > | > | public void removeAndShuffl e(int questionID)
              > | > |
              > | > | {
              > | > |
              > | > | for(int i=0; i< this.myQuestion s.Count; i++)
              > | > |
              > | > | {
              > | > |
              > | > |
              > | if(((Learningfa st.QGM.Question )this.myQuestio ns[i]).QuestionID
              > | > | == questionID)
              > | > |
              > | > | {
              > | > |
              > | > | this.myQuestion s.RemoveAt(i);
              > | > |
              > | > | }
              > | > |
              > | > | }
              > | > |
              > | > | }
              > | > |
              > | > |
              > | > |
              > | > | In debug mode, for example if there were 2 rows, it is now 1 row and
              > | > | everything seems fine, but when i rebind the datagrid with the
              > arraylist
              > | > | after an object has been removed,
              > | > |
              > | > | private void BindQuestions()
              > | > |
              > | > | {
              > | > |
              > | > | dataGridQuestio ns.DataSource= this.AppQuiz.ge tQuestions();
              > | > |
              > | > | this.toolBarBtn Save.Enabled=tr ue;
              > | > |
              > | > | this.toolBarBtn Del.Enabled=tru e;
              > | > |
              > | > | }
              > | > |
              > | > | Mind you it does not run through the initializing statements of the
              > | > | datagrid, it just rebinds the datasource. And then at this point[/color]
              when[color=blue]
              > | the
              > | > | datagrid is meant to be displayed, it gives me an error index [index
              > | > number
              > | > | that was deleted] is out of bounds.
              > | > |
              > | > | Can someone please tell me whats happening? I've read up in several
              > | cases
              > | > | and usually this means that I'm trying to bring up the object that[/color]
              was[color=blue]
              > | > | deleted but I'm just changing the datasource to the amended[/color]
              arraylist.[color=blue]
              > | > Could
              > | > | this have to do with my existing datagrid where i'm not initializing
              > it
              > | > | again? because I've tried that and it also brings up an error saying
              > | that
              > | > | i'm using the same "mapping name"
              > | > |
              > | > | Thanks in advance.
              > | > |
              > | > | Kind Regards
              > | > |
              > | > | Alex Ting
              > | > |
              > | > |
              > | > | ---
              > | > | Outgoing mail is certified Virus Free.
              > | > | Checked by AVG anti-virus system (http://www.grisoft.com).
              > | > | Version: 6.0.532 / Virus Database: 326 - Release Date: 27/10/2003
              > | > |
              > | > |
              > | > |
              > | >
              > |
              > |
              > | ---
              > | Outgoing mail is certified Virus Free.
              > | Checked by AVG anti-virus system (http://www.grisoft.com).
              > | Version: 6.0.536 / Virus Database: 331 - Release Date: 3/11/2003
              > |
              > |
              > |
              >[/color]


              ---
              Outgoing mail is certified Virus Free.
              Checked by AVG anti-virus system (http://www.grisoft.com).
              Version: 6.0.542 / Virus Database: 336 - Release Date: 18/11/2003


              Comment

              • Jeffrey Tan[MSFT]

                #8
                Re: ArrayList.Remov eAt(i)


                Hi Alex,

                I have viewed your follow up problem, and I also found that you have posted
                a new post for this issue.
                I have replied you in that post. Please follow up there, I will work with
                you.

                Best regards,
                Jeffrey Tan
                Microsoft Online Partner Support
                Get Secure! - www.microsoft.com/security
                This posting is provided "as is" with no warranties and confers no rights.

                Comment

                Working...