3 Answers, 1 is accepted
0
Hello Andrew,
The easiest way would be to use the ColumnCreated event:
I would recommend that you examine the following help topic:
Using Columns
Let me know if you need further assistance.
Best regards,
Daniel
the Telerik team
The easiest way would be to use the ColumnCreated event:
protected
void
RadGrid1_ColumnCreated(
object
sender, Telerik.Web.UI.GridColumnCreatedEventArgs e)
{
if
(e.Column.UniqueName ==
"MyColumnName"
)
{
...
}
}
I would recommend that you examine the following help topic:
Using Columns
Let me know if you need further assistance.
Best regards,
Daniel
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0

Andrew
Top achievements
Rank 1
answered on 22 Apr 2011, 02:55 PM
Thanks that link would be helpful
Where would this code be put:
Does this go on the page_load. I am using vb and code behind
Where would this code be put:
Protected Sub RadGrid1_ColumnCreated(sender As Object, _
e As Telerik.Web.UI.GridColumnCreatedEventArgs) _
Handles RadGrid1.ColumnCreated
If e.Column.UniqueName = "BirthDate" Then
Dim boundColumn As GridBoundColumn = CType(e.Column, GridBoundColumn)
boundColumn.ReadOnly = True
boundColumn.DataFormatString = "{0:d}"
End If
End Sub 'RadGrid1_ColumnCreated
Does this go on the page_load. I am using vb and code behind
0
Hello Andrew,
ColumnCreated is an event and as such it should not be placed in another event.
Regards,
Daniel
the Telerik team
ColumnCreated is an event and as such it should not be placed in another event.
Public
Partial
Class
Default3VB
Inherits
System.Web.UI.Page
Protected
Sub
RadGrid1_ColumnCreated(
ByVal
sender
As
Object
, _
ByVal
e
As
Telerik.Web.UI.GridColumnCreatedEventArgs) _
Handles
RadGrid1.ColumnCreated
If
e.Column.UniqueName =
"BirthDate"
Then
Dim
boundColumn
As
GridBoundColumn =
CType
(e.Column, GridBoundColumn)
boundColumn.
ReadOnly
=
True
boundColumn.DataFormatString =
"{0:d}"
End
If
End
Sub
'RadGrid1_ColumnCreated
...
Regards,
Daniel
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.