locked
AJAX in .Net 3.5 SP1 DynamicData site RRS feed

  • Question

  • User-1712241964 posted

    For those that have supplimented the field templates with AJAX....

    If I add a script manager to the fieldtemplate page, I get this:
    Only one instance of a ScriptManager can be added to the page.
    evidently, there is already a  scriptmanagerproxy in the Default.aspx of the DD site.

    problem, the calendar rendered to the user via calendar extender on TextBox1 within the datetime_edit field template does not render properly.
    If I just add a blank Default2.aspx to the site, drop in a scriptmanager, textbox, and calendar extender, THAT calendar renders perfectly, so I know it's not a problem with AJAX on my environment/site.
    So I am guessing that there is a problem between the calendar extender in my timedate_edit field template page and the existing scriptmanagerproxy in the Default.aspx.

    Is there a work-around?

    Wednesday, January 7, 2009 9:41 AM

Answers

  • User-797310475 posted

    problem, the calendar rendered to the user via calendar extender on TextBox1 within the datetime_edit field template does not render properly.
    If I just add a blank Default2.aspx to the site, drop in a scriptmanager, textbox, and calendar extender, THAT calendar renders perfectly, so I know it's not a problem with AJAX on my environment/site.
    So I am guessing that there is a problem between the calendar extender in my timedate_edit field template page and the existing scriptmanagerproxy in the Default.aspx.

    Is there a work-around?

    The problem is not with the ScriptManager but with the default CSS in Dynamic Data 3.5 SP1 projects that is too greedy and applies too much padding to how the calendar is rendered (this padding gets inherited from the grid view, which the calendar is embedded in, and both are rendered usign html tables, hence the bleed-through). There's a workaround for it in Dynamic Data Futures (look at the DynamicDataFuturesSample app).

    That app uses the following additional CSS to fix these issues:

    /* Removes border and padding information that a calendar would inherit when embedded inside of a gridview table */
    div.ajax__calendar_days table td, div.ajax__calendar_months table td, div.ajax__calendar_years table td 
    {
        padding: 0px;
        border: none;
    }
    
    /* Ensures the calendar has a high stacking order so it appears on top of other ACT controls, like slider */
    div.ajax__calendar_container 
    { 
       z-index: 100;
    }
     

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, January 7, 2009 3:13 PM
Wednesday, January 7, 2009 10:24 AM
  • User1747761241 posted

    You've got a script manger on the page so you don't need to add one to the template.

    Wednesday, January 7, 2009 10:29 AM
  • User-1712241964 posted
    sjnaughton,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>I've been helped on more than one occasion by your blog, but I've not yet found something specific to how to get <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><st1:place w:st="on"><st1:City w:st="on">AJAX</st1:City></st1:place> extenders to play nice with the ScriptManagerProxy in the Default.aspx.
    The dropdown calendar renders, but the size of the calendar is fixed, but the individual day "squares" are oversized, therefore you don’t see all of the days within the calendar.<o:p></o:p>

    Danny,
    I noted my discovery of the ScriptManagerProxy in the fourth line of my initial post on this thread.
    The problem is that after removing the ScriptManager from the field template page, relying on the ScriptManagerProxy within the Default.aspx page, that the calendar renders, but renders improperly.
    Thanks for replying though.

     

    Wednesday, January 7, 2009 11:14 AM
  • User-1005219520 posted

    Come up with the simplest possible repro (using NorthWind or AdventureWorks) and I'll help you get it to the right folks. Note this is not really a Dynamic Data question.

    Wednesday, January 7, 2009 1:25 PM
  • User-330204900 posted

    hI Gstadter, I'll look into it but I believe that if have a look at the DD Futures as I mentioned earlier you will see what they have done. I'll get something together by tomorrow on this [:D]

    Wednesday, January 7, 2009 1:47 PM
  • User-1712241964 posted

    Rick,
    Absolutely correct, this should really be in the <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><st1:City w:st="on"><st1:place w:st="on">AJAX</st1:place></st1:City> forum.
    Although I am using my own DB, this <st1:City w:st="on"><st1:place w:st="on">AJAX</st1:place></st1:City> control extender is the first mod to any of the DD files (no other template or routing changes have been made at all).
    If I don’t find what I need via the Futures sample/Steve, I’ll pursue this in the <st1:City w:st="on"><st1:place w:st="on">AJAX</st1:place></st1:City> forum.

    <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p>

    Steve,
    I’m downloading the zip now and will dig.

     

    Wednesday, January 7, 2009 3:11 PM
  • User-797310475 posted

    problem, the calendar rendered to the user via calendar extender on TextBox1 within the datetime_edit field template does not render properly.
    If I just add a blank Default2.aspx to the site, drop in a scriptmanager, textbox, and calendar extender, THAT calendar renders perfectly, so I know it's not a problem with AJAX on my environment/site.
    So I am guessing that there is a problem between the calendar extender in my timedate_edit field template page and the existing scriptmanagerproxy in the Default.aspx.

    Is there a work-around?

    The problem is not with the ScriptManager but with the default CSS in Dynamic Data 3.5 SP1 projects that is too greedy and applies too much padding to how the calendar is rendered (this padding gets inherited from the grid view, which the calendar is embedded in, and both are rendered usign html tables, hence the bleed-through). There's a workaround for it in Dynamic Data Futures (look at the DynamicDataFuturesSample app).

    That app uses the following additional CSS to fix these issues:

    /* Removes border and padding information that a calendar would inherit when embedded inside of a gridview table */
    div.ajax__calendar_days table td, div.ajax__calendar_months table td, div.ajax__calendar_years table td 
    {
        padding: 0px;
        border: none;
    }
    
    /* Ensures the calendar has a high stacking order so it appears on top of other ACT controls, like slider */
    div.ajax__calendar_container 
    { 
       z-index: 100;
    }
     

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, January 7, 2009 3:13 PM
  • User-330204900 posted

    Yep I knew it was in there [:D] just hadn't the time to look myself [:(]

    Wednesday, January 7, 2009 4:37 PM
  • User-1712241964 posted

    A huge thank you to all who made the time to chime in on this, in spite of the fact that it was in the wrong forum.   8-)

     

    Thursday, January 8, 2009 7:43 AM
  • User-797310475 posted

    You were in the right forum. Glad to help.

    Friday, January 9, 2009 2:14 PM