In this tutorial series we’ll walk through various approaches for setting up buttons inside ExtJS grid. We will use Sencha’s buffered grid example as base grid. This example will demonstrate ExtJS 4 native capabilities – via the actioncolumn:
Tag: ExtJS
ExtJS 4 Download File Button
Here’s a bit of undocumented goodness. In this tutorial we’ll set up an ExtJS 4 button to act just like a link that pops up in new window:
<a href="..." target="_blank"/> |
ASP.NET AJAX & ExtJS 4 Grid (4)
Read Previous Example First!
In this example, we’ll improve our ExtJS 4 model to include an “association” that it will read from XML produced by AJAX call to ASP.NET. Most common association is one to many, for example: your Client can place multiple Orders. An ExtJS 4 data store and model can accommodate this.
The new XML data packet will look like this; notice hiddenAttributes:
<?xml version="1.0" encoding="utf-8"?> <matches> <match> <id>0</id> <name>Number 0</name> <hiddenAttributes> <attr> <name>hidden1</name> <value>val1</value> </attr> <attr> <name>hidden2</name> <value>val2</value> </attr> </hiddenAttributes> </match> <match><id>1</id><name>Number 1</name></match> ... </matches> |
ASP.NET AJAX & ExtJS 4 Grid (3)
Read Previous Example First!
In this example, we’ll be returning additional data to our ExtJS4 data store, which is passed from ASP.NET over AJAX in XML format. It’s common to show grid row count in the form title, as well as something else in the header, such as final SQL or LDAP query used by your ASP.NET AJAX script (WebMethod).
Combine this with ExtJS4 buffered grid’s ability to only render 50 HTML rows with infinite scrolling, this makes the stock ExtJS4 gridpanel an extremely powerful application in its own right, very good at running large data queries. On a decent computer with decent Internet connection this will smoke the traditional buffered grid, which ajax back on every scroll.
ASP.NET AJAX & ExtJS 4 Grid (2)
In this example series we’ll keep using MSAjaxProxy we set up earlier, for working with IIS 6+ running MS AJAX Extensions 1.0
In this example we’ll set up an ExtJS4 gridpanel with infinite scrolling, using XML data served from ASP.NET. Sometimes this is also called “buffered grid.” Sencha provides an example using memory store, but it took me some time to figure this one out, so enjoy!