Login Register

DOJOX_GRID

dojox grid within the html form tag issues

I'm building the grid using javascript and then I render this grid into the div element that is nested within the html element. In one of the columns in the grid I'm using the checkbox. If I check this checkbox on runtime (while debugging) I get the error in ScriptResource.axd (the debugger pops it up) in this method:

switch(Sys.Browser.agent) {
...(some code here)...

//AT THIS POINT IT CRASHES. RETURNS UNSPECIFIED ERROR.
var clientRects = element.getClientRects();
....
}

In debug mode in IE : If I put the grid outside of the form it works ok.

Custom Sorting in a Data Store

I've found from looking through the forums that the following code allows you to setup a custom comparator to a field within a data store.

test_store.comparatorMap = {};
   test_store.comparatorMap['fieldName'] = sorterFunction;

   function sorterFunction( fieldNameData1, fieldNameData2 )
   {
      console.info( fieldNameData1, fieldNameData2 );
   };

Grid formatting with style sheet

Hi All,

I'm using below code for displaying grid

*******************************************************
function createGrid(myData) {
store = new dojo.data.ItemFileReadStore({jsId: 'jsonStore',data: myData});
ddata = new dojox.grid.data.DojoData(null,store,{jsId: 'model', clientSort: true,query: { empId: '*' }});

// create the actual grid
grid = new dojox.Grid({id: "OurGrid", model: ddata, onRowMouseOver: keepPopup});
// integrate the grid to the site's DOM
dojo.byId("gridContainer").appendChild(grid.domNode);
// define the layout

Secondary Sort

Is there any way to do a secondary sort with the dojox.grid? I am using a Table as my model.
I use grid.setSortIndex(1, false) to set the sort index programatically, but want to set a secondary sort on another columns. Is this possible? If so, how?

Thanks,Mary

Sort Grid by Selected Rows

Hello!

I'm trying to sort my grid based on selected rows. That is, I want all the selected rows to sort together at the top of the grid. Can anyone please provide me with some tips to make this happen?

Should I create a field/cell to hold a boolean value that is determined on selection and sort by that (like a checkbox)?

Any help is greatly appreciated.

Thanks,
-Tommy

[Q]dijit form and dojo/method event handlers defined in a string for setContent

I am defining an edit box and and a button
declaratively. However the declaration is in the Javascript string.

Then I send the decloration to the contentPane.setContent(str) method
and that works.
However, when I try to add the within the button
the browser's parser rejects the whole HTML page as invalid.

var declarative_forms_str=" \
Lookup \

How to get distinct column values

How can I get distinct column values from a grid? Or can I build a query that will eliminate duplicates on the data store?

Zend Framework JSON-RPC service + dojo.data + dojox.grid?

I'm trying to figure out how to plug in a JSON-RPC service with a grid.

There doesn't seem to be a dojo.data store for json-rpc, however all the plumbing is there for doing the rpc calls. Anyone have suggestions on how to go about this?

My service controller (Zend Framework) looks something like this:

public function jsonAction ()
{
$server = new Zend_Json_Server();
$server->setClass("MyClass_RPC_" . $this->_getParam('class'));
$server->setAutoEmitResponse(true);
if ('GET' == $_SERVER['REQUEST_METHOD']) {

Using MODEL for subgrid

I am trying to have a subgrid in main grid, so basically my main grid has a model object which embeds data variable, as i pass data. so when i had a look to the subgrid implementation i am not sure how can i set model for subgrid, as each row has a definitive structure, and secondly my subgrid will have different models means different data sets for different row's , i am bit confused, can anyone suggest me better approach where i can have a main grid and onclick to the [+] sign i load the subgrid dynamically and set the contents unless the next [+] for next row is created.

Syndicate content