0

I am creating application in MVC 4 jqgrid, I created jqgrid with multiselect option true, but checkbox column comes in the left hand side of my grid. How can I move the multiselect column option to the right side?

code:

$("#ApplicationDetailsTable").jqGrid({

    url: '@Url.Action("AppListDetails", "JQGridHome")',

    sortable: true,
    datatype: 'json',

    colNames: ["no1", "name", "phone","department"],
    colModel: [
        { name: "no1", index: "no1", width: 40, align: "left", stype: 'select', searchoptions: { sopt: ['eq'], value: getstaticvalue() } },
        { name: "name", index: "name", width: 60, align: "left"},
        { name: "phone", index: "phone", width: 60, align: "left" },
        { name: "department", index: "department", width: 60, align: "left", stype: 'select', searchoptions: { sopt: ['eq'], value: setdepartmentValue() } }

    ],
    width: 650,
    loadonce: true,
    height: 200,
    toppager: false,
    pager: $("#JQGridPaging"),
    rowNum: 6,
    rowList: [5,10],
    viewrecords: true,
    hidegrid: true,
    caption: "A Basic jqGrid - Read Only",
    multiselect: true

}

image image

asymptoticFault
  • 4,491
  • 2
  • 19
  • 24
Prathiesh
  • 191
  • 1
  • 2
  • 12

1 Answers1

1

I suppose that you mean that you want to have chechbox column on the right side (not on the left which is default). The answer and this one provide a workaround which is not supported. Nevertheless I tried the demo with the last version of jqGrid and all seem be working correctly. See the demo.

Community
  • 1
  • 1
Oleg
  • 220,925
  • 34
  • 403
  • 798
  • i want same as your (see the demo) demo shows.now i have updated my question with code.Can you pls tell what change i have to made to achieve that. thanks for your answer. – Prathiesh Aug 29 '13 at 13:55
  • @Prathiesh: Sorry, but I don't understand your problem. You can just open the source code of [the demo](http://www.ok-soft-gmbh.com/jqGrid/MultiselectLast_.htm) to see all what the demo do: some actions after the grid is created and some actions in `loadComplete` callback. You can just use the same code fragments. In [the answer](http://stackoverflow.com/a/7860415/315935) I commented the code and discussed why it's not enough just to use `remapColumns`. – Oleg Aug 29 '13 at 14:02
  • @Prathiesh: Additionally I would recommend you the following changes of your code: 1) remove all `index` properties from `colModel` and `align: "left"`. The resulting code will the shorter, but do the same. 2) replace `pager: $("#JQGridPaging")` to `pager: #JQGridPaging"`. 3) add `gridview: true` option to improve performance and consider to use `height: "auto"` to improve visibility of the grid. – Oleg Aug 29 '13 at 14:06
  • thanks i have changed the properties, now visibility is good as u said, and i am working to move the order(checkbox column) once i done ill update u thanks again for your help. – Prathiesh Aug 29 '13 at 14:14