The above view shows articles content type, which is exposed filter.I want to add a radio buttons as i have shown in image for published and unpublished,can I get this functionality programmaticaly and how
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.Sign up to join this community
This can be achieved using Better Exposed Filters module. If you need to do this programmaticaly then you may need to look at the code of this module. You need to implement the hook_theme as done in better_exposed_filters.module and implement the code to display as radio button as done in better_exposed_filters.theme(Function: theme_select_as_radios)
I would suggest using the module directly if that is an option.
I would suggest using Views Bulk Operations:
This module augments Views by allowing bulk operations to be executed on the displayed rows. It does so by showing a checkbox in front of each node, and adding a select box containing operations that can be applied. Drupal Core or Rules actions can be used.
Even if it can't do exactly what you want, you could modify it into a custom module that could. Gives a good starting point for the code.