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.
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.
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.