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

Pinned Rows not showing!

3 Answers 94 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Zeev
Top achievements
Rank 1
Zeev asked on 02 Nov 2014, 09:33 AM
radGridView1.Rows[number].PinPosition = PinnedRowPosition.Top;

When i run that line the row disappears, 
I have Alot of properties off on this grid and i'm not sure which of them is the cause of this.
Need your help, what can remove/hide the row?

3 Answers, 1 is accepted

Sort by
0
Zeev
Top achievements
Rank 1
answered on 02 Nov 2014, 11:39 AM
More info:
C#
What i'm trying to do is get a Row of my choosing(via CODE not UI) and move it to the top of the list.
I fail to find an easy way for this, and nothing in the forums other than Drag&Drop which i don't need!
0
Pascal
Top achievements
Rank 1
Iron
answered on 10 May 2023, 08:24 AM | edited on 10 May 2023, 08:36 AM

I have the same problem right now. This are the properties I set while inilializing the GridView:

    Private Function CreateInterfaceMatrixGridView() As RadGridView
        Dim newGrid As New RadGridView With {
            .AllowRowResize = False,
            .AllowAddNewRow = False,
            .EnableGrouping = False,
            .AllowDeleteRow = False,
            .SelectionMode = GridViewSelectionMode.CellSelect,
            .AllowCellContextMenu = False,
            .AllowColumnHeaderContextMenu = False,
            .AllowRowHeaderContextMenu = False,
            .BeginEditMode = RadGridViewBeginEditMode.BeginEditProgrammatically,
            .AllowEditRow = False,
            .ShowRowHeaderColumn = False,
            .ShowColumnHeaders = False,
            .VirtualMode = False
        }

        newGrid.TableElement.BorderHighlightColor = Color.CornflowerBlue

        Dim viewDef As New TableViewDefinition
        newGrid.MasterTemplate.ViewDefinition = viewDef

        Return newGrid
    End Function
EDIT: When pinning the row AFTER "GridView.EndUpdate()" it works fine. It doesn't work when setting pinned status on row creation or after adding the row to the grid. 
0
Dinko | Tech Support Engineer
Telerik team
answered on 12 May 2023, 09:35 AM

Hello Zeev,

Thank you for the provided code snippet. I have tried to follow your steps but wasn't able to observe the described behavior. My guess here is that my implementation is different from yours. Could it be possible to modify my test project to reproduce this behavior? When you run the project click on the button at the bottom to add a row pinned at the top. After adding the row to the collection I am setting it pin position. The control is in a data-bound scenario. 

Regards,
Dinko | Tech Support Engineer
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
GridView
Asked by
Zeev
Top achievements
Rank 1
Answers by
Zeev
Top achievements
Rank 1
Pascal
Top achievements
Rank 1
Iron
Dinko | Tech Support Engineer
Telerik team
Share this question
or