<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5638367269574450993</id><updated>2011-11-27T20:00:46.145-03:30</updated><category term='firefox'/><category term='Ext.menu.Manager  buttongroup  extjs sencha'/><category term='bookmarks'/><category term='extjs sencha menu button hover'/><category term='ext combobox'/><title type='text'>Andy's Ajax .Net and Ext</title><subtitle type='html'>Thoughts and code examples concerning ExtJS, .Net, Javascript and Ajax.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ajaxnetext.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ajaxnetext.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>amackay99@gmail.com</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>19</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5638367269574450993.post-1580826004329342823</id><published>2011-09-01T08:25:00.003-02:30</published><updated>2011-09-01T08:41:35.500-02:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='extjs sencha menu button hover'/><title type='text'>HoverButton</title><content type='html'>I found a nice hoverbutton extension at :&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.lustforge.com/2011/07/06/open-extjs-menu-on-mouseover/"&gt;http://www.lustforge.com/2011/07/06/open-extjs-menu-on-mouseover/&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It extends the button class so that a mouseover will cause the menu to expand.   I updated for Extjs 4.0.   I also found that the expand would only work when mousing over the down-arrow icon so I modified it to use 'mouseover' and 'mouseout' events.   This now allows the menu to expand when the mouse is anywhere over the button.    &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;/**&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;* Add autoShow on mouseover option to buttons with menus&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;* @copyright LustForge.com 2011&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;* @author J.Lust&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;* @version ExtJs 3.3.4&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;*/&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;Ext.define('Ext.HoverButton', {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; extend: 'Ext.Button',&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; alias: 'widget.hoverButton',&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; // hide task properties and helpers&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; hideTask: null,&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; hideTaskMs: 250, // timeout in ms&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; hideTaskFn: function () {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (this.hideTask !== null) {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.hideTask.cancel();&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.hideTask = new Ext.util.DelayedTask(this.hideMenu, this);&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.hideTask.delay(this.hideTaskMs);&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; },&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; // extend init props&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; initComponent: function () {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // add hide/show, if this is a button with menu&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var config = {}, menuConfig = {};&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (Ext.isDefined(this.initialConfig.menu)) {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; config = {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; listeners: {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // &amp;nbsp; &amp;nbsp;menutriggerover: {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mouseover: {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fn: function (b) {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // console.log('menutriggerOver');&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; b.showMenu();&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; scope: this&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mouseout: {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // menutriggerout: {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fn: function (b) {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // &amp;nbsp;console.log('menutriggerOut');&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.hideTaskFn();&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; scope: this&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // add listeners to see if user is over extended menu list&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; menuConfig = {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; listeners: {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // if mousing over menu list, disable timeout&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mouseover: {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fn: function (b) {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // cancel hide if they went away and came back&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (this.hideTask !== null) {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // &amp;nbsp; &amp;nbsp; &amp;nbsp; console.log('menu mouseOver');&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.hideTask.cancel();&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.hideTask = null;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; scope: this&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // on mousing out of menu list, resume timeout&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mouseout: {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fn: function (b) {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // &amp;nbsp; &amp;nbsp;console.log('menu mouseOut');&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.hideTaskFn();&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; scope: this&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Ext.apply(this.menu, menuConfig);&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // apply config&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Ext.apply(this, Ext.apply(this.initialConfig, config));&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // call parent&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Ext.HoverButton.superclass.initComponent.apply(this, arguments);&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;});&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;I use it as a 'more' dropdown box in my toolbar as follows:&lt;/div&gt;&lt;blockquote&gt;&lt;div&gt;&lt;br /&gt;, {&lt;br /&gt;text: 'More',&lt;br /&gt;xtype: 'hoverButton',&lt;br /&gt;menu: {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;xtype: 'menu',&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;	&lt;/span&gt;items: {&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;		&lt;/span&gt;xtype: 'buttongroup',&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;		&lt;/span&gt;columns: 1,&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;		&lt;/span&gt;defaults: {&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;			&lt;/span&gt;xtype: 'button',&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;			&lt;/span&gt;scale: 'large',&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;			&lt;/span&gt;iconAlign: 'left'&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;		&lt;/span&gt;},&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;		&lt;/span&gt;items: [&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;		&lt;/span&gt;{&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;			&lt;/span&gt;text: 'option1',&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;			&lt;/span&gt;cls: 'x-btn-text-icon',&lt;br /&gt;etc......&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5638367269574450993-1580826004329342823?l=ajaxnetext.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ajaxnetext.blogspot.com/feeds/1580826004329342823/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5638367269574450993&amp;postID=1580826004329342823' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default/1580826004329342823'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default/1580826004329342823'/><link rel='alternate' type='text/html' href='http://ajaxnetext.blogspot.com/2011/09/i-found-nice-hoverbutton-extension-at.html' title='HoverButton'/><author><name>amackay99@gmail.com</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5638367269574450993.post-3758586134265130649</id><published>2011-09-01T08:19:00.003-02:30</published><updated>2011-09-01T08:22:53.715-02:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ext.menu.Manager  buttongroup  extjs sencha'/><title type='text'>Buttongroup menu hiding</title><content type='html'>One unique behaviour of a buttongroup in a menu is that it will not 'hide' or collapse until the user clicks elsewhere.  So how do you hide the buttongroup?  Easy once you know how.  Just do this call:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt; Ext.menu.Manager.hideAll();&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;This will hide all open menus.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5638367269574450993-3758586134265130649?l=ajaxnetext.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ajaxnetext.blogspot.com/feeds/3758586134265130649/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5638367269574450993&amp;postID=3758586134265130649' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default/3758586134265130649'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default/3758586134265130649'/><link rel='alternate' type='text/html' href='http://ajaxnetext.blogspot.com/2011/09/buttongroup-menu-hiding.html' title='Buttongroup menu hiding'/><author><name>amackay99@gmail.com</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5638367269574450993.post-2010137356721893007</id><published>2009-08-20T12:42:00.006-02:30</published><updated>2009-08-20T14:04:12.447-02:30</updated><title type='text'>WPF binding to a typed dataset</title><content type='html'>I having been learning WPF and came across a problem trying to use typed datasets and the Visual Studio wizard for generating the xsd file.  Once I created the dataset (xsd file) I couldn't find a way to actually bind it to anything or get the data.   After some trial and error, the following seems to work well.  I am populating an Xceed datagrid but the code is generic.   I want to provide a 'blank' row for adding new records as well.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;  public partial class App : Application&lt;br /&gt;    {&lt;br /&gt;        protected override void OnStartup(StartupEventArgs e)&lt;br /&gt;        {&lt;br /&gt;&lt;br /&gt;             // Customers table (dataset is 'dsCustomers' as found in the ...Designer.cs file)&lt;br /&gt;             m_customer = new dsCustomers.TblCustomers();&lt;br /&gt;             //Create data adapter and fill from the source table&lt;br /&gt;            (new dsCustomersTableAdapters.TblCustomersTableAdapter()).Fill(m_customer );&lt;br /&gt;     &lt;br /&gt;            m_customer.Rows.Add(m_customer.NewRow());  // Add a blank row&lt;br /&gt;&lt;br /&gt;           // Likewise for Address table (more verbose)&lt;br /&gt;&lt;br /&gt;            m_Addresses= new dsCustomers.TblAddresses();&lt;br /&gt;             dsCustomersTableAdapters.TblAddressesTableAdapter tblAdap = new dsCustomersTableAdapters.TblAddressesTableAdapter();&lt;br /&gt;&lt;br /&gt;            tblAdap.Fill(m_Addresses);&lt;br /&gt;            DataRow dr = m_Addresses.NewRow();  // generate a new row&lt;br /&gt;            m_Addresses.Rows.Add(dr);  // append back to the table&lt;br /&gt;&lt;br /&gt;            base.OnStartup(e);&lt;br /&gt;        }&lt;br /&gt;       &lt;br /&gt;        private dsCustomers.TblCustomers m_customer ;&lt;br /&gt;&lt;br /&gt;        public dsCustomers.TblCustomers Customers &lt;br /&gt;        {&lt;br /&gt;            get&lt;br /&gt;            {&lt;br /&gt;                return m_customer ;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;       private dsCustomers.TblAddresses m_Addresses;&lt;br /&gt;&lt;br /&gt;        public dsCustomers.TblAddresses Addresses&lt;br /&gt;        {&lt;br /&gt;            get&lt;br /&gt;            {&lt;br /&gt;                return m_Addresses;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;   &lt;br /&gt;     &lt;br /&gt;   &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Meanwhile the xaml is ..&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;        &amp;lt Grid.Resources&amp;gt&lt;br /&gt;&lt;br /&gt;            &amp;lt xcdg:DataGridCollectionViewSource&lt;br /&gt;                    x:Key="Tblmycustomers"&lt;br /&gt;                    Source="{Binding Source={x:Static Application.Current},&lt;br /&gt;                    Path= &lt;b&gt;Customers&lt;/b&gt;}"/ &amp;gt&lt;br /&gt;&lt;br /&gt;            &amp;lt xcdg:DataGridCollectionViewSource&lt;br /&gt;                    x:Key="TblLocations"&lt;br /&gt;                AutoCreateForeignKeyDescriptions="true"   &lt;br /&gt;                Source="{Binding Source={x:Static Application.Current},&lt;br /&gt;                    Path= &lt;b&gt;Addresses&lt;/b&gt;}"/ &amp;gt&lt;br /&gt;        &amp;lt /Grid.Resources &amp;gt&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5638367269574450993-2010137356721893007?l=ajaxnetext.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ajaxnetext.blogspot.com/feeds/2010137356721893007/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5638367269574450993&amp;postID=2010137356721893007' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default/2010137356721893007'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default/2010137356721893007'/><link rel='alternate' type='text/html' href='http://ajaxnetext.blogspot.com/2009/08/wpf-binding-to-typed-dataset.html' title='WPF binding to a typed dataset'/><author><name>amackay99@gmail.com</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5638367269574450993.post-5160676113162060144</id><published>2009-01-17T22:16:00.000-03:30</published><updated>2009-01-17T22:29:40.353-03:30</updated><title type='text'>Cookies and the problems they cause</title><content type='html'>I often use the Ext state manager to automatically manage cookies for Ext widgets.  This allows the application to 'remember' user settings such as window size, location etc.  The only code required is :&lt;br /&gt;&lt;pre&gt;&lt;br /&gt; Ext.state.Manager.setProvider(new Ext.state.CookieProvider());&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This is very powerful and simple to add to an application BUT it can cause a mountain of problems.  I've been bitten twice.  What sometimes happens is the cookies can end up being applied to the incorrect objects.   It seems that when Ext creates DOM objects, if there is no explicit dom id, an id is created.   This id is used by the cookie 'manager' to reference the objects that are monitored.  This is fine, except when items are added or removed from the application.   The auto generated id numbers are changed and the cookies are now referencing different objects.   This problem occurs during the development process or when new application versions are released (widgets are added and removed).&lt;br /&gt;&lt;br /&gt;How do we avoid this?  Its quite simple.  Just assign explicit id properties to ALL items you create.   Just do this as a 'best practice'.  By doing this, there are no auto generated ids and no danger of the manager referencing the wrong objects.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5638367269574450993-5160676113162060144?l=ajaxnetext.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ajaxnetext.blogspot.com/feeds/5160676113162060144/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5638367269574450993&amp;postID=5160676113162060144' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default/5160676113162060144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default/5160676113162060144'/><link rel='alternate' type='text/html' href='http://ajaxnetext.blogspot.com/2009/01/cookies-and-problems-they-cause.html' title='Cookies and the problems they cause'/><author><name>amackay99@gmail.com</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5638367269574450993.post-5428697891944016623</id><published>2009-01-17T21:57:00.000-03:30</published><updated>2009-01-17T22:14:38.220-03:30</updated><title type='text'>Using Ext.extend to extend user classes.</title><content type='html'>While learning javascript, I've fallen into the copy/paste trap of code creation.  Rather than using OO constructs, I often copy a block of code, paste it and modify it slightly.   This is bad bad bad so I thought I would figure out how to use Ext.Extend to take my own base class and use inheritance to extend the base functionality.  There is no rocket science here but I can use this now as a template for inheriting.  Code ...&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;// ----------- Base class (extending 'object' )  ------------------&lt;br /&gt;   genericBase = Ext.extend(Object, {&lt;br /&gt;       basevar1: 1,&lt;br /&gt;       constructor: function(args) {&lt;br /&gt;           this.basevar1 = 2;&lt;br /&gt;       },&lt;br /&gt;&lt;br /&gt;       baseFunc1: function(testArg) {&lt;br /&gt;           alert("test Arg is " + testArg + " basevar = " + this.basevar1);&lt;br /&gt;       }&lt;br /&gt;   });&lt;br /&gt;&lt;br /&gt;// ----------- Derived class (extending 'genericBase'class ) -------&lt;br /&gt;   genericDerived = Ext.extend(genericBase, {&lt;br /&gt;       derVar: 444,  // class property&lt;br /&gt;       constructor: function(args) {&lt;br /&gt;           // Call the base constructor&lt;br /&gt;           genericDerived.superclass.constructor.call(this, args);&lt;br /&gt;       },&lt;br /&gt;&lt;br /&gt;       derivedFunc1: function(testArg) {&lt;br /&gt;           alert("derivedFunc1 called " + testArg );&lt;br /&gt;       },&lt;br /&gt;       getBaseval: function() {&lt;br /&gt;           return this.basevar1;&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;   });&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   //   -------- Code to instantiate and test the classes&lt;br /&gt;&lt;br /&gt;// First, create the object&lt;br /&gt;   var myobj = new genericDerived({prop1: '123', prop2: 'abc' }); &lt;br /&gt; &lt;br /&gt;// displays basevar with a get method&lt;br /&gt;   alert("Derived class, method call ==&gt;" + myobj.getBaseval());  &lt;br /&gt;&lt;br /&gt;// also displays basevar, but with direct property reference&lt;br /&gt;   alert("explicit reference to property basevar1 ==&gt; " + myobj.basevar1); &lt;br /&gt;&lt;br /&gt;   myobj.baseFunc1('Calling base method');&lt;br /&gt;   myobj.derivedFunc1('Calling derived class method');&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5638367269574450993-5428697891944016623?l=ajaxnetext.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ajaxnetext.blogspot.com/feeds/5428697891944016623/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5638367269574450993&amp;postID=5428697891944016623' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default/5428697891944016623'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default/5428697891944016623'/><link rel='alternate' type='text/html' href='http://ajaxnetext.blogspot.com/2009/01/while-learning-javascript-ive-fallen.html' title='Using Ext.extend to extend user classes.'/><author><name>amackay99@gmail.com</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5638367269574450993.post-1913106394115306963</id><published>2008-12-02T21:38:00.001-03:30</published><updated>2008-12-03T20:24:02.162-03:30</updated><title type='text'>How to modify Ext tooltips dynamically</title><content type='html'>I have a requirement to dynamically change tool-tips as content gets refreshed and modified.  There were a couple of suggestions in the forums, but the following works great for me:&lt;br /&gt;&lt;pre&gt;var mydom = Ext.get('mydomelement');       // get element&lt;br /&gt;var tip = Ext.getCmp(mydom.dom.id + '_tip');  //get element's tooltip&lt;br /&gt;&lt;br /&gt;if ( tip  )   {// tool tip already exists, so modify&lt;br /&gt;&lt;br /&gt;   tip.title = 'new title';&lt;br /&gt;   tip.html = 'new text';&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;else {   // tip does not exist.  Create it with unique id.&lt;br /&gt;&lt;br /&gt; new Ext.ToolTip({&lt;br /&gt;     target: mydom.dom.id,&lt;br /&gt;     id: mydom.dom.id + '_tip',&lt;br /&gt;     title: 'title here', html: 'original text'&lt;br /&gt;     });&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;I am giving every tooltip a unique id, based on the id of the dom element it decorates.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5638367269574450993-1913106394115306963?l=ajaxnetext.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ajaxnetext.blogspot.com/feeds/1913106394115306963/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5638367269574450993&amp;postID=1913106394115306963' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default/1913106394115306963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default/1913106394115306963'/><link rel='alternate' type='text/html' href='http://ajaxnetext.blogspot.com/2008/12/how-to-modify-ext-tooltips-dynamically.html' title='How to modify Ext tooltips dynamically'/><author><name>amackay99@gmail.com</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5638367269574450993.post-8779065056236034526</id><published>2008-11-26T21:56:00.000-03:30</published><updated>2008-11-26T22:22:11.623-03:30</updated><title type='text'>Creating Charts and Graphs</title><content type='html'>Microsoft has released a &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=130f7986-bf49-4fe5-9ca8-910ae6ea442c&amp;amp;displaylang=en"&gt;chart control&lt;/a&gt; with .net framework 3.5.  I believe it is licensed from Dundas and certainly has the Dundas look and feel.  The functionality looks good but in my travels there are two graphing systems I have used, one for the client side and one for the server side.&lt;br /&gt;&lt;br /&gt;On the server side I usually pre-generate graphs so that if there is lots of user traffic, database access is minimized.   The client does not get one of those pesky '&lt;span style="font-style: italic;"&gt;loading data&lt;/span&gt;' messages.  The server side graphic files are recreated on a periodic basis, with the web page referencing the image file (PNG, GIF etc).   The package I have used is &lt;a href="http://zedgraph.org/wiki/index.php?title=Main_Page"&gt;ZedGraph.&lt;/a&gt;  It is open source however there doesn't seem to have been any project activity in over a year.  It is easy to use and I had the samples up and running in about 5 minutes.&lt;br /&gt;&lt;br /&gt;On the client side interactivity rules.  There are a few open source packages around ( &lt;a href="http://code.google.com/p/flot/"&gt;flot&lt;/a&gt;, &lt;a href="http://www.liquidx.net/plotkit/"&gt;plotkit&lt;/a&gt; ) but they are fairly basic.   I paid the few dollars for &lt;a href="http://www.ejschart.com/index.php"&gt;Emprise Charts&lt;/a&gt; and have been very happy.  The interactive features are great, especially the zoom and mouse-over features.  I believe there is a free version that gives limited use and a watermark on graph backgrounds.  I highly recommend Emprise Charts.   I've combined Ext, .Net web services and Emprise in a complete solution that is quite slick.   I basically loop through an Ext datastore and load up the graph points.&lt;br /&gt;&lt;br /&gt;Deciding on whether to render on server or on client really depends on what your users will be looking at.  If your db queries are expensive in terms of time to get the data, server side is best however if you can do it, client side rendering with Ajax will give your users a better interactive experience.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5638367269574450993-8779065056236034526?l=ajaxnetext.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ajaxnetext.blogspot.com/feeds/8779065056236034526/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5638367269574450993&amp;postID=8779065056236034526' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default/8779065056236034526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default/8779065056236034526'/><link rel='alternate' type='text/html' href='http://ajaxnetext.blogspot.com/2008/11/creating-charts-and-graphs.html' title='Creating Charts and Graphs'/><author><name>amackay99@gmail.com</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5638367269574450993.post-5839735509374363829</id><published>2008-09-17T11:35:00.000-02:30</published><updated>2008-09-17T11:44:08.884-02:30</updated><title type='text'>Using Intellisense with Visual Web Dev Express</title><content type='html'>I use Visual Web Developer Express - 2008 for all my development now, although most of my projects are still .NET 2.0.&lt;br /&gt;&lt;br /&gt;Recently I discovered how to use javascript intellisense which helps a ton.   You need to have SP1 of Visual Web Developer :&lt;br /&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=7B0B0339-613A-46E6-AB4D-080D4D4A8C4E&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyId=7B0B0339-613A-46E6-AB4D-080D4D4A8C4E&amp;amp;displaylang=en&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Once you have SP1, just add the following to the top of each JS file:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;/// &lt; reference path="lib/ext/adapter/ext/ext-base.js"&gt;&lt;br /&gt;/// &lt; reference path="lib/ext/ext-all-debug.js"&gt;&lt;br /&gt;/// &lt; reference path="myotherfile.js"&gt;&lt;br /&gt;&lt;/reference&gt;&lt;/reference&gt;&lt;/reference&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Not only do I get Ext intellisense, but also for objects from my own javascript files.  Works great!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5638367269574450993-5839735509374363829?l=ajaxnetext.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ajaxnetext.blogspot.com/feeds/5839735509374363829/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5638367269574450993&amp;postID=5839735509374363829' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default/5839735509374363829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default/5839735509374363829'/><link rel='alternate' type='text/html' href='http://ajaxnetext.blogspot.com/2008/09/using-intellisense-with-visual-web-dev.html' title='Using Intellisense with Visual Web Dev Express'/><author><name>amackay99@gmail.com</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5638367269574450993.post-2008968066425720645</id><published>2008-04-15T12:07:00.000-02:30</published><updated>2008-04-15T12:33:56.198-02:30</updated><title type='text'>Minimizing server requests : multiple tables per request</title><content type='html'>&lt;span style="font-family:arial;"&gt;The following example shows how to return multiple tables in one ajax request.   Of course, minimizing server traffic allows for a snappy client experience.  My requirement was to retrieve two data tables in a single server call.   The Web service makes two distinct SQL calls, merges the datasets on the server and returns an XML document.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;The client establishes a single data connection and then reads the results into two separate data stores using MemoryProxy data stores. The net effect is exactly the same result as making two (expensive) server requests.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Server Side&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt; [WebMethod]&lt;br /&gt;public XmlDocument getPlannerDetail(String plannerid)&lt;br /&gt;{&lt;br /&gt;// SQL Query #1&lt;br /&gt;String str = " select * from TblPlanners where plannerid = '" + plannerid + "'";&lt;br /&gt;Filldt("plannerDetail", (int)Servers.nweb1, str);&lt;br /&gt;&lt;br /&gt;DataSet localds = new DataSet();&lt;br /&gt;localds.Merge(dt);&lt;br /&gt;&lt;br /&gt;// SQL Query #2&lt;br /&gt;str = "select plannerid_Owner, plannerid_Changer  from TblPlanners_permission where plannerid_Owner = '" + plannerid + "'";&lt;br /&gt;Filldt("Permits", (int)Servers.nweb1, str);&lt;br /&gt;&lt;br /&gt;localds.Merge(dt);&lt;br /&gt;&lt;br /&gt;XmlDocument doc = new XmlDocument();&lt;br /&gt;xmlDoc.LoadXml(localds.GetXml());&lt;br /&gt;return xmlDoc;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;span style="font-weight: bold;"&gt;Client Side&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;pre&gt;var getdata = new Ext.data.Connection();&lt;br /&gt;&lt;br /&gt;getdata.request({&lt;br /&gt;  url: "Service.asmx/getPlannerDetail",&lt;br /&gt;     params: {&lt;br /&gt;     plannerid: '123'&lt;br /&gt;     },&lt;br /&gt;  method: 'POST',&lt;br /&gt;  scope: this,&lt;br /&gt;&lt;br /&gt; callback: function(options, success, response){&lt;br /&gt; &lt;br /&gt;if (success) {&lt;br /&gt; var xml = response.responseXML;&lt;br /&gt;&lt;br /&gt; dsDetails = new Ext.data.Store({&lt;br /&gt;  proxy: new Ext.data.MemoryProxy(xml),&lt;br /&gt;  reader: new Ext.data.XmlReader({&lt;br /&gt;        record: 'plannerDetail',id: 'plannerid'&lt;br /&gt;       }, ['plannerid', 'centerid', 'LongName', 'DefaultViewRange'])&lt;br /&gt;    });&lt;br /&gt;  &lt;br /&gt;  dsPermits = new Ext.data.Store({&lt;br /&gt;   proxy: new Ext.data.MemoryProxy(xml),&lt;br /&gt;    reader: new Ext.data.XmlReader({&lt;br /&gt;  record: 'Permits',&lt;br /&gt;   id: 'plannerid_Owner'&lt;br /&gt;     }, ['plannerid_Owner', 'plannerid_Changer'])&lt;br /&gt;    });&lt;br /&gt;&lt;br /&gt; dsDetails.load();&lt;br /&gt; dsPermits.load();&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;});&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5638367269574450993-2008968066425720645?l=ajaxnetext.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ajaxnetext.blogspot.com/feeds/2008968066425720645/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5638367269574450993&amp;postID=2008968066425720645' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default/2008968066425720645'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default/2008968066425720645'/><link rel='alternate' type='text/html' href='http://ajaxnetext.blogspot.com/2008/04/minimizing-server-requests-multiple.html' title='Minimizing server requests : multiple tables per request'/><author><name>amackay99@gmail.com</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5638367269574450993.post-3383275069609758201</id><published>2007-11-16T12:26:00.000-03:30</published><updated>2007-11-16T13:38:23.518-03:30</updated><title type='text'>How To : Send Ext datastore to .Net dataset with XML</title><content type='html'>There are many examples of using the Ext xmlreader to get data xml data into a datastore on the client, however I wanted to do the reverse and allow my CRUD application to update the modified datastore back to the server, updated with user changes.&lt;br /&gt;&lt;br /&gt;On the client I created a 'serialize' function to convert the datastore to XML, and then did an Ext.data.Connection to post the data to the server.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt; &lt;span style="font-weight: bold;"&gt;SaveDStoServer&lt;/span&gt; :function(ds) {&lt;br /&gt;&lt;br /&gt; var prog = Ext.MessageBox.wait("Saving data to server");&lt;br /&gt;&lt;br /&gt; var ds_serialized= myscope.SerializeDS(ds);&lt;br /&gt;&lt;br /&gt; var serv= new Ext.data.Connection();&lt;br /&gt;  serv.request({&lt;br /&gt;   url: "Service.asmx/Savedata",&lt;br /&gt;     params: {myID: 123, datastore:ds_serialized},&lt;br /&gt;   method: 'POST',&lt;br /&gt;     scope: this,&lt;br /&gt;     callback: function(options, success, response){&lt;br /&gt;         prog.hide();&lt;br /&gt;              if (success){&lt;br /&gt;        var xml = response.responseXML;&lt;br /&gt;                      }&lt;br /&gt;             else    {&lt;br /&gt;                  if( response.status == -1 )&lt;br /&gt;        Ext.MessageBox.alert('Error on save','Server timeout')&lt;br /&gt;                  else&lt;br /&gt;                      Ext.MessageBox.alert('Error on save',response.responseText)&lt;br /&gt;                     }&lt;br /&gt;                 }&lt;br /&gt;         });&lt;br /&gt;         },&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;span style="font-weight: bold;"&gt;SerializeDS &lt;/span&gt;: function (ds) {&lt;br /&gt;&lt;br /&gt;  var columns = ds.fields.keys;  // get columns from data store&lt;br /&gt;  var retdata ="&amp;amp;ltNewDataSet&gt;";&lt;br /&gt;&lt;br /&gt;  ds.each ( function (rec) {&lt;br /&gt;    retdata +="&amp;amp;lt/datarow&gt;";&lt;br /&gt;   for (var i=0; i&lt; columns.length; ++ i)                &lt;br /&gt;retdata += "&lt;" + columns[i] + "&gt;" + rec.data[columns[i]]&lt;br /&gt;+ "&amp;amp;lt/" + columns[i] + "&gt;"&lt;br /&gt;   retdata += "&amp;amp;lt/datarow&gt;";&lt;br /&gt;      });&lt;br /&gt;&lt;br /&gt;retdata += "&amp;amp;lt/NewDataSet&gt;";&lt;br /&gt;&lt;br /&gt;return ""+retdata;&lt;br /&gt;  },&lt;br /&gt; },&lt;br /&gt;&lt;/datarow&gt;&lt;/newdataset&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;On the &lt;span style="font-weight: bold;"&gt;server side&lt;/span&gt; web service method, I create an XML document, create a reader and then read into the dataset. I tried using 'XMLdatadocument' but if did not seem able to create a schema and had an empty dataset. This may not be the most efficient way but it seems to work well.  As always, be aware of web service parameter verification to prevent  SQL injection.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;[WebMethod]&lt;br /&gt;public String &lt;span style="font-weight: bold;"&gt;Savedata &lt;/span&gt;(String SchID, String datastore)&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt; DataSet ds = new DataSet();&lt;br /&gt; XmlDocument doc = new XmlDocument();&lt;br /&gt;&lt;br /&gt;  // Load the xml into an XmlDocument&lt;br /&gt; doc.LoadXml(datastore);&lt;br /&gt; StringReader sreader = new StringReader(doc.DocumentElement.OuterXml);&lt;br /&gt;&lt;br /&gt; ds.ReadXml(sreader);&lt;br /&gt;&lt;br /&gt; foreach (DataRow row in dsCraft.Tables[0].Rows)&lt;br /&gt; {&lt;br /&gt;System.Diagnostics.Debug.WriteLine(row[0] + " " + row[1]);&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; return "success";&lt;br /&gt;}&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5638367269574450993-3383275069609758201?l=ajaxnetext.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ajaxnetext.blogspot.com/feeds/3383275069609758201/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5638367269574450993&amp;postID=3383275069609758201' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default/3383275069609758201'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default/3383275069609758201'/><link rel='alternate' type='text/html' href='http://ajaxnetext.blogspot.com/2007/11/how-to-send-ext-datastore-to-net.html' title='How To : Send Ext datastore to .Net dataset with XML'/><author><name>amackay99@gmail.com</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5638367269574450993.post-2600861587124283572</id><published>2007-09-03T22:21:00.000-02:30</published><updated>2007-09-03T22:47:06.233-02:30</updated><title type='text'>.Net Web Service with Ext data store</title><content type='html'>After using Ajaxpro with a couple of applications, I thought I should look into a more standardized approach for Ext/.Net integration.  Specifically, how to bind SQL data on the server to a Ext data store.  Ajaxpro's future seems uncertain.&lt;br /&gt;&lt;br /&gt;First the &lt;span style="font-weight: bold;"&gt;Web Service&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-size:85%;"&gt;[WebMethod]&lt;br /&gt;   public XmlDocument getSites(String Site, String Type, String Disc, String Manu, String query, String limit, String start, String callback)&lt;br /&gt;   {&lt;br /&gt;&lt;br /&gt;    XmlDocument xmlDoc = new XmlDocument();&lt;br /&gt;    DataSet ds = new DataSet();&lt;br /&gt;    String sql = " Select SITE as col1 from mytable where site = " + Site;&lt;br /&gt;&lt;br /&gt;    // create a connection&lt;br /&gt;    SqlDataAdapter oda = new SqlDataAdapter(sql, connStringSQL);&lt;br /&gt;    oda.Fill(ds);&lt;br /&gt;    xmlDoc.LoadXml(ds.GetXml());&lt;br /&gt;    return xmlDoc;&lt;br /&gt;   }&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;And the &lt;span style="font-weight: bold;"&gt;Ext code, &lt;/span&gt;with the .Net xml doc having 'Table' as record:&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;      // parameters that get passed&lt;br /&gt;       var inparms ={query: '', start: '', limit: '', callback: '', Site: '', Type: '', Disc: '', Manu: ''};&lt;br /&gt;&lt;br /&gt;          var xmlread = new Ext.data.XmlReader({    record: 'Table' }, [&lt;br /&gt;              // set up the fields mapping into the xml doc&lt;br /&gt;              {name: 'col1'}  ]);&lt;br /&gt;&lt;br /&gt;// create the Data Store&lt;br /&gt;var dsSites = new Ext.data.Store({&lt;br /&gt;// load using HTTP&lt;br /&gt;proxy: new Ext.data.HttpProxy({method:'POST',url: 'Service.asmx/getSites'}),&lt;br /&gt;reader: xmlread,   params: inparms });&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;dsSites.load( {   params : inparms});&lt;br /&gt;or&lt;br /&gt;dsSites.load( {params : {query: '', start: '', limit: '', callback: '', Site: 'London', Type: '', Disc: '', Manu: ''});&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5638367269574450993-2600861587124283572?l=ajaxnetext.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ajaxnetext.blogspot.com/feeds/2600861587124283572/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5638367269574450993&amp;postID=2600861587124283572' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default/2600861587124283572'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default/2600861587124283572'/><link rel='alternate' type='text/html' href='http://ajaxnetext.blogspot.com/2007/09/net-web-service-with-ext-data-store.html' title='.Net Web Service with Ext data store'/><author><name>amackay99@gmail.com</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5638367269574450993.post-174902698002702113</id><published>2007-08-14T09:34:00.000-02:30</published><updated>2007-08-14T09:57:46.476-02:30</updated><title type='text'>Ext Combobox example... the very basics</title><content type='html'>I created a fairly sophisticated Ext application with editable grids and layouts several months ago.   I now have a requirement for a new application.   I thought I would start anew, resisting the temptation to just copy my old code and start modifying.   I wanted to start with a clean slate but I was surprised how difficult it was to get started.&lt;br /&gt;&lt;br /&gt;After some frustration with documentation and examples trying to get a simple combobox created, I distilled one of the  &lt;a href="http://extjs.com/deploy/ext/examples/form/combos.html"&gt;examples&lt;/a&gt; down to the essentials.   You should be able to install Ext, copy/paste the code below and you should be good to go.  There are just two files you are creating, a HTML and ext_main.js...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(51, 102, 255);font-size:130%;" &gt;HTML:&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt;my combo&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;link rel="stylesheet" type="text/css" href="lib/ext/resources/css/ext-all.css" /&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!-- GC --&amp;gt; &amp;lt;!-- LIBS --&amp;gt; &lt;br /&gt;&amp;lt;script type="text/javascript" src="lib/ext/adapter/ext/ext-base.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script type="text/javascript" src="lib/ext/ext-all.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script type="text/javascript" src="&lt;span style="font-weight: bold;"&gt;ext_main.js&lt;/span&gt;"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;h1&amp;gt;Simple Combo&amp;lt;/h1&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&amp;lt;input type="text" id="local-states" size="20"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(51, 102, 255);font-size:130%;" &gt;Code in ext_main.js:&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;pre&gt;&lt;pre&gt;&lt;br /&gt;/*&lt;br /&gt;* Ext JS Library 1.1&lt;br /&gt;* Copyright(c) 2006-2007, Ext JS, LLC.&lt;br /&gt;* licensing@extjs.com&lt;br /&gt;*&lt;br /&gt;* http://www.extjs.com/license&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;// some data used in the examples&lt;br /&gt;Ext.namespace('Ext.exampledata');&lt;br /&gt;&lt;br /&gt;Ext.exampledata.states = [&lt;br /&gt;['AL', 'Alabama'],&lt;br /&gt;['AK', 'Alaska'],&lt;br /&gt;['AZ', 'Arizona'],&lt;br /&gt;['AR', 'Arkansas'],&lt;br /&gt;['CA', 'California'],&lt;br /&gt;['CO', 'Colorado'],&lt;br /&gt;['CN', 'Connecticut'],&lt;br /&gt;['DE', 'Delaware'],&lt;br /&gt;['DC', 'District of Columbia'] ];&lt;br /&gt;&lt;br /&gt;var combos = {&lt;br /&gt;init : function(){&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;// simple array store&lt;br /&gt;var store = new Ext.data.SimpleStore({&lt;br /&gt;  fields: ['abbr', 'state'],&lt;br /&gt;  data : Ext.exampledata.states&lt;br /&gt;  });&lt;br /&gt;var cbsite = new Ext.form.ComboBox({&lt;br /&gt;  store: store,&lt;br /&gt;  displayField:'state',&lt;br /&gt;  typeAhead: true,&lt;br /&gt;  mode: 'local',&lt;br /&gt;  triggerAction: 'all',&lt;br /&gt;  emptyText:'Select a state...',&lt;br /&gt;  selectOnFocus:true&lt;br /&gt;  });&lt;br /&gt;&lt;br /&gt;cbsite.applyTo('local-states');&lt;br /&gt;&lt;br /&gt;}};&lt;br /&gt;Ext.onReady(combos.init, combos);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5638367269574450993-174902698002702113?l=ajaxnetext.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ajaxnetext.blogspot.com/feeds/174902698002702113/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5638367269574450993&amp;postID=174902698002702113' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default/174902698002702113'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default/174902698002702113'/><link rel='alternate' type='text/html' href='http://ajaxnetext.blogspot.com/2007/08/ext-combobox-example-very-basics.html' title='Ext Combobox example... the very basics'/><author><name>amackay99@gmail.com</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5638367269574450993.post-2941586042999255095</id><published>2007-06-09T13:30:00.000-02:30</published><updated>2007-06-09T13:38:45.606-02:30</updated><title type='text'>Teched 2007</title><content type='html'>Some thoughts on the Teched conference:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Very little or no negative discussion of Microsoft technologies.  The talk about Microsoft Live did not once mention 'google'.   I only once heard someone mention a non-Microsoft Ajax framework, when someone in a Q&amp;amp;A mentioned Dojo.   When a presenter is so one sided in their presentation or so narrowly focused, it makes question what is being  resented.  For example, how can someone go on and on about how great the 'Web Developer Toolbar' is and not once mention Firebug?&lt;/li&gt;&lt;li&gt; A subtle implication that the 'buzz' around Ajax is in fact all about Microsoft's ASP.Net Ajax.  Microsoft's framework is supposedly unique in that it uses OO concepts and 'prototype' in the javascript.&lt;/li&gt;&lt;li&gt;Alot of the developer hype was around Silverlight and how it allows developers to write C# code on the web client.  This seems to be Microsofts latest effort for world domination.  There is no way to make money writing javascript libraries, so with Silverlight, the plugin will relegate the browser to the role of a window frame.  If successful, microsoft will then have all web development in C#, selling more copies of Visual Studio... and more $ for Micro$soft.  Scary.&lt;/li&gt;&lt;li&gt;Office seems to be morphing into system for users to create and share rich browser based applications and documents, using Sharepoint.&lt;/li&gt;&lt;li&gt;I find it ironic that while microsoft is talking about the great capabilities of its Ajax toolkit, their Teched website is terrible.  It is full of postbacks, arcane menuing and is not Firefox friendly.  Even the ASP.Net/Ajax site has missed obvious opportunities for Ajax use in its interface.&lt;/li&gt;&lt;li&gt;There were some excellent presentations however.  A couple of these were around security, with real-world examples of how systems have been breached and the implications.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5638367269574450993-2941586042999255095?l=ajaxnetext.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ajaxnetext.blogspot.com/feeds/2941586042999255095/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5638367269574450993&amp;postID=2941586042999255095' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default/2941586042999255095'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default/2941586042999255095'/><link rel='alternate' type='text/html' href='http://ajaxnetext.blogspot.com/2007/06/teched-2007.html' title='Teched 2007'/><author><name>amackay99@gmail.com</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5638367269574450993.post-6642689677624734640</id><published>2007-05-31T09:44:00.000-02:30</published><updated>2007-05-31T10:08:11.100-02:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='bookmarks'/><title type='text'>Browser bookmarks</title><content type='html'>Afraid you'll lose your bookmarks if your disk crashes, or when you  jump to another computer? Some  solutions I have found:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.quickbookmarks.com/"&gt;&lt;span style="font-weight: bold;"&gt;http://www.quickbookmarks.com&lt;/span&gt;&lt;/a&gt;   This is basically an online repository for your bookmarks.  Wherever you are in the world, you can log in and find that obscure bookmark you saved.   The only downside I seen is you have to explicitly define each bookmark with no bulk import feature.&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.mybookmarks.com"&gt;http://www.mybookmarks.com&lt;/a&gt; This page DOES allow importing of bookmarks but I'm not a big fan of the clunky interface.   You just need to export you bookmarks to html (see below) and then import.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Firefox &lt;/span&gt;has a neat bookmark export feature that exports your bookmarks to an html page!  Just go to Bookmarks/Organize and then File/Export and save to an HTML file for backup or stick it on your web page.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5638367269574450993-6642689677624734640?l=ajaxnetext.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ajaxnetext.blogspot.com/feeds/6642689677624734640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5638367269574450993&amp;postID=6642689677624734640' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default/6642689677624734640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default/6642689677624734640'/><link rel='alternate' type='text/html' href='http://ajaxnetext.blogspot.com/2007/05/browser-bookmarks.html' title='Browser bookmarks'/><author><name>amackay99@gmail.com</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5638367269574450993.post-4135307237465544392</id><published>2007-05-23T07:36:00.000-02:30</published><updated>2007-05-23T07:46:35.291-02:30</updated><title type='text'>Using AjaxPro with Ext data store</title><content type='html'>As I posted on  &lt;a href="http://extjs.com/forum/showthread.php?t=2641&amp;page=3"&gt;Ext forum&lt;/a&gt; I use the following modified code to use AjaxPro with Ext.  It helps avoid emedding URLs in the proxy call.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt; ds = new Ext.data.Store({&lt;br /&gt; proxy: new Ext.data.AjaxProxy(myAsp, "GetMovies"),&lt;br /&gt;     reader:reader,&lt;br /&gt;     remoteSort: true&lt;br /&gt;     });&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;And AjaxProProxy.js,  modified from &lt;a href="http://www.rodrigodiniz.qsh.eu/"&gt;Rodiniz&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Ext.data.AjaxProxy = function(ajaxProObject, method) {&lt;br /&gt; Ext.data.AjaxProxy.superclass.constructor.call(this);&lt;br /&gt; this.ajaxProObject = ajaxProObject;&lt;br /&gt; this.method = method;&lt;br /&gt;};&lt;br /&gt;Ext.extend(Ext.data.AjaxProxy, Ext.data.DataProxy, {&lt;br /&gt;&lt;br /&gt;   // Harley's load function&lt;br /&gt;  load: function(params, reader, callback, scope, arg) {&lt;br /&gt;  if(this.fireEvent("beforeload", this, params) !== false) {&lt;br /&gt;   var s = [];&lt;br /&gt;   for (var x in params) {&lt;br /&gt;    s[s.length] = "params[\"" + x + "\"]";&lt;br /&gt;   }&lt;br /&gt;   s = s.join(",");&lt;br /&gt;   var o = {&lt;br /&gt;    params: params || {},&lt;br /&gt;    request: {&lt;br /&gt;     callback : callback,&lt;br /&gt;     scope : scope,&lt;br /&gt;     arg : arg&lt;br /&gt;    },&lt;br /&gt;    reader: reader,&lt;br /&gt;    callback: this.loadResponse,&lt;br /&gt;    scope: this&lt;br /&gt;   };&lt;br /&gt;   &lt;br /&gt;   eval("this.ajaxProObject[this.method](" + s + ", this.loadResponse, o)");&lt;br /&gt; &lt;br /&gt; } else {&lt;br /&gt;   callback.call(scope||this, null, arg, false);&lt;br /&gt;  }&lt;br /&gt; },&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;     // Rodiniz's response handler&lt;br /&gt;&lt;br /&gt; loadResponse: function(response, request) {&lt;br /&gt;&lt;br /&gt; var o = response.context;&lt;br /&gt;&lt;br /&gt;     var result;&lt;br /&gt;     try {&lt;br /&gt;         result = o.reader.read(response.json);&lt;br /&gt;&lt;br /&gt;     }catch(e){&lt;br /&gt;         this.fireEvent("loadexception", this, o, response, e);&lt;br /&gt;         o.request.callback.call(o.request.scope, null, o.request.arg, false);&lt;br /&gt;         return;&lt;br /&gt;     }&lt;br /&gt;     o.request.callback.call(o.request.scope, result, o.request.arg, true);&lt;br /&gt; },&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;slight mod in Rodiniz's reader....&lt;br /&gt;&lt;blockquote&gt;read : function(response){&lt;br /&gt;  &lt;br /&gt;     var r= new Object(); //to handle errors&lt;br /&gt;     var obj=response + "*/";&lt;br /&gt;     var doc = eval(obj);&lt;br /&gt;     if(r.error){&lt;br /&gt;         throw r.error;&lt;br /&gt;     }&lt;br /&gt;     return this.readRecords(doc);&lt;br /&gt; },&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5638367269574450993-4135307237465544392?l=ajaxnetext.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ajaxnetext.blogspot.com/feeds/4135307237465544392/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5638367269574450993&amp;postID=4135307237465544392' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default/4135307237465544392'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default/4135307237465544392'/><link rel='alternate' type='text/html' href='http://ajaxnetext.blogspot.com/2007/05/using-ajaxpro-with-ext-data-store.html' title='Using AjaxPro with Ext data store'/><author><name>amackay99@gmail.com</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5638367269574450993.post-4134172525832477817</id><published>2007-05-15T16:20:00.000-02:30</published><updated>2007-05-15T16:31:22.326-02:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ext combobox'/><title type='text'>Ext Combobox - Typeahead and mode local</title><content type='html'>The Ext combobox has a 'mode' property that can be either 'remote' or 'local'.   These terms are somewhat misleading.  They should really be called something like 'manual load' and 'auto load'.   A 'remote' mode combobox gets its data store's load method called behind the scenes.  A 'local' mode combo requires an explicit data store 'load' call to get the store and combobox loaded up with data.&lt;br /&gt;&lt;br /&gt;Meanwhile, it seems that the only way to get 'typeahead' to work in a combobox is if mode:local.   I'd also recommend Trigger:all and I'm not sure why anyone would not want to Trigger:all.   This causes the entire combobox dropdown to be listed when the user clicks the down arrow.&lt;br /&gt;&lt;br /&gt;  &lt;blockquote&gt;var cb = new fm.ComboBox({&lt;br /&gt;                           typeAhead: true,&lt;br /&gt;                           mode:'local',&lt;br /&gt;                           store: dsdevice,&lt;br /&gt;                           forceSelection: true,&lt;br /&gt;                           triggerAction: 'all',&lt;br /&gt;                           displayField: 'fld1',&lt;br /&gt;                           valueField: 'fld2',&lt;br /&gt;                           lazyRender:true,&lt;br /&gt;                           editable:true&lt;br /&gt;                                 });&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5638367269574450993-4134172525832477817?l=ajaxnetext.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ajaxnetext.blogspot.com/feeds/4134172525832477817/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5638367269574450993&amp;postID=4134172525832477817' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default/4134172525832477817'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default/4134172525832477817'/><link rel='alternate' type='text/html' href='http://ajaxnetext.blogspot.com/2007/05/ext-combobox-typeahead-and-mode-local.html' title='Ext Combobox - Typeahead and mode local'/><author><name>amackay99@gmail.com</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5638367269574450993.post-3866498419482049817</id><published>2007-05-11T08:10:00.001-02:30</published><updated>2007-05-11T08:23:55.832-02:30</updated><title type='text'>dataset on the server....grow your own sql</title><content type='html'>I have spent some time trying to get the Ext datastore translated to a .Net dataset for updating but I've come to the conclusion that its just not worth the effort. I've heard others say that its not worth working with datasets except for simple out of the box applications and now I believe that too.&lt;br /&gt;&lt;br /&gt;The dataset that gets sent to the server side routine needs to have its row's 'setmodified' or 'setadded' method set and then the dataset needs to be 'merged'. Then, it is just a black box in terms of what happens and it is difficult to get the underlying SQL when there are problems. I have done the following on the server side for the updates. I have a handler for the Ext data store 'update' event so that every field change on the grid will cause this code to fire. I added a timestamp column to the table to handle optimistic concurrency.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Code:&lt;br /&gt;&lt;br /&gt;conn = new OleDbConnection(ads.ConnectionString);&lt;br /&gt;conn.Open();&lt;br /&gt;&lt;br /&gt;foreach (DataRow row in ds.Tables[0].Rows)   // should always be one row&lt;br /&gt;{&lt;br /&gt;     &lt;br /&gt;            sqlcmd = "UPDATE TblOperations SET ";&lt;br /&gt;            sqlcmd += " Device = '" + row["Device"].ToString() + "', ";&lt;br /&gt;            sqlcmd += " Station = '" + row["Station"].ToString() + "' ";&lt;br /&gt;            sqlcmd += " where ID_key = " + row["ID_key"].ToString();&lt;br /&gt;            if (! row["timest"].ToString().Equals("") )&lt;br /&gt;                sqlcmd += "    and timest = '" + row["timest"].ToString() + "'  ";&lt;br /&gt;         &lt;br /&gt;            cmd = new OleDbCommand(sqlcmd, conn);&lt;br /&gt;            affected += cmd.ExecuteNonQuery();&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;      if ( affected == 1 )&lt;br /&gt;         return "";&lt;br /&gt;      else&lt;br /&gt;         return "error"&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now I need to get 'adds' and 'deletes' handled.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5638367269574450993-3866498419482049817?l=ajaxnetext.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ajaxnetext.blogspot.com/feeds/3866498419482049817/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5638367269574450993&amp;postID=3866498419482049817' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default/3866498419482049817'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default/3866498419482049817'/><link rel='alternate' type='text/html' href='http://ajaxnetext.blogspot.com/2007/05/dataset-on-servergrow-your-own-sql.html' title='dataset on the server....grow your own sql'/><author><name>amackay99@gmail.com</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5638367269574450993.post-8084307202837317273</id><published>2007-05-11T08:07:00.000-02:30</published><updated>2007-05-11T08:09:40.562-02:30</updated><title type='text'>Dataset on the server.... ugh</title><content type='html'>I wrote the following to send the ext.datastore to the server, in response to a 'save button' click.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;div class="innercode"&gt;var editedds      = myextdatastore.getModifiedRecords();&lt;br /&gt;&lt;br /&gt;var ds4 = new Ajax.Web.DataSet();&lt;br /&gt;var dt4 = new Ajax.Web.DataTable();&lt;br /&gt;&lt;br /&gt;for(var i = 0, len = myextdatastore.fields.keys.length; i &lt; i =" 0," len =" editedds.length;"&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;My C# routine correctly reads the dataset on the server but I'm disappointed that now I have to create all the insert/update/delete logic by creating 'insertcommand','updatecommand' etc. I thought the whole point of using ADO datasets was that it would handle all this logic. It seems like there is no way to get around having to code this on the server.&lt;br /&gt;&lt;br /&gt;Below is my c# code.   It returns no errors but it doesn't update either.....&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;b&gt;Code:&lt;/b&gt;public static String SaveAll(System.Data.DataSet ds )&lt;br /&gt;   {&lt;br /&gt;       OleDbDataAdapter oda = getAccessAdapter();&lt;br /&gt;  &lt;br /&gt;       OleDbCommandBuilder bld = new OleDbCommandBuilder(oda);&lt;br /&gt;       bld.GetInsertCommand(true);&lt;br /&gt;       OleDbCommand command;&lt;br /&gt;             &lt;br /&gt;       command = new OleDbCommand(&lt;br /&gt;      "INSERT INTO TblOperations (Device,Operation) " +&lt;br /&gt;      "VALUES ( ?,?)");&lt;br /&gt;   &lt;br /&gt;         command.Parameters.Add("@Device", OleDbType.VarChar, 40, "Device");&lt;br /&gt;         command.Parameters.Add("@Operation", OleDbType.VarChar, 40, "Operation");&lt;br /&gt;&lt;br /&gt;      oda.InsertCommand = command;&lt;br /&gt;&lt;br /&gt;       command = new OleDbCommand("UPDATE TblOperations SET Device=?, Operation=?  WHERE ID_key=?");&lt;br /&gt;       command.Parameters.Add(new OleDbParameter("Device", OleDbType.VarChar , 50));&lt;br /&gt;       command.Parameters.Add(new OleDbParameter("Operation", OleDbType.VarChar, 50));&lt;br /&gt;       command.Parameters.Add(new OleDbParameter("ID_key", OleDbType.Numeric, 0));&lt;br /&gt;&lt;br /&gt;   oda.UpdateCommand=command;&lt;br /&gt;     &lt;br /&gt;       oda.Update(ds, "Table1");&lt;br /&gt;&lt;br /&gt;       return " hello world " + oda.UpdateCommand.CommandText;&lt;br /&gt;          &lt;br /&gt;   }&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5638367269574450993-8084307202837317273?l=ajaxnetext.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ajaxnetext.blogspot.com/feeds/8084307202837317273/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5638367269574450993&amp;postID=8084307202837317273' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default/8084307202837317273'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default/8084307202837317273'/><link rel='alternate' type='text/html' href='http://ajaxnetext.blogspot.com/2007/05/dataset-on-server-ugh.html' title='Dataset on the server.... ugh'/><author><name>amackay99@gmail.com</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5638367269574450993.post-6393585468276547631</id><published>2007-05-11T08:05:00.000-02:30</published><updated>2007-05-11T08:07:00.328-02:30</updated><title type='text'>Ext - .Net dataset updating with grid</title><content type='html'>I am enjoying my Ext/ajaxpro grid and it seems to work great for viewing .net datasets. My next goal is to allow inline editing and updates to the dataset and of course return the modified dataset to the server for processing&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5638367269574450993-6393585468276547631?l=ajaxnetext.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ajaxnetext.blogspot.com/feeds/6393585468276547631/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5638367269574450993&amp;postID=6393585468276547631' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default/6393585468276547631'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5638367269574450993/posts/default/6393585468276547631'/><link rel='alternate' type='text/html' href='http://ajaxnetext.blogspot.com/2007/05/i-am-enjoying-my-extajaxpro-grid-and-it.html' title='Ext - .Net dataset updating with grid'/><author><name>amackay99@gmail.com</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
