[Dojo-interest] DataGrid row background color

Mustafa AlKubaisi mmmshebli at gmail.com
Thu Jun 26 18:11:58 EDT 2014


Ok Guys, i figured it out, just in case someone need to implement the same
feature, here is the code:

var mustafa = new Deferred();
				mustafa.resolve(self.documentsGrid.startup());
				mustafa.then(function(){
				var cssSelector = '#documentsViewerGrid';
					query(cssSelector).on('.dojoxGridRow:click',function(evt){
					evt.preventDefault();
					var node = evt.target.parentNode;
					node.setAttribute("style", "background-color:red;");
					});
				});
the grid name is documentsGrid , and i used deferreds because the rows get
loaded the last thing , so just put this code in startup method is not
enough.
you can use the same exact query as all nodes is within dojo implementation,
and there is reason to use getParent , if interested i can give you more
details why.



--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/DataGrid-row-background-color-tp4002834p4002850.html
Sent from the Dojo Toolkit mailing list archive at Nabble.com.


More information about the Dojo-interest mailing list