Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KOGrid Button in row open the dialog #294

Open
arunsaho opened this issue Nov 7, 2014 · 2 comments
Open

KOGrid Button in row open the dialog #294

arunsaho opened this issue Nov 7, 2014 · 2 comments

Comments

@arunsaho
Copy link

arunsaho commented Nov 7, 2014

Hi
I want a link/button in each row which open dialog box with details of row. My first row is working fine.
Some how not able to open the dialog box for other rows. CSS is applied to first button only.
{ field: 'StdID', displayName: 'Edit Details, cellTemplate:
'

' +
'Update' + '
', width: '180'
}

selectedItems: self.mySelections,
multiSelect: false

  1. In another grid I want a data field to be link button when clicked which opens a dialog box with details of row.
@will-russell
Copy link

For CSS, I have found that putting the class into the template works consistently, so that is what I would recommend.

I have also found that embedding controls like this (including ko components) is fairly straightforward based off of the cell template library example below. I will try to add in an example of using KnockoutJS components for cell values.

NOTE: this assumes that there is a function you will want to pass some identifier to a function that will do this for you, and "$data.field" will need to be the ID of the row object.

cellTemplate: '<button class=\"detail-button\" data-bind=\"click: fnShowDisplay($parent.entity[$data.field])\" value=\"Details...\" />'

@arunsaho
Copy link
Author

Thanks Russell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants