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

GridView herits

7 Answers 48 Views
GridView
This is a migrated thread and some comments may be shown as answers.
QuizzBox
Top achievements
Rank 1
QuizzBox asked on 31 Jan 2011, 05:18 PM
Hey,
i want to create my own GridView control which herits yours.
I've created a new vb component project inherits the Telerik gridview with no code.
On my main project, on the form i've added the inherits control and in the form load event, i've defined the datasource and the data member properties.
I've no pb with the data, i see the 60 lines and all the columns, but with one problem....The data are not visible like a blank forecolor, but when i enter in a cell (in edit mode) i see now the data with black font.
Any idea ?

7 Answers, 1 is accepted

Sort by
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 01 Feb 2011, 10:34 PM
Hello Nermond,

I'm not quite sure what you mean, but from the sounds of it, it may be that you have missed adding the ThemeClassName to the inherited RadGridView?
Please take a look at this KB article which describes inheriting Rad Controls.

Hope that helps
Richard
0
QuizzBox
Top achievements
Rank 1
answered on 02 Feb 2011, 02:09 PM
hum, nope, it's not a theme problem.

On the screenshot, you see the inherited gridview on the left and right the normal gridview.

GridView screenshot
0
Richard Slade
Top achievements
Rank 2
answered on 02 Feb 2011, 02:13 PM
Hello,

I've not seen this issue before with an inherited RadGridView.  Please could you provide a sample class (inherited radGridView) that replicates the issue and I'll do my best to help.

thanks
Richard
0
QuizzBox
Top achievements
Rank 1
answered on 02 Feb 2011, 02:20 PM
ok

i link you the component project

Project
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 02 Feb 2011, 03:06 PM
Hello,

I have tried your project and yes, I experienced the same issue. However, in your project, I created a new class, and copied in the following code;

Imports System.ComponentModel
Imports Telerik.WinControls.UI
Public Class Class1
    Inherits RadGridView
  
    Public Overrides Property ThemeClassName As String
        Get
            Return GetType(RadGridView).FullName
        End Get
        Set(ByVal value As String)
  
        End Set
    End Property
  
End Class

and it worked fine. Therefore, I'd suggest just replacing the current grid with a new one. Just create a new class and copy in the above code, it should be fine.
Let me know if that helps
Richard
0
QuizzBox
Top achievements
Rank 1
answered on 02 Feb 2011, 03:51 PM
I created my basic component from a VisualStudio's component class. I modified the code to inherit RadGridWiew. It didn't work.
I tried again with a radForm.  I modified the code to inherit RadGridWiew and there, my component is ok. 
thanks for your help

0
Richard Slade
Top achievements
Rank 2
answered on 02 Feb 2011, 03:53 PM
Glad I could be of help
Regards,
Richard
Tags
GridView
Asked by
QuizzBox
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
QuizzBox
Top achievements
Rank 1
Share this question
or