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

[Solved] Client edit batch updates - Issue with ReadOnly columns

1 Answer 103 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sigifredo
Top achievements
Rank 1
Sigifredo asked on 26 Feb 2013, 04:51 PM

Hi,

I have a grid on my page which allows users to edit records and do batch updates. I am using the following demo which works just fine. (http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/clienteditbatchupdates/defaultvb.aspx?#qsf-demo-source).

However, in my RadGrid I have several bound columns set to ReadOnly and when the users accidentally double click those ReadOnly columns JavaScript errors occur. It seems the errors occur because the JavaScript functions are looking for the editable control (textbox) for every column including the ReadOnly ones.

I tried to modify the JavaScript functions so no “dblclick” handler is added to those ReadOnly columns but I am still getting the errors.

Using the demo specified above, is there any way the ReadOnly columns will be ignored when double clicking the cell?

Using: 

  • RadControls for ASP.NET AJAX Q1 2013
  • Windows 7
  • Visual Studio 2010
  • vb.net
  • .NetFramework 4.0
  • SQL Server 2005

Thanks

Sigi Perez

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 01 Mar 2013, 11:35 AM
Hello Sigifredo,

Please try adding the following condition:
if (cell)
{
    if ( !sender.get_masterTableView().get_columns()[cell.cellIndex].get_readOnly()) {
        $addHandler(cell, "dblclick", Function.createDelegate(cell, ShowColumnEditor));
    }
}

Hope this helps. Please give it a try and let me know if it works for you.

Greetings,
Eyup
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
Sigifredo
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or