Issue when adding a row to a datatable bound to a RadGridView set with self referencing hierarchy

2 posts, 1 answers
  1. Gary H
    Gary H avatar
    1 posts
    Member since:
    Oct 2009

    Posted 25 Jan 2012 Link to this post

    Hi there,
        I have a datatable that I am using as the source of my datagrid. The datagrid is a self referencing hierarchy. When I add a row to the datatable, it does not appear in the grid. If I add a second row, or click around in the grid it appears. It is as though the grid is not being repainted. I need to mention that this grid allows for drag and drop from another grid.

    Code under my add button:

    nCount += 1

     


    Dim
    dr As DataRow

     

    dr = dtTable2.NewRow

    dr("Item Number") = nCount
    dr(
    "ParentItem") = 0

    dr("Item Desc") = ""

    dr("Quantity") = 0

    dr("UOM") = ""

    dr("Vendor") = ""

     

    dtTable2.Rows.Add(dr)

     

    dgBOM.DataSource = dtTable2

     

     

     

  2. Answer
    Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 30 Jan 2012 Link to this post

    Hi Gary,

    You can use the Refresh method of GridViewTemplate to refresh the data in your self-reference scenario.

    radGridView1.MasterTemplate.Refresh()

    If you continue to experience the issue, please send us a simple project with some part of your data to investigate the issue locally. Thank you for your cooperation.

    Please note that you have to open a new support ticket in order to be able to attach your files.

    Greetings,
    Julian Benkov
    the Telerik team

    SP1 of Q3’11 of RadControls for WinForms is available for download (see what's new).

Back to Top