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

how to hide some columns in the radGrid through programming

1 Answer 384 Views
Grid
This is a migrated thread and some comments may be shown as answers.
koteswararao
Top achievements
Rank 1
koteswararao asked on 11 Jul 2012, 02:58 PM
hi ,

as per my requirement i need to hide price column based on some some condition how can we achieve this funcationality through vb.net can u please give any reference or suggestion it will be help full for me

Thanks & Regards,
M.Kotewswara Rao.

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 12 Jul 2012, 04:49 AM
Hello,

Try the following code to achieve your scenario.
VB:
Protected Sub RadGrid1_ItemDataBound(sender As Object, e As GridItemEventArgs)
    If TypeOf e.Item Is GridDataItem Then
        Dim item As GridDataItem = DirectCast(e.Item, GridDataItem)
        If item("ID").Text = "1" Then
            RadGrid1.MasterTableView.GetColumn("Price").Display = False
        End If
    End If
End Sub

Thanks,
Shinu.
Tags
Grid
Asked by
koteswararao
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or