Introduction
This article explains how to enable an editable grid to update without any page reloads (just partial reloads powered by Atlas).
Instructions
Important note: This is an example of applying Atlas to an already working editable grid.
- Get Atlas and install it.
- In your project, add the Atlas DLL to the Bin directory.
- Add the Atlas config code to the application's web.config (in VS, after installing Atlas, you can also find an "ATLAS" Web Site template under My Templates, so you may create a new "ATLAS" Web Site and copy the necessary configuration from there).
- Add the Atlas
ScriptManager
object to the page. - Enclose your grid inside an Atlas
UpdatePanel
. - And enjoy, because you are done!
(Step 2) Add the ATLAS config code to the application's web.config
="1.0"
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<configSections>
<sectionGroup name="microsoft.web"
type="Microsoft.Web.Configuration.MicrosoftWebSectionGroup">
<section name="converters"
type="Microsoft.Web.Configuration.ConvertersSection"
requirePermission="false"/>
<section name="webServices"
type="Microsoft.Web.Configuration.WebServicesSection"
requirePermission="false"/>
<section name="authenticationService"
type="Microsoft.Web.Configuration.AuthenticationServiceSection"
requirePermission="false"/>
<section name="profileService"
type="Microsoft.Web.Configuration.ProfileServiceSection"
requirePermission="false"/>
</sectionGroup>
</configSections>
<microsoft.web>
<converters>
<add type="Microsoft.Web.Script.Serialization.Converters.DataSetConverter"/>
<add type="Microsoft.Web.Script.Serialization.Converters.DataRowConverter"/>
<add type="Microsoft.Web.Script.Serialization.Converters.DataTableConverter"/>
</converters>
<webServices enableBrowserAccess="true"/>
</microsoft.web>
<system.web>
<pages>
<controls>
<add namespace="Microsoft.Web.UI"
assembly="Microsoft.Web.Atlas"
tagPrefix="atlas"/>
<add namespace="Microsoft.Web.UI.Controls"
assembly="Microsoft.Web.Atlas"
tagPrefix="atlas"/>
</controls>
</pages>
<compilation debug="true" defaultLanguage="c#">
<buildProviders>
<add extension=".asbx"
type="Microsoft.Web.Services.BridgeBuildProvider"/>
</buildProviders>
</compilation>
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx"
type="Microsoft.Web.Services.ScriptHandlerFactory"
validate="false"/>
<add verb="*" path="atlasbatchcall.axd"
type="Microsoft.Web.Services.MultiRequestHandler"
validate="false"/>
<add verb="*" path="atlasglob.axd"
type="Microsoft.Web.Globalization.GlobalizationHandler"
validate="false"/>
<add verb="*" path="*.asbx"
type="Microsoft.Web.Services.ScriptHandlerFactory"
validate="false"/>
</httpHandlers>
<httpModules>
<add name="ScriptModule"
type="Microsoft.Web.Services.ScriptModule"/>
<add name="BridgeModule"
type="Microsoft.Web.Services.BridgeModule"/>
<add name="WebResourceCompression"
type="Microsoft.Web.Services.WebResourceCompressionModule"/>
</httpModules>
</system.web>
</configuration>
(Step 3) Add the Atlas ScriptManager inside your page's main content
<ATLAS:SCRIPTMANAGER id=s1 runat="server"
EnablePartialRendering="true"></ATLAS:SCRIPTMANAGER>
(Step 4) Enclose your grid inside an Atlas UpdatePanel
<atlas:UpdatePanel ID="p2" Mode="Conditional" runat="server">
<ContentTemplate>
GRID CODE HERE...
</ContentTemplate>
</atlas:UpdatePanel>
<A href="http://www.spilafis.com.ar">http://www.spilafis.com.ar</A>
See a working example here: http://spilafis.com.ar/Tasks.aspx.
Or more code samples at: http://spilafis.com.ar/CodeExamples.aspx.
License and Disclaimer
All the instructions, code, HTML, and everything presented in this page is provided 'as is' with no warranties what so ever. The only condition for you to use this software is that you keep the link to http://www.spilafis.com.ar in the HTML of the page as provided. Please support freeware, keeping the link.