Login Register

checkBox

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