locked
Agregar un registro de un datagridview a otro datagridview de otro formulario RRS feed

  • Question

  • Hola:

    Tengo un form llamado Estacion1 en el cual le coloque dos etiquetas label que funcionan como un contador, a su vez el resultado lo muestro en un datagridview.

    Lo que quiero hacer es pasar el resultado del dgv a otro datagridview de otro form llamado Estacion2 a modo que el dgv tenga los dos registros de ambas estaciones. Que quede masomenos asi mi datagridview en la Estacion 2

    No. Estacion  Total

    Estacion1        56         "esta info la toma del contador del form Estacion1

    Estacion 2       10         "y esta del form Estacion 2

    Lo intente con este codigo

    DataGridViewSumaT1.Rows(0).Cells(0).Value = LblEstacion1.Text

    DataGridViewSumaT1.Rows(0).Cells(1).Value = LblTotalE1.Text

    DataGridViewSumaT1.Rows(1).Cells(0).Value = frmEstacion2.LblEstacion2.Text

    DataGridViewSumaT1.Rows(1).Cells(1).Value = frmEstacion2.LblTotalE2.Text

    pero me marca este error "Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index"

    En que estoy fallando??

    Thursday, January 9, 2014 8:36 PM

Answers

  • Hi,

    Because this is an English forum, please post questions in another forum which uses your native language for better response.

    Thank you for your understanding.

    Best regards,
    Franklin


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by ZigZag3143x Monday, January 13, 2014 9:51 PM
    Friday, January 10, 2014 5:39 AM
  • Please select your language from the drop down list at the top of the page to post your question in the language of your choice.

    The forum you posted in is for English only.

    If you do not find the desired language, support options for additional international locations can be found by following the link below:
    *
    Seleccione su idioma de la lista desplegable en la parte superior de la página para enviar su pregunta en el idioma de su elección. El foro que posteaste es sólo para Inglés. Si no encuentra el idioma que desee, opciones de soporte para las ubicaciones internacionales adicionales se pueden encontrar siguiendo el siguiente enlace:

    *

    http://support.microsoft.com/common/international.aspx


    Advice offered in good faith. It is your decision to implement same. Wanikiya and Dyami - Team ZigZag

    • Marked as answer by ZigZag3143x Monday, January 13, 2014 9:51 PM
    Friday, January 10, 2014 5:56 AM
  • Hello,

    The Spanish development forums are on http://social.msdn.microsoft.com/Forums/es-ES/home?category=generaldeves&filter=alltypes&sort=lastpostdesc


    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book: Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C40686F746D61696C2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})

    • Marked as answer by ZigZag3143x Monday, January 13, 2014 9:51 PM
    Friday, January 10, 2014 3:50 PM

All replies

  • Hi,

    Because this is an English forum, please post questions in another forum which uses your native language for better response.

    Thank you for your understanding.

    Best regards,
    Franklin


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by ZigZag3143x Monday, January 13, 2014 9:51 PM
    Friday, January 10, 2014 5:39 AM
  • Please select your language from the drop down list at the top of the page to post your question in the language of your choice.

    The forum you posted in is for English only.

    If you do not find the desired language, support options for additional international locations can be found by following the link below:
    *
    Seleccione su idioma de la lista desplegable en la parte superior de la página para enviar su pregunta en el idioma de su elección. El foro que posteaste es sólo para Inglés. Si no encuentra el idioma que desee, opciones de soporte para las ubicaciones internacionales adicionales se pueden encontrar siguiendo el siguiente enlace:

    *

    http://support.microsoft.com/common/international.aspx


    Advice offered in good faith. It is your decision to implement same. Wanikiya and Dyami - Team ZigZag

    • Marked as answer by ZigZag3143x Monday, January 13, 2014 9:51 PM
    Friday, January 10, 2014 5:56 AM
  • Hello,

    The Spanish development forums are on http://social.msdn.microsoft.com/Forums/es-ES/home?category=generaldeves&filter=alltypes&sort=lastpostdesc


    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book: Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C40686F746D61696C2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})

    • Marked as answer by ZigZag3143x Monday, January 13, 2014 9:51 PM
    Friday, January 10, 2014 3:50 PM