Giter Site home page Giter Site logo

Comments (26)

tudor-malene avatar tudor-malene commented on August 24, 2024

Hi Stephen,

What versions of grails and easygrid are you using?

Thanks,
Tudor

from easygrid.

stedo avatar stedo commented on August 24, 2024

hi,

I am using 2.2.4. I have cleaned/restarted the IDE and google visualisation problem appears to have disappeared but I am now having problems with the tags. It doesn't recognise the <grid:grid tag.

Thanks
Stephen

From: Tudor Malene [mailto:[email protected]]
Sent: den 9 december 2013 14:38
To: tudor-malene/Easygrid
Cc: Dougall Stephen
Subject: Re: [Easygrid] Problem with install Easygrid plugin (#24)

Hi Stephen,

What version of grails and easygrid are you using?

Thanks,
Tudor


Reply to this email directly or view it on GitHubhttps://github.com//issues/24#issuecomment-30132141.

from easygrid.

tudor-malene avatar tudor-malene commented on August 24, 2024

I believe that is an IDE problem too.

If you added :

compile ":easygrid:1.4.1"

to your BuildConfig, it should be enough.

from easygrid.

stedo avatar stedo commented on August 24, 2024

hi,

It now appears to build ok but I just don't get any grid appearing on the page. I added the following to my gsp:

<grid:grid id="jqgridinitial" name="deliveryGrid"
jqgrid.caption="Author List"
jqgrid.width="900"
columns.name.jqgrid.formatter="customWikiFormat"/>

And added the following in my controller which is annotated with @EasyGrid:

        static grids = {
                     deliveryGrid {
                                 dataSourceType 'gorm'
                                 domainClass Delivery
                                 gridImpl 'jqgrid'
                                 inlineEdit true
                                 enableFilter true
                                 export {
                                              export_title 'Delivery'
                                              pdf {
                                                          'border.color' java.awt.Color.BLUE
                                              }
                                 }
                                 columns {
                                              actions { type 'actions' }

                                              name {
                                                          jqgrid { editable false }
                                              }

                                              status{
                                                          enableFilter true
                                                          jqgrid { editable false }
                                              }
                                 }
                     }
        }

Am I missing something here?
Thanks
Stephen

From: Tudor Malene [mailto:[email protected]]
Sent: den 9 december 2013 16:09
To: tudor-malene/Easygrid
Cc: Dougall Stephen
Subject: Re: [Easygrid] Problem with install Easygrid plugin (#24)

I believe that is an IDE problem too.

If you added :

compile ":easygrid:1.4.1"

to your BuildConfig, it should be enought.


Reply to this email directly or view it on GitHubhttps://github.com//issues/24#issuecomment-30139031.

from easygrid.

tudor-malene avatar tudor-malene commented on August 24, 2024

Make sure you added:

<r:require modules="easygrid-jqgrid-dev/>

to your gsp.

from easygrid.

stedo avatar stedo commented on August 24, 2024

hi,

Still not getting this to work. When I run the grails app I get the following:

[cid:[email protected]]

If I click on the CSV export I do get a CSV with my data but it doesn't appear to show in the table??

Here is what I have: (thanks in advance)

GSP:

<title>Easygrid</title> nav:resources/

<grid:grid name="deliveryGrid" jqgrid.width="958" columns.name.jqgrid.formatter="customWikiFormat"
jqgrid.caption="Delivery"/>
<grid:exportButton name="deliveryGrid"/>

jq:jquery
console.log(jQuery('#deliveryGrid_table').jqGridMethod('setSelection', 1));
/jq:jquery

CONTROLLER:

@Easygrid
class DeliveryController {

                         static scaffold = true;

                         //def index() { }
                         StockQuoteSoap stockQuoteClient;

                         static grids = {
                           deliveryGrid {
                             dataSourceType "gorm"
                             domainClass Delivery
                             gridImpl "jqgrid"
                             inlineEdit true
                            enableFilter true
                            export {
                                                      export_title "Delivery"
                                                      pdf {
                                                        "border.color" java.awt.Color.BLUE
                                                      }
                            }
                         columns {
                                                      actions { type "actions" }

                                                      name { jqgrid { editable false } }
                                                      status{
                                                                                   enableFilter true
                                                                                   jqgrid { editable false }
                                                      }
                                           }
                           }
                         }


                         def test(){

                                                      def deliveries = Delivery.findAll();
                                                      def footer = "HELLO THIS IS THE FOOTER WITH A CHANGE!";

                                                      String quote
                                                      try {
                                                                                   quote = stockQuoteClient.getQuote("GOOG")
                                                      } catch (Exception e) {
                                                                                   quote = e.message
                                                      }



                                                      return [deliveries: deliveries, footer: footer, quote:quote];
                         }

}

From: Tudor Malene [mailto:[email protected]]
Sent: den 10 december 2013 11:03
To: tudor-malene/Easygrid
Cc: Dougall Stephen
Subject: Re: [Easygrid] Problem with install Easygrid plugin (#24)

Make sure you added:

<r:require modules="easygrid-jqgrid-dev/>

to your gsp.


Reply to this email directly or view it on GitHubhttps://github.com//issues/24#issuecomment-30212744.

from easygrid.

tudor-malene avatar tudor-malene commented on August 24, 2024

You will need to remove:

columns.name.jqgrid.formatter="customWikiFormat"

because you didn't define 'customWikiFormat' (which is a javascript function ) in your page

from easygrid.

stedo avatar stedo commented on August 24, 2024

hi,

I removed the formatter and I still get the same result.

Thanks
Stephen

From: Tudor Malene [mailto:[email protected]]
Sent: den 10 december 2013 15:46
To: tudor-malene/Easygrid
Cc: Dougall Stephen
Subject: Re: [Easygrid] Problem with install Easygrid plugin (#24)

You will need to remove:

columns.name.jqgrid.formatter="customWikiFormat"

because you didn't define 'customWikiFormat' (which is a javascript function ) in your page


Reply to this email directly or view it on GitHubhttps://github.com//issues/24#issuecomment-30232639.

from easygrid.

tudor-malene avatar tudor-malene commented on August 24, 2024

do you have any javascript errors in the console?

from easygrid.

stedo avatar stedo commented on August 24, 2024

hi,

I checked the console in Chrome and found the following:

  1. Uncaught ReferenceError: Delivery is not defined easygrid:52http://localhost:8080/DeliveryTest/delivery/easygrid
  2. (anonymous function)easygrid:52http://localhost:8080/DeliveryTest/delivery/easygrid
  3. ljquery-1.8.3.min.js:2http://localhost:8080/DeliveryTest/static/plugins/jquery-1.8.3/js/jquery/jquery-1.8.3.min.js
  4. c.fireWithjquery-1.8.3.min.js:2http://localhost:8080/DeliveryTest/static/plugins/jquery-1.8.3/js/jquery/jquery-1.8.3.min.js
  5. v.extend.readyjquery-1.8.3.min.js:2http://localhost:8080/DeliveryTest/static/plugins/jquery-1.8.3/js/jquery/jquery-1.8.3.min.js
  6. A

From: Tudor Malene [mailto:[email protected]]
Sent: den 10 december 2013 15:56
To: tudor-malene/Easygrid
Cc: Dougall Stephen
Subject: Re: [Easygrid] Problem with install Easygrid plugin (#24)

do you have any javascript errors in the console?


Reply to this email directly or view it on GitHubhttps://github.com//issues/24#issuecomment-30233533.

from easygrid.

tudor-malene avatar tudor-malene commented on August 24, 2024

This is weird.

Let's see first if server-side everything is ok:

If you fire this in your browser, do you see the JSON response?
http://localhost:8080/DeliveryTest/delivery/deliveryGridRows

from easygrid.

stedo avatar stedo commented on August 24, 2024

hi,

I get this....

{"rows":[{"id":1,"cell":[1,"XXX123","Limpan","open"]},{"id":2,"cell":[2,"XXX456","Super","open"]},{"id":3,"cell":[3,"XXX789","Bra","open"]}],"page":1,"records":3,"total":1}

Thanks
Stephen

From: Tudor Malene [mailto:[email protected]]
Sent: den 10 december 2013 16:09
To: tudor-malene/Easygrid
Cc: Dougall Stephen
Subject: Re: [Easygrid] Problem with install Easygrid plugin (#24)

This is weird.

Let's see first if server-side everything is ok:

If you fire this in your browser, do you see the JSON response?
http://localhost:8080/DeliveryTest/delivery/deliveryGridRows


Reply to this email directly or view it on GitHubhttps://github.com//issues/24#issuecomment-30234773.

from easygrid.

tudor-malene avatar tudor-malene commented on August 24, 2024

Got it.

you have to put double quotes around that caption:

jqgrid.caption="'Delivery'"

Because the taglib writes the string as is in the response

from easygrid.

stedo avatar stedo commented on August 24, 2024

hi,

That did it!!! Thanks a lot for the help.
Stephen

From: Tudor Malene [mailto:[email protected]]
Sent: den 10 december 2013 16:17
To: tudor-malene/Easygrid
Cc: Dougall Stephen
Subject: Re: [Easygrid] Problem with install Easygrid plugin (#24)

Got it.

you have to put double quotes around that caption:

jqgrid.caption="'Delivery'"

Because the taglib writes the string as is in the response


Reply to this email directly or view it on GitHubhttps://github.com//issues/24#issuecomment-30235413.

from easygrid.

tudor-malene avatar tudor-malene commented on August 24, 2024

Great.

Let me know if you have other problems with it.

from easygrid.

stedo avatar stedo commented on August 24, 2024

hi,

Do you have an example project with examples of basic functions such as selection or can you re-direct me to documentation?

Thanks
Stephen

From: Tudor Malene [mailto:[email protected]]
Sent: den 10 december 2013 16:21
To: tudor-malene/Easygrid
Cc: Dougall Stephen
Subject: Re: [Easygrid] Problem with install Easygrid plugin (#24)

Great.

Let me know if you have other problems with it.


Reply to this email directly or view it on GitHubhttps://github.com//issues/24#issuecomment-30235892.

from easygrid.

tudor-malene avatar tudor-malene commented on August 24, 2024

Check out:
https://github.com/tudor-malene/Easygrid_example

Is this what you need?
On Dec 11, 2013 1:26 PM, "stedo" [email protected] wrote:

hi,

Do you have an example project with examples of basic functions such as
selection or can you re-direct me to documentation?

Thanks
Stephen

From: Tudor Malene [mailto:[email protected]]
Sent: den 10 december 2013 16:21
To: tudor-malene/Easygrid
Cc: Dougall Stephen
Subject: Re: [Easygrid] Problem with install Easygrid plugin (#24)

Great.

Let me know if you have other problems with it.


Reply to this email directly or view it on GitHub<
https://github.com/tudor-malene/Easygrid/issues/24#issuecomment-30235892>.


Reply to this email directly or view it on GitHubhttps://github.com//issues/24#issuecomment-30312715
.

from easygrid.

stedo avatar stedo commented on August 24, 2024

Hi,

Had a look at this but what I am looking for is an example for getting the selected items in the grid back to the controller. I also wonder if we can implement selection by checkbox in a table column.

Thanks in advance.
Stephen

Sent from Samsung Mobile

-------- Original message --------
From: Tudor Malene
Date:11/12/2013 16:08 (GMT+01:00)
To: tudor-malene/Easygrid
Cc: Dougall Stephen
Subject: Re: [Easygrid] Problem with install Easygrid plugin (#24) Check out:
https://github.com/tudor-malene/Easygrid_example
Is this what you need?
On Dec 11, 2013 1:26 PM, "stedo" [email protected] wrote:

hi,

Do you have an example project with examples of basic functions such as
selection or can you re-direct me to documentation?

Thanks
Stephen

From: Tudor Malene [mailto:[email protected]]
Sent: den 10 december 2013 16:21
To: tudor-malene/Easygrid
Cc: Dougall Stephen
Subject: Re: [Easygrid] Problem with install Easygrid plugin (#24)

Great.

Let me know if you have other problems with it.


Reply to this email directly or view it on GitHub<
https://github.com/tudor-malene/Easygrid/issues/24#issuecomment-30235892>.


Reply to this email directly or view it on GitHubhttps://github.com//issues/24#issuecomment-30312715

.


Reply to this email directly or
view it on GitHub.

from easygrid.

tudor-malene avatar tudor-malene commented on August 24, 2024

I thought you meant the selection widget.

For selecting rows with checkboxes check :
http://trirand.com/blog/jqgrid/jqgrid.html
Go to: Advanced -> Multi Select.

There's also an example here:
http://www.ok-soft-gmbh.com/jqGrid/DataToMultiSelect2.htm

You will have to implement the controller method yourself that will handle the selected ids.

This is a good candidate to be implemented as an additional feature in easygrid. Probably in some future version.

from easygrid.

stedo avatar stedo commented on August 24, 2024

hi,

Thanks for your help. I'm a bit confused regarding how EasyGrid and JQGrid hang together. Can I use any code for JQGrid on an EasyGrid? How do I added this into EasyGrid in the "static grids ={" section and in the views?

Thanks
Stephen

From: Tudor Malene [mailto:[email protected]]
Sent: den 11 december 2013 22:41
To: tudor-malene/Easygrid
Cc: Dougall Stephen
Subject: Re: [Easygrid] Problem with install Easygrid plugin (#24)

I thought you meant the selection widget.

For selecting rows with checkboxes check :
http://trirand.com/blog/jqgrid/jqgrid.html
Go to: Advanced -> Multi Select.

There's also an example here:
http://www.ok-soft-gmbh.com/jqGrid/DataToMultiSelect2.htm

You will have to implement the controller method yourself that will handle the selected ids.

This is a good candidate to be implemented as an additional feature in easygrid. Probably in some future version.


Reply to this email directly or view it on GitHubhttps://github.com//issues/24#issuecomment-30366880.

from easygrid.

tudor-malene avatar tudor-malene commented on August 24, 2024

Easygrid is designed to be a wrapper around any type of ajax grid ( jqgrid
in your case) .

Basically, it provides the controller actions which jqgrid need to fetch
the data ( with pagination, filtering, etc ).

It also lets you customize the rendering using the underlying grid
implementation, over which you have full control. You do this, either by
modifying the template renderer ( in your case: _jqgridRenderer ), or by
setting properties in the grid definition or directly in the taglib.
Because the default grid renderer iterates over all set properties an adds
them to the resulted html/javascript code.

To answer your question, on how you can add multiselect via the grid
definition:

static grids = {
...
yourGrid{
...
jqgrid{
....
multiselect true
}
}

That's all ( according to the docs from jqgrid you have to add multiselect
=true )
After that, you will have to write some javascript to make an ajax call
with the selected ids , and a controller action to handle that call.

On Thu, Dec 12, 2013 at 2:38 PM, stedo [email protected] wrote:

hi,

Thanks for your help. I'm a bit confused regarding how EasyGrid and JQGrid
hang together. Can I use any code for JQGrid on an EasyGrid? How do I added
this into EasyGrid in the "static grids ={" section and in the views?

Thanks
Stephen

From: Tudor Malene [mailto:[email protected]]
Sent: den 11 december 2013 22:41
To: tudor-malene/Easygrid
Cc: Dougall Stephen
Subject: Re: [Easygrid] Problem with install Easygrid plugin (#24)

I thought you meant the selection widget.

For selecting rows with checkboxes check :
http://trirand.com/blog/jqgrid/jqgrid.html
Go to: Advanced -> Multi Select.

There's also an example here:
http://www.ok-soft-gmbh.com/jqGrid/DataToMultiSelect2.htm

You will have to implement the controller method yourself that will handle
the selected ids.

This is a good candidate to be implemented as an additional feature in
easygrid. Probably in some future version.


Reply to this email directly or view it on GitHub<
https://github.com/tudor-malene/Easygrid/issues/24#issuecomment-30366880>.


Reply to this email directly or view it on GitHubhttps://github.com//issues/24#issuecomment-30417207
.

from easygrid.

stedo avatar stedo commented on August 24, 2024

hi,

I have the following, the multiple selection shows up in the table fine but when I click the link I get an error dialog with the single word "undefined". It looks to me like it's not finding the id of the JQGrid.

Thanks
Stephen

<title>Easygrid</title> nav:resources/

<grid:grid name="deliveryGrid" jqgrid.id="deliveryGrid" jqgrid.width="958"
jqgrid.caption="'Delivery'"/>
<grid:exportButton name="deliveryGrid"/>


Get Selected id's

<script type="text/javascript"> $(document).ready(function() { jQuery("#m1").click( function() { var s; s = jQuery("#deliveryGrid").jqGrid('getGridParam','selarrrow'); alert(s); }); }); </script>

From: Tudor Malene [mailto:[email protected]]
Sent: den 12 december 2013 13:58
To: tudor-malene/Easygrid
Cc: Dougall Stephen
Subject: Re: [Easygrid] Problem with install Easygrid plugin (#24)

Easygrid is designed to be a wrapper around any type of ajax grid ( jqgrid
in your case) .

Basically, it provides the controller actions which jqgrid need to fetch
the data ( with pagination, filtering, etc ).

It also lets you customize the rendering using the underlying grid
implementation, over which you have full control. You do this, either by
modifying the template renderer ( in your case: _jqgridRenderer ), or by
setting properties in the grid definition or directly in the taglib.
Because the default grid renderer iterates over all set properties an adds
them to the resulted html/javascript code.

To answer your question, on how you can add multiselect via the grid
definition:

static grids = {
...
yourGrid{
...
jqgrid{
....
multiselect true
}
}

That's all ( according to the docs from jqgrid you have to add multiselect
=true )
After that, you will have to write some javascript to make an ajax call
with the selected ids , and a controller action to handle that call.

On Thu, Dec 12, 2013 at 2:38 PM, stedo <[email protected]mailto:[email protected]> wrote:

hi,

Thanks for your help. I'm a bit confused regarding how EasyGrid and JQGrid
hang together. Can I use any code for JQGrid on an EasyGrid? How do I added
this into EasyGrid in the "static grids ={" section and in the views?

Thanks
Stephen

From: Tudor Malene [mailto:[email protected]]
Sent: den 11 december 2013 22:41
To: tudor-malene/Easygrid
Cc: Dougall Stephen
Subject: Re: [Easygrid] Problem with install Easygrid plugin (#24)

I thought you meant the selection widget.

For selecting rows with checkboxes check :
http://trirand.com/blog/jqgrid/jqgrid.html
Go to: Advanced -> Multi Select.

There's also an example here:
http://www.ok-soft-gmbh.com/jqGrid/DataToMultiSelect2.htm

You will have to implement the controller method yourself that will handle
the selected ids.

This is a good candidate to be implemented as an additional feature in
easygrid. Probably in some future version.


Reply to this email directly or view it on GitHub<
https://github.com/tudor-malene/Easygrid/issues/24#issuecomment-30366880>.


Reply to this email directly or view it on GitHubhttps://github.com//issues/24#issuecomment-30417207
.


Reply to this email directly or view it on GitHubhttps://github.com//issues/24#issuecomment-30418263.

from easygrid.

tudor-malene avatar tudor-malene commented on August 24, 2024

on a first glance:

Try the following:
remove jggrid from 'jqgri.id'

<grid:grid name="deliveryGrid" id="deliveryGrid" jqgrid.width="958"
           jqgrid.caption="'Delivery'"/>

and add an 'id' column to your grid definition.

from easygrid.

stedo avatar stedo commented on August 24, 2024

hi,

I modified the code but still the same problem when I click on the link. I have an id column and and set the id in the view, still doesn't seem to find the tag.

Thanks
Stephen

CONTROLLER
columns {
id {
type 'id'
}
deliveryId
name
status

        }

VIEW

<title>Easygrid</title> nav:resources/

<grid:grid name="deliveryGrid" id="deliveryGrid" jqgrid.width="958"
jqgrid.caption="'Delivery'"/>
<grid:exportButton name="deliveryGrid"/>


Get Selected id's

<script type="text/javascript"> $(document).ready(function() { jQuery("#m1").click( function() { var s; s = jQuery("#deliveryGrid").jqGrid('getGridParam','selarrrow'); alert(s); }); }); </script>

From: Tudor Malene [mailto:[email protected]]
Sent: den 12 december 2013 14:26
To: tudor-malene/Easygrid
Cc: Dougall Stephen
Subject: Re: [Easygrid] Problem with install Easygrid plugin (#24)

on a first glance:

Try the following:
remove jggrid from 'jqgri.id'

<grid:grid name="deliveryGrid" id="deliveryGrid" jqgrid.width="958"

       jqgrid.caption="'Delivery'"/>

and add an 'id' column to your grid definition.


Reply to this email directly or view it on GitHubhttps://github.com//issues/24#issuecomment-30419904.

from easygrid.

tudor-malene avatar tudor-malene commented on August 24, 2024

The problem is that the id of the jqgrid element in the page is : 'deliveryGrid_table'
So to get the selected elements:

   s = jQuery("#deliveryGrid_table").jqGrid('getGridParam','selarrrow');

This is not very intuitive, I agree.

Let me know if it works.
Thanks

from easygrid.

stedo avatar stedo commented on August 24, 2024

hi,

That fixed it. Thanks again for your help.
Stephen

From: Tudor Malene [mailto:[email protected]]
Sent: den 13 december 2013 10:54
To: tudor-malene/Easygrid
Cc: Dougall Stephen
Subject: Re: [Easygrid] Problem with install Easygrid plugin (#24)

The problem is that the id of the jqgrid element in the page is : 'deliveryGrid_table'
So to get the selected elements:

s = jQuery("#deliveryGrid_table").jqGrid('getGridParam','selarrrow');

This is not very intuitive, I agree.

Let me know if it works.
Thanks


Reply to this email directly or view it on GitHubhttps://github.com//issues/24#issuecomment-30497769.

from easygrid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.