javascript - Dojo: for each row in a grid, have a button that when clicked shows more information from the data store -


this proving surprisingly difficult.

suppose have grid displays name , size of files.

information loaded json file instance of dojo/store/memory , key attributes presented in grid. how include button on each row of grid, when clicked, displays more attributes file? these attributes stored in dojo/store/memory.

right have row in grid:

    {name:"more", field:"id", formatter: buttonformatter, datatype:"string", noresize: true, width: "120px"} 

and attempted pass id button using formatter:

    var buttonformatter = function(invalue){         var newbutton = new button({             label: "details",             onclick: function(invalue){                 alert("more information " + invalue + "  goes here");             }         });         return newbutton;     } 

this doesn't work however.

the difficulties, far can tell, are:
1) associating each specific button specific file store
2) giving onclick javascript access data store

thanks help! tristan

you can use dojo-data-type-event attach point operation. corresponding method in grid widget instance show more attributes in different style tooltip,append,dialog , etc need


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -