Disable multiple row selection

187 views
Skip to first unread message

Pushpendra Singh

unread,
Sep 6, 2013, 1:17:03 PM9/6/13
to google-visua...@googlegroups.com
Hi ,

I am using google  Table visualization and wanted to disable multiple row selection on a table..
using shift key, i can very well select multiple row.. how to avoid this and restrict the row- selection to only 1.

regards
Pushpendra

asgallant

unread,
Sep 6, 2013, 1:36:58 PM9/6/13
to google-visua...@googlegroups.com
When you call the #getSelection method, the table returns an array of objects describing the selected rows.  The order of elements is the order in which they were selected, so you can take the last element in the array, and set the chart's selection to be just that element.  See this example: http://jsfiddle.net/asgallant/a4WPZ/

Pushpendra Singh

unread,
Sep 6, 2013, 1:47:59 PM9/6/13
to google-visua...@googlegroups.com
That was very quick..thanks for reply.


--
You received this message because you are subscribed to a topic in the Google Groups "Google Visualization API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/Vj-OqN1kC3I/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.

Pushpendra Singh

unread,
Sep 6, 2013, 3:20:26 PM9/6/13
to google-visua...@googlegroups.com
How to get the row count of the table..
I believe APIs guide is very limited and its tough to find details of different APIS with google table visualization.

asgallant

unread,
Sep 6, 2013, 5:22:41 PM9/6/13
to google-visua...@googlegroups.com
Call the #getNumberOfRows method of the DataTable:

var rowCount = data.getNumberOfRows();


On Friday, September 6, 2013 3:20:26 PM UTC-4, Pushpendra Singh wrote:
How to get the row count of the table..
I believe APIs guide is very limited and its tough to find details of different APIS with google table visualization.
On Fri, Sep 6, 2013 at 11:17 PM, Pushpendra Singh <spushpe...@gmail.com> wrote:
That was very quick..thanks for reply.
On Fri, Sep 6, 2013 at 11:06 PM, asgallant <drew_g...@abtassoc.com> wrote:
When you call the #getSelection method, the table returns an array of objects describing the selected rows.  The order of elements is the order in which they were selected, so you can take the last element in the array, and set the chart's selection to be just that element.  See this example: http://jsfiddle.net/asgallant/a4WPZ/


On Friday, September 6, 2013 1:17:03 PM UTC-4, Pushpendra Singh wrote:
Hi ,

I am using google  Table visualization and wanted to disable multiple row selection on a table..
using shift key, i can very well select multiple row.. how to avoid this and restrict the row- selection to only 1.

regards
Pushpendra

--
You received this message because you are subscribed to a topic in the Google Groups "Google Visualization API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/Vj-OqN1kC3I/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualization-api+unsub...@googlegroups.com.

Pushpendra Singh

unread,
Sep 7, 2013, 3:03:12 AM9/7/13
to google-visua...@googlegroups.com
thanks,


To unsubscribe from this group and all its topics, send an email to google-visualizati...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages