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

AutoGenerateColumns and GridNumericColumn in Q1 2011

1 Answer 47 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Luis
Top achievements
Rank 1
Luis asked on 06 May 2011, 01:37 PM
Hello,

I have been using this piece of code for a long time and it works fine, but after upgrading to Q1 2011 it fails because the if condition became false:

If e.Column.ColumnType = "GridBoundColumn" Then
      Select Case e.Column.DataType.Name
        Case "Int32"
           .....

I have read in section "What is fixed" in Q1 2001 the following: "Fixed: RadGrid does not create GridNumericColumn for int data type when AutoGenerateColumns=true "

On the other hand, this is what it's said in RadGrid Column types documentation:
"Automatically-generated columns are always of type GridBoundColumn."

And this is a fragment of a forum thread message:
"Well if the column's are AutoGenerated I don't see how any of them would be one of those specific types, since they should all be GridBoundColumn."

¿Could you please tell me which column type is the correct one for an auto generated column with integer data bound?.

Thanks in advance

1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 11 May 2011, 10:09 AM
Hi Luis,

It seems that the help article has been containing outdated information. Currently, RadGrid determines column type for auto-generated columns based on the data field type. So, when the data type is Int32, the column created with the latest release of RadControls for ASP.NET AJAX will be of type GridNumericColumn.

Thank you for pointing out this discrepancy, we will fix the help article content.

Regards,
Tsvetina
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.

Tags
Grid
Asked by
Luis
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or