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

RadgirdView

1 Answer 129 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 25 Jun 2007, 07:36 PM
Hi,

Columncount and Rowcount are not members of radgridview.  If I want to add rows and colums manually, how can I do that? 

Thanks

1 Answer, 1 is accepted

Sort by
0
Mike
Telerik team
answered on 26 Jun 2007, 02:41 PM
Hi Michael,

this feature is not fully supported in our current release. In next Q2 release will be added unbound/virtual mode and ColumnCount/RowCount properties.

For now we can offer you the following workaround:

Public Class DemoSheet 
    Public Sub New(ByVal a As String, ByVal b As String, ByVal c As String) 
        Me.A = a 
        Me.B = b 
        Me.C = c 
    End Sub 
 
    Private m_a As String 
    Public Property A() As String 
        Get 
            Return Me.m_a 
        End Get 
        Set 
            Me.m_a = value 
        End Set 
    End Property 
 
    Private m_b As String 
    Public Property B() As String 
        Get 
            Return Me.m_b 
        End Get 
        Set 
            Me.m_b = value 
        End Set 
    End Property 
 
    Private m_c As String 
    Public Property C() As String 
        Get 
            Return Me.m_c 
        End Get 
        Set 
            Me.m_c = value 
        End Set 
    End Property 
 
End Class 


Dim sheet As New BindingList(Of DemoSheet)() 
For i As Integer = 0 To 3 
 
    sheet.Add(New DemoSheet("", "", "")) 
Next 
 
radGridView1.DataSource = sheet 

Hello Sieu, this feature is not fully supported in our current release. In next Q2 release will be added unbound/virtual mode and ColumnCount/RowCount properties.

For now we can offer you the following workaround:

Public Class DemoSheet 
    Public Sub New(ByVal a As String, ByVal b As String, ByVal c As String) 
        Me.A = a 
        Me.B = b 
        Me.C = c 
    End Sub 
 
    Private m_a As String 
    Public Property A() As String 
        Get 
            Return Me.m_a 
        End Get 
        Set 
            Me.m_a = value 
        End Set 
    End Property 
 
    Private m_b As String 
    Public Property B() As String 
        Get 
            Return Me.m_b 
        End Get 
        Set 
            Me.m_b = value 
        End Set 
    End Property 
 
    Private m_c As String 
    Public Property C() As String 
        Get 
            Return Me.m_c 
        End Get 
        Set 
            Me.m_c = value 
        End Set 
    End Property 
 
End Class 


Dim sheet As New BindingList(Of DemoSheet)() 
For i As Integer = 0 To 3 
 
    sheet.Add(New DemoSheet("", "", "")) 
Next 
 
radGridView1.DataSource = sheet 

Let us know if this solution suites you for now.

Greetings,
Mike
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
GridView
Asked by
Michael
Top achievements
Rank 1
Answers by
Mike
Telerik team
Share this question
or