Login Register

checkBox

dojox.grid.DataGrid and checkbox as field type

well... I'm trying pretty basic thing:
- create a grid with field types as checkboxes

the problem is even simpler : it doesn't work ;)

I'd be helpful to anyone who will respond and give me some tips on how to fix it. I've also tried changing the checkbox to Bool (dojox.grid.cells.Bool) but no luck. Any ideas ?

dojo.require("dojox.grid.cells.dijit");
dojo.require("dojo.data.ItemFileReadStore");
dojo.require("dojox.grid.DataGrid");

var jsondata = [{Locality:'XX', AVL:true, PT:true}, {Locality:'XY', AVL:true, PT:true}];

Tree - how to toggle tree node icon between checked checkbox and unchecked checkbox

I have a tree for which I need to be able to toggle the icons on the nodes between a checked checkbox and unchecked checkbox. I can use getIconClass to set the initial icon for all of the nodes to an unchecked checkbox (per example provided on pp. 329-335 in Mastering Dojo by Rawld Gill, Craig Riecke, and Alex Russel). What I haven't figured out is how to test for which icon is currently set on a tree node so that when the node is clicked the icon can be toggled to its inverse. If anyone has done this, I would appreciate seeing your example.

Dojo Tree node Checkbox

I want to make selection on Dojo Tree, Is it possible to include check box on Tree node.

or

Can I make selected tree node's font as bold (font-weight = "bold")?

Thanks in Advance

Dynamically create DnD items using dijit.form.CheckBox()

[editor: moving to the appropriate forum…]

Hi,
I am trying to dynamically create a listing of map/image layers (using the dijit.form.CheckBox) that allows the user to turn on/off the layer visibility as needed. I also want the user to have the ability to reorder the layers. I am using the dojox.gfx.createSurface to add the map/image layers to the page and was going to change image order based on the DnD list order.

Grid - Status of checkbox from a JSON store

A few days ago I started working with the Dojo toolkit and most things work out fantastically for me.

I'm using the Grid and populated it using a JSON-store (created from an MySQL-database using PHP). So far, so good. There are several boolean-fields; their values (in the JSON-file) are either '0' or '1'.

How can I get the dojox.grid.editors.bool-editor to work with these values? I don't want to change the database values from 1 to e.g. 'checked'.

Using

radiobutton: get selected value

After hours of searching a way to submit only the value of an radiobutton group, i find myself searching in the api. as far as i see, there is no simple way to access the checked (selected) value. So i just hacked into the Checkbox.js following code:

getCheckedValue: function(){
			// HACK
			var res = false;
			dojo.forEach(this._groups[this.name], function(widget){
				if(widget.checked) res = widget.value;
			}, this);	
			return res;
		},

It works so far. Maybe its a nice extension for the next release...
You can call it by:

Incorrect values of checkboxes when dnd-ing rows with IE

Hello, i am new to Dojo and i've got a problem with Drag&Drop in Internet Explorer.

My problem doesn't appear in Firefox, just with IE.

I want to reorder rows in a table, and these rows contain checkboxes.
The problem is that when I drag&drop the rows, values of the dragged checkbox is reset to False,whatever is the real value of the checkbox. (as i can see in the console)
If i just check or uncheck the box without dragging it, there is no problem.

I'm not sure it's clear, i join a part of my code :


script language="javascript" type="text/javascript"

Checkboxes broken in 1.0.2?

I'm probably doing something wrong, but I can't get Dijit checkboxes to render in a form under 1.0.2. Assuming all of the appropriate require's (at least FireBug is not complaining), the following form renders each checkbox as I expect. However, if I just add 'dojoType="dijit.form.CheckBox"' to each element none of the checkboxes render at all. What's going on here? I've looked at this eight ways from Sunday....

How to disable check box in grid cell?

I need to be able to disable the checkbox in a column on a row by row basis. How do you get access to the input tag within the cell to change it properties?

The status of the row determines if the checkbox is disabled. I've tried the following, with the current form returning the first input tag on the page in the inputCb variable which is not even a dojo object. The column is defined as a 'editor: dojox.grid.editors.Bool'. initGrid() is called from an AJAX load function after the grid has been updated with data.

Thanks

function initGrid()
{

programmatically create checkBox in dojo 1.0

Hi

is there any way to create a checkBox widget in dojo 1.0?

I've tried

var mycb = new dijit.form.CheckBox(params,node);

but my browser (firefox) gives me a "CheckBox is not a constructor" error.

I can create other widgets such as buttons and select boxes, but not a checkbox..

Can anyone help?

Regards,
Rohit

Syndicate content