0

I have a jqGrid row that I want to edit with a click on the row. One of the columns is a Select column and has more than 20,000 items in it. I use EditOptions property of the column to attach these values. This is done in JQGrid Column Model URL method (in code behind).

Everything works fine but while adding or editing it takes around 4 to 5 minutes to enable the row in Editable format.

As per my primary investigation, jQuery.jqGrid.min.js has an EditRow function that is called while editing or adding a row. In that function, CreateEL function is called and one of the parameter of that function is "e" that has more than 20,000 values attached to it. It takes few minutes of time to call the function with this heavy parameter.

Any suggestion to faster this process would be helpful...

DevD
  • 155
  • 1
  • 1
  • 9
  • Which sense to send 20000 items to the client? Why you don't use jQuery UI Autocomplete instead of ` – Oleg May 20 '13 at 11:16
  • I specified editType = "select" and the set EditOptions with a SemiColon separated string that is consist of more than 20,000 items. Can I set a jQuery UI AutoComplete in jqGrid column ? Please share some piece of code / example. Thank You. – DevD May 20 '13 at 11:29
  • We use different products: I use free open source jqGrid which is pure JavaScript solution and you use commercial product product jqSuite from www.trirand.net and you try to write pure C# code so that required JavaScript code will be *generated* for you. I don't know and don't use jqSuite myself. – Oleg May 20 '13 at 11:35
  • You can find in [my old answer](http://stackoverflow.com/a/7392816/315935) how to implement jQuery UI Autocomplete in jqGrid with ASP.NET. – Oleg May 20 '13 at 11:37
  • Thank you Oleg ! I will check it out. – DevD May 20 '13 at 11:46
  • @Oleg, I modified the code as below: col.edittype = "select"; col.editoptions = "dataUrl : '@Url.Action(ActionName, ControllerName)', buildSelect : createSelectList"; And defined the respective action the controller. However, the dropdown list in the grid remains blank. If I execute the Action directly from the browser, it gives proper JSON result. "createSelectList" is created in the web page where jqGrid is present. Is there anything that I am missing here ? – DevD May 21 '13 at 11:45
  • @Oleg, While debugging, control does not come to Controller Action or not to the CreateSelectList method. – DevD May 21 '13 at 11:51

0 Answers0