This is a migrated thread and some comments may be shown as answers.

Custom GridViewRow (NOT Custom Cells!)

1 Answer 34 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Curtis
Top achievements
Rank 1
Iron
Iron
Veteran
Curtis asked on 11 Jul 2017, 02:32 PM

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

 

 

 

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 12 Jul 2017, 08:50 AM
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.
Tags
GridView
Asked by
Curtis
Top achievements
Rank 1
Iron
Iron
Veteran
Answers by
Dimitar
Telerik team
Share this question
or