Change column property & runtime binding

Feb 9, 2012 at 11:36 AM

DataAnnotations are great for jqGrid, but some times they are not enough or not suitable.

For example ,JQGridColumnSearchable or JQGridColumnEditable are very nice, but i think we should have change to delete them.

Example: New products grid -> No search, no edit
View products grid -> Edit, Search

Actually this is not possible: the only way is to derive class and change metadata (and it's bad).
While i think convention over configuration is very nice, we should have change to override default metadata attributes (when returning JsonResult).

Beyond, i think would be GREAT use Json Import feature to return both layout and grid data (in one shot, a JsonResult).

Coordinator
Feb 9, 2012 at 3:03 PM

Give me some time to think about this, I will get back to you.

Coordinator
Mar 12, 2012 at 9:28 PM

I'm considering creating a non-strongly typed version of the helper. Do you think that would be a soltuion in your case as well?

Mar 12, 2012 at 10:44 PM

Hello!
At first thank you for your attention.
Anyway you don't have to develop for my case and solutions, i just give advices and what i would like to find!

I think that you're going on the wrong way about developing a non strongly typed version of the helper. Main reason i use your project is for that and there are other helper that do that!
I was thinking to create a particular json result that may send data and different layout than default one wrote using dataannotation.
jqgrid can support this scenario -> http://www.trirand.com/jqgridwiki/doku.php?id=wiki:import_methods

You may also create a JSON object with attribute array and give them priority respect to DataAnnotations. There are many solutions (you're surely a better programmer than me, you will find the right direction).

Have a nice day,
Vincenzo Chianese