button

Questionsbutton
Paul Hagerty asked 8 years ago

Hello

Is there a good guide on making a new button on the grid
(a grid button, not row) . or even a button not on the grid (such as a html button everywhere on the page)

Which can access the data on the currect grid view

via php would be great, unless it has to be java

I am basically, having problems access the current grid data via php

Thanks

5 Answers
Abu Ghufran answered 8 years ago

Hi,

You can add toolbar button, button in row, or button anywhere else in html beside grid.
1) demos/appearance/toolbar-button.php line 105
2) demos/appearance/custom-row-button.php
3) demos/appearance/custom-grid-button.php

If you can tell exact scenario i can help on exact issue.

Paul answered 8 years ago

I am just trying to understand

I have got the following to work,
1. i can make a button,
2. can make it call and run a php function

how do i get the current on page grid data within php?

such as i would run down every record/row and get the value of a certain field from the current filtered view, called "field1" in the database

Abu Ghufran answered 8 years ago

You can use on_data_display event handler and iterate through grid data.
refer demos/editting/custom-events.php > on_data_display event handler.

What you want to do after data iteration?

Paul answered 8 years ago

Hmm, how can i trigger on_data_display from a button click

i basically, want to add a button, and when the user clicks it, it goes to my php function (within the same webpage) and i do access the data in the grid from php and then do what i like with the info

Abu Ghufran answered 8 years ago

This is not support within library.
You can call an ajax request, $.ajax() and on server side put custom code in php
Refer jQuery / ajax for usage.

Your Answer

13 + 10 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?