This is a migrated thread and some comments may be shown as answers.

[Solved] Selectable Row.

0 Answers 57 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Francesca
Top achievements
Rank 1
Francesca asked on 20 Mar 2012, 11:00 AM
Is there a way to make a single column NOT selectable when the row is defined as Selectable?

I have this column in my grid:
columns.Bound(o => o.InvoiceNr)
                     .Template(@<text> @if (string.IsNullOrEmpty(@item.AmountIn.ToString()))
                                       {<input type="checkbox" value="@item.InvoiceNr" onclick="SetAmountIn(@item.InvoiceNr,  '@item.Amount', '@item.VAT')" id="@item.InvoiceNr" name="checkedInvoices" />}</text>)
                     .ClientTemplate("<input id='<#= InvoiceNr #>' type='checkbox' name='checkedInvoices' value='<#= InvoiceNr #>' />")
                     .Title("Betalat")
                     .Filterable(false)                   
                     .Width(70)
                     .HtmlAttributes(new { style = "text-align:center" });

And 
  .Selectable()
    .ClientEvents(events => events.OnRowSelect("onRowSelected"))

But I don'r want the event onRowSelected to be hit if a user miss the checkbox and casually klicks on the row of that column nothing should happen...
I was hoping to have a method .Selectable(false) bound to the column... but it doesn'r exists...

Regards,
Francesca
Tags
Grid
Asked by
Francesca
Top achievements
Rank 1
Share this question
or