Add Checkbox column to Unigrid

Naresh Ede asked on December 11, 2017 12:39

Hi

I had cloned ObjectListing template to display the objects in My OWN Custom Module.

Here in that template i found Listing Webpart is used, so i want to customize the grid by adding a checkbox column.

so is that possible to do customization, or any alternate ways to add checkbox column in unigrid ?

And One more thing is i want to export the selected records to an excel sheet.

Thanks

Naresh Ede

Recent Answers


Peter Mogilnitski answered on December 11, 2017 15:55 (last edited on December 11, 2017 20:56)

What version are you on? To add check box column is simple you need to edit your grid definition xml file for your custom extender. Add showselection (read more here ) to the options part:

  <options>
    <key name="ShowSelection" value="true" />
  </options>

ShowSelection=true indicates whether the UniGrid displays a column that allows users to select the rows of the grid. You can use selection to perform mass actions that affect multiple rows.

You can access the selected rows in the API through the SelectedItems property of the UniGrid.

Note if you are on 10: The selection column is automatically enabled if the UniGrid definition contains at least one massaction element. For version 10 there is a support for massaction functionality

If you are on 9 and below you will also need to define mass actions in the code. ObjectListing is shared among lots modules, so you will need to recreate the massaction functionality for your particular extender at the back end.

P.S. As always the best way is find out how it is done inside the CMS for other pages and use this as a starting point .

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.