Custom GridViewRow (NOT Custom Cells!)

2 posts, 0 answers
  1. Curtis
    Curtis avatar
    64 posts
    Member since:
    Oct 2014

    Posted 11 Jul 2017 Link to this post

    Hello all!

    I'm trying to create a custom GridViewRow so I can build in several of my own properties that will make my maintenance screens far easier to manage...so I went about doing this (in vb.net)

     

    Friend Class DPSRow
       Inherits GridViewRowInfo

       Private _AttachmentType As AttachmentType

       Public Property AttachmentType() As AttachmentType
           Get
              Return _AttachmentType
           End Get
           Set(ByVal value As AttachmentType)
              _AttachmentType = value
           End Set

       End Property

       Public Sub New(viewInfo As GridViewInfo, ByVal pAttachmentType As AttachmentType)
           MyBase.New(viewInfo)
           _AttachmentType = pAttachmentType
        End Sub
    End Class

     

    My problem is the GridViewInfo.  I'm pretty sure this object is part of the Grid hierarchy but for the life of me I can't figure out where it would be.  Here's a sample of what I mean when trying to use the above - please note, my GridViewInfo reference is total garbage - I'm just putting it in here to illustrate my question:

     

    Sub something()

       Dim myAttachmentType as New AttachmentType(_ProjectID)

       Dim myRow as New DPSRow(ATGrid.Something.Something.LastThing, myAttachmentType)

       ATGrid.Rows.Add(myRow)

    End Sub

    In this code snippet, the object "LastThing" would be a GridViewInfo object which is required by the constructor of a GridViewRowInfo

    Can anyone point me to where I can find this object among the pyramid that is my GridView control?

    Any assistance would be very much appreciated!

     

    Kindest regards,

    CMS

     

     

     

  2. Dimitar
    Admin
    Dimitar avatar
    2831 posts

    Posted 12 Jul 2017 Link to this post

    Hi Curtis,

    You need to pass the following property:
    radGridView1.MasterTemplate.MasterViewInfo

    I hope this will be useful. Let me know if you have additional questions.

    Regards,
    Dimitar
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top