Showing posts with label multiple. Show all posts
Showing posts with label multiple. Show all posts

Wednesday, March 28, 2012

Atlas with multiple GridViews

I have a page which needs to allow user to populate fields by selecting rows from Gridviews. I would like to temporarily display a GridView with search field to locate a row, then populate the associated field with a value from GridView row and move on to the next field with it's own associated GridView.

Is it possible to do true Ajax with Atlas, e.g. load content dynamically? It would be nice if the GridViews didn't load their corresponding data sources until acutally needed for a given field. I thought I might use the Atlas Control Toolkit's collapsible panel component but not sure if this is the best way to only render a GridView when it's needed.

Any suggestions on how to go about this would be appreciated.

hello.

though i haven't understood your scenario very well, i think that atlas can help you accomplish this. since you've spoken about gridviews, i think you'll want to use the server side approach, where you use an updatepanel to have a partial update zone on the page.

in these situations, you can have a placeholder and add controls dinamically to that control during postbacks (partial or complete).


Hi Luis

I'm not sure I understand my scenario completely either ;)

But suppose I have a drive name field. If a user clicks on choose button, a panel with search field and GridView pops up, allowing the user to select a driver from the user database. The driver name field is populated and the GridView disappears. Since I have a number of fields I need to allow the user to fill by choosing from a GridView I don't want to populate the page with GridViews at the outset.

Your idea sounds like it could work, but I'm unclear on what events I should use to dynamically add the GridView and search field. It would be great if you could direct me to a sample where someone uses Atals to replace content dynamically (would be great if it was with a GridView ;).

Thanks much!

hello.

hum...i think that basically we're talking about dynamic replacement of a portion of the page. you may use usercontrols to encapsulate both parts (on has the textbox and the search button and the other user control has the grid) and you'll need to work with the params collection in order to replace the controls dynamically (search the forums because one or two days ago i've wrote a small sample that shows how to replace the usercontrols dynamically in an updatepanel).

atlas will install but template doesnt show up when creating new web site

Am running Win Srvr 2003/SP1 and have installed/uninstalled Atlas multiple times and it installs fine, but the template never shows up when I want to start a new website in VS2005. Have also tried turning off virus checker during install, with still no success.What must I do??Crying

hello.

inside the installation folder (something like C:\Program Files\Microsoft ASP.NET\Atlas\v2.0.50727), you'll find the aspnetatlas.vsi file. running this should install the templates for c# and vb.net.


Luis, thank you for taking the time to respond. Did what you suggested and it seems to install and says it was successful, but then the template still does not show up when attempting to create a new web site in VS2005. Does this not work on Win Srvr2003? All of my colleagues who have Win XP Pro have had no trouble getting it to install.? Thanks, Michael B.beebemichael3@.hotmail.com


hello.

hum...i'd say no. at work, i've installed it at a win 2003 server and i can see the template on my list.

Wednesday, March 21, 2012

ATLAS replacing redered control ids incorrectly

I have multiple update panels on a page. When i fire a control event inside one of these panels, i get an alert window saying something like:

"An async postback was caused by a control within $ctl0$myPlaceholder$myUpdatePanel . . . but the update panel could not be found on the page."

when i view the source in my code, however, the actual id or name of the div that is the rendered updatepanel is "_ctl0_myPlaceholder_myUpdatePanel".

I am not sure why this is happening. has anyone seen this before? suggested fixes?

Hi,

you should view posts at:

http://gregdotnet.blogspot.com/ - about web.config element xhtmlconformance and
http://forums.asp.net/thread/1211330.aspx - about naming the controls

Basicly what you need to check is that if you have any dynamicly added controls assign them id's when they get added to the controls collection. This way the control id's at runtime don't get rendered with ctl04_ and such. Worked for me.