Login Register

Programmatic

programmatically enter in edit mode

I would like to programmatically append a new row to a DataGrid and automatically enter in edit mode on a cell ('description') of this new row.

function appendItem()
{
    var newItem = {
        reference_seq: newId,
        reference_previous: prev,
        reference_next: null,
        description: 'to-be-replaced'
    };
    store.newItem(newItem);
    // Enter edit mode here
}

I've found a doStartEdit() function on the grid but I am unable to make it work. For example:

grid.doStartEdit(grid.layout.cells[3], grid.focus.rowIndex);

Programmatic replace dijit controls in a form

I'm trying to do a "cool" thing (I hope) that I thought to be easy to get, but my experience in Dojo is not sufficient to achieve this goal.

Dojo dnd issue

[editor: moving to the appropriate forum…]

I was experimenting with the Drag and Drop functionality and I need some help.
I have one container with some items and about 40 other containers with/without items (max one item in container)(all with the dojotype: dojo.dnd.Source).

Now I want to limit the items in the 40 containers to 1, so that only 1 item can be placed in that container. If there is already a item in the container the user should move that first.

I've searched the forums and the tutorials but I couldn't find a way.

Thanks in advance.

Dojo 1.2 Grid in an accordionPane, issu ?

Hello,

This code put a grid in an accordionPane.

This code works on the nightbuild of the dojo 1.2 done the 21/08/08 but no more with the release 1.2.0b1-src.

When I call the function resize on the grid I get the following error :this.headerContentNode.firstChild has no properties

Is somebody can help me ?

Best Regards,
Arnaud.

The code of the page :

chart not rendering in programmatically created tab, which links to another page with setHref()

I creating a web page which displays charts, in tabs.

The tabs are created programmatically when a button is pressed.

I just create a tab and set the href to a page which is where the chart is created.

this is how I create the tab:-

javascript function in head of page 1

var node1=document.createElement("div");

var devel = new dijit.layout.ContentPane({id:"develTab",closable:"true",position:"relative",refreshOnShow:"true",title:"development overview"},node1);
devel.setHref("developmentoverview.jsp");
var tabCont = dijit.byId("tabs");

Problem with OnClick function in programmatic buttons

I have created several programmatic buttons but cannot get their respective onClick functions to fire.

In the example below, the onClick works fine if the button is created declaratively in the markup, but it returns "this.OnClick is not a function" when the button is created programmatically in javascript.

This works...

<button dojotype="dijit.form.Button"
    id="Clear_Form"
    jsid="Clear_Form"
    label="Clear Form"
    onclick="clearForm()">

</button>

But for some reason this does not...


var doc = document;

How to programmatically create a filteringSelect and its associated data store

The two functions below are two different attempts to programmatically create a filteringSelect and its associated data store. I believe I am not properly creating the data store. The first method...


function createPicklist(elemId, fldLabel, fldCount) {
showMsg("creating picklist for:\nnelemId:" + elemId + "\nlabel:" + fldLabel + "\ni:" + i);
// This function creates a filteringSelect element for the specified field from the database

// get the body element
var doc = document;
var htmlElement = doc.documentElement;

Programmatic MultiSelect

I get an error trying to create a MultiSelect programmatically.

The error is around line 21 as says: "Object doesn't support this property or method"

Has anyone had any success doing this?

Source:


<html>
<head>

<title></title>

<style type="text/css">
@import "/dojoroot/dijit/themes/tundra/tundra.css";
@import "/dojoroot/dojo/resources/dojo.css";
</style>
<style>
/* NOTE: for a full screen layout, must set body size equal to the viewport. */

Programmatically change Templated widget values?

Hi all,

I am currently trying to programmatically update a templated widget.

To provide a simplistic example, say I have the following template for a custom widget:

I want to programmatically update 'link' and 'text' above - but the link always retains the values passed to it when it was constructed, and I can't figure out how to refresh it (I did call this.startup() after altering the text and link variable values).

Programmatic ComboButtons

Hello,

I have been trying to programmatically create ComboButtons (containing drop-down items) to put in a toolbar without any success. I've searched the web far and near and have been unable to come up with any answers as to if it's possible and how to get these ComboButtons to work correctly.

Can anyone give me an example as to how this is done?

Thanks much!

Syndicate content