Knockout-Contrib / Knockout-Contrib/KoGrid

How to select certain cells from koGrid row?

Open
#251 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
277
Forks
124
PR merge metrics
No merged PRs in 30d

Description

I have a koGrid and I want to select only somes cells (2 cells) from the row. If use canSelectRows: true property I can select the entire row - I don't need this. How to select certain cells from koGrid row ? How to use a rowTemplate in this case?
grid source:

this.gridOptions = {
data: self.people,
enablePaging: true,
pagingOptions: self.pagingOptions,
useExternalSorting: true,
sortInfo: self.sortingOptions,
enableColumnResize: false,
keepLastSelected: false,
multiSelect: true,
showColumnMenu: false,
showFilter: false,
canSelectRows: false,
columnDefs: [{
field: "Age",
displayName: "Age",
width: "33.3%",
sortable: true
},
{
field: "Address",
displayName: "Address",
width: "33%",
sortable: true
},
{
field: "Website",
displayName: "Website",
cellTemplate:
'

' +
' People' +
'
',
width: "33%"
}],
selectedItems: self.selectedItems,
plugins: [new koGridSetDefaultSortingPlugin(this.sortingOptions), new koGridSetNextPagePlugin()]

```
};
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the koGrid selection options in the issue, especially canSelectRows, selectedItems, columnDefs, cellTemplate, and rowTemplate. Determine whether selection can target individual cells rather than rows, then document the supported configuration or define the needed behavior; the issue names no tests or source files to run.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.