I know, this is not related to esri javascript API but, I am using dgrid included along with the esri api. In my application I need to show the query result in the grid with check-boxes for selection. I tried using the dgrid and selector for it. For some reason it does not display the check-boxes.
below is the jsbin for the sample code.
JS Bin - Collaborative JavaScript Debugging
Any help would be really appreciated.
Thejus
Try using the editor extension. Here is an example:
Thanks for the suggestion. This got me thinking about the version of dgrid, included along with esri api. esri api uses dgrid 0.3.17 version, and according to documentation of that version the selector should be used as below.
var columns = {
col1: selector({ label: "Select", selectorType: "checkbox" }),
col2: { label: 'STRC_ID', field: "STRC_ID", sortable: false },
col3: { label: 'FNDG_CTGY_NB', field: 'FNDG_CTGY_NB' }
};
So that was my mistake. I need to include the latest version of dgrid in my application, as the feature I need are not there in 0.3.17.
Thanks for the help, I was breaking my head trying to figure out 'where I went wrong?'.
Thejus
No problem Thejus. I went through the same head breaking struggle about a year ago.
Also, you may want to swtich the selection mode to 'none' if you plan to use the checkbox instead of the default selection functionality.