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

like Radgrid problem after updating telerik binaries

1 Answer 75 Views
Grid
This is a migrated thread and some comments may be shown as answers.
RemixerS
Top achievements
Rank 1
RemixerS asked on 25 Jun 2012, 02:36 PM
Hi, I have trouble with updating excel-like radgrid on my end. After updating telerik binaries from 2010 to 2012, it gives me this error:
NullReferenceException was unhandled by user code.

on this line:
textBox.ReadOnly = true;

textBox becomes null for some reason.

// Attach the event handlers to the client side events of the TextBoxes.
        foreach (GridDataItem item in RadGrid1.MasterTableView.Items)
        {
            if (item is GridDataItem)
            {
                columnsCount = 0;
                for (int i = 2; i < RadGrid1.MasterTableView.RenderColumns.Length; i++)
                {
                    GridColumn column = RadGrid1.MasterTableView.RenderColumns[i];
                    TextBox textBox = (item[column.UniqueName].Controls[0]) as TextBox;
                    if (textBox != null)
                    {
                        textBox.Attributes.Add("ondblclick", "cellDoubleClickFunction('" + textBox.ClientID + "');");
                        textBox.Attributes.Add("onclick", "cellClick('" + textBox.ClientID + "');");
                    }
                    if (i == 2)
                    {
                        textBox.ReadOnly = true;
                        textBox.Attributes.Add("class", "readOnly");
                    }
                    columnsCount++;


The type of column is Telerik.Web.UI.GridColumn {Telerik.Web.UI.GridBoundColumn}.
However compiling same code with telerik 2012 binaries, it becomes Telerik.Web.UI.GridColumn {Telerik.Web.UI.GridNumericColumn}. I'm not sure if it's really releated with the problem, since I'm new to telerik.

You can get the file in Here from code library and same problem occurs after updating telerik binaries. Any help will be appreciated.

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 28 Jun 2012, 02:45 PM
Hi Leon,

Thank you for your feedback on excel like grid code library. We will examine it with the latest version in order to see how it is working and if there is some problems, and will get back to you with additional information.

All the best,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
RemixerS
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or