Showing posts with label behavior. Show all posts
Showing posts with label behavior. Show all posts

Monday, March 26, 2012

How do I extend a DataGrid/DataList for ATLAS behavior?

I have two inherited DataGrid and DataList classes that render a paged grid and list with some enhanced behaviors (better pagers and retreiving only items that are shown with NHibernate). I would like paging not to refresh the page.

It's easy with an UpdatePanel: add a panel, add an event OnDataBinding( ) and Update the panel. For my project (www.foodcandy.com) this means updating a hundred grids and lists.

So instead I would like to build the panel behavior into the actual DataGrid and DataList and have all my grids behave this way. The first easy thing is to add a panel property and tell the grid/list that it's inside an update panel. But I still have to modify a 100 pages to add the update panels.

How do I do something like that?

Thx
dB.

hello.

maybe building a usercontrol will be the faster way to get what you want...though i still think that i'd add the panel to all the pages..


I doubt it will be faster Luis - this is a datagrid, I would need to expose all the methods for various properties like PagerStyle and I am not even sure what to do with ItemTemplates. No?

hello.

well, i was thinking in adding a property to the usercontrol that lets you get a reference to the datagrid.


Luis Abreu:

well, i was thinking in adding a property to the usercontrol that lets you get a reference to the datagrid.

I haven't tried this, but can you nest this in the aspx pages by having MyUserControl expose the DataGrid member?

<MyUserControl>
<DataGrid>
<TemplateColumn ... />
</DataGrid>
<MyUserControl>

How do I debug the ...Behavior.js?

Im allways trying to solve my problems at first hand, but this Atlas-technology gives me a bit headacheGeeked

How do I debug my way through a behavior.js file? For instance, the DynamicPopulateBehavior.js. It would be nice to take a closer look at why the webservicecall failsCool

Cheers
Janus

Hi Janus,

You should first check outhttp://atlas.asp.net/docs/Overview/debug.aspx, which briefly explains how you can debug using VS. The VS approach is still a little rough through, so it can be nicely augmented with client-side only debuggers such asFireBug.

Thanks,
Ted

Wednesday, March 21, 2012

How can I reproduce that behavior (using AJAX PRO) with ATLAS?!?

Hello again ! I have a normal page, with a search button, that open a popup(dhtml-div-iframe) !

Using AJAX PRO:

In that IFRAME(popup) I have a GridView with a LinkButton that calls a JS function passing a selected key!

The JS Function call a server function passing that key!

The server funtion get a class´s object and pass to JS function...

The JS function Fill all fields from my MAIN form and close POPUP !

How can I do that using ATLAS?

[]´s

No help ?!?

:(


Not an expert, but here are a few suggestions:

Take a look at the atlas control toolkit,

For the pop up, there's a pop up extender. To fill the GridView async, you can use a web service. Actually, you don't have to. Just putting the GridView in an UpdatePanel with a PartialRendering ScriptManager will let you re-fill it with any query you'd like.

And by the way, there's also a ModalPopUp extender, might fit your needs better.