The 5th annual nopCommerce conference will take place in India on the 10th-11th of October. Please find more about this event here

RenderCheckbox values should not be limited to Id property

Posted: July 19, 2019 at 11:25 AM Quote #242687
Hi,

When we use RenderCheckBox in datatable  then we have to use Id as property to bind value because of then

case RenderCheckBox checkBox:
                    <text>
                    render: function (data, type, row, meta) {
                        return (data === 'true')
                            ? '<input name="@checkBox.Name" value="' + row.Id + '" type="checkbox" class="checkboxGroups" checked="checked" />'
                            : '<input name="@checkBox.Name" value="' + row.Id + '" type="checkbox" class="checkboxGroups" />';
                    },
                    </text>
                    break;
in _Table.Definition.cshtml.

I think, it should not be limited to Id property.
We are unable to use another model property to bind values in checkboxes.
There should be another parameter pass from RenederCheckBox to use in row.PropertyName.

What do you think?
This post/answer is useful
1
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Thanks & Kind Regards
Pratik Manek
SuperNop Solutions

Visit out Official site for Plugins or Customization,
PM me if you want to hire us, or you can visit us at
http://www.supernopcommerce.com/
Email:  [email protected]
Skype: supernopcommerce

Please +1 if this post help
Posted: July 22, 2019 at 2:30 AM Quote #242753
Thanks a lot! I created a work item here.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Interested in the dedicated Premium support services provided by core developers? Please visit http://www.nopcommerce.com/supportservices.aspx

Regards,
Dmitriy Kulagin
Posted: September 05, 2019 at 6:19 AM Quote #245716
Done. Please see this commit.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Interested in the dedicated Premium support services provided by core developers? Please visit http://www.nopcommerce.com/supportservices.aspx

Regards,
Dmitriy Kulagin
Premium support services
  • Dedicated premium support services provided by core developers are intended for persons who run mission critical websites, work on projects with tight deadlines, or want to get dedicated support.
Professional services
  • Want to open a new store? Want to take your store to the next level? Need a custom extension? We can customize nopCommerce to fit your store perfectly. Request a quote to get started.