in
Forums
Blogs
Files
Devexpress.Com
Client Center
Support Center
DevExpress Channel

Bugs on ASPxperience demos?? - ASPxNewsControl :ex: Data Bindings

Last post 11/26/2008 5:30 AM by karol kasprzak. 4 replies.
Page 1 of 1 (5 items)
Sort Posts:
Previous Next
  • 11/13/2008 10:10 AM

    Bugs on ASPxperience demos?? - ASPxNewsControl :ex: Data Bindings

    Hello ,

    I have tried to do example "http://demos.devexpress.com/ASPxperienceDemos/NewsControl/DataBinding.aspx".

    There are few problems that I cannot overcome.

    1 ) In function OnTailClick : method for ASPxCallBack -PerformCallback did not run. I used SendCallback.

    2) In function  OnTailClick : news ID is empty - I think it is because of XML file: NewsControlRSS.xml. That's why the rest of callback method does not work , so  e.Parameter is empty and ASPxCallback1_Callback does not work properly. Can I see the full code for this example?? OR is it a bug??

     

  • 11/17/2008 8:04 AM In reply to

    Re: Bugs on ASPxperience demos?? - ASPxNewsControl :ex: Data Bindings

    Hi Karol,

    Since version 8.2 the SendCallback method of the ASPxClientCallback class has become
    obsolete. The new PerformCallback method with the same signature is now in use.

    > In function OnTailClick : news ID is empty...

    Works fine for me.

    Victor
    R&D, ASP.NET Team, DevExpress Inc.

    P.S. If you wish to receive direct assistance from our Support Team, use Support Center.
  • 11/20/2008 7:35 AM In reply to

    Re: Bugs on ASPxperience demos?? - ASPxNewsControl :ex: Data Bindings

    Thanks for reply. I am using 8.1 version. Please look into sample code which I have done. Please point where I am doing something wrong.

    Because I have empty Popup when clicking on News details .

    ////////////////////////////Firstly ".cs" file////////////////////////////////////////////////////////////////////

    public partial class _Default : System.Web.UI.Page
    {
      protected void Page_Load(object sender, EventArgs e)
      {  
      Page.ClientScript.RegisterClientScriptInclude("MyScript", "JScript.js");

      if (IsCallback)
      System.Threading.Thread.Sleep(50); // Intentionally pauses server-side processing, to demonstrate the Loading Panel functionality.
       
      }
      protected void ASPxCallback1_Callback(object source, DevExpress.Web.ASPxCallback.CallbackEventArgs e)
      {
      string s= e.Parameter;
      int newsID = int.Parse(e.Parameter);
      IHierarchicalDataSource dataSource = XmlDataSource1 as IHierarchicalDataSource;
      HierarchicalDataSourceView view = dataSource.GetHierarchicalView("");
      IHierarchicalEnumerable enumerable = view.Select();
      int index = 1;
      string text = "";
     
      foreach(object obj in enumerable) {
      if(newsID == index) {
      IHierarchyData data = enumerable.GetHierarchyData(obj);
      PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(data);
      PropertyDescriptor descriptor = properties.Find("description", true);
      text = descriptor.GetValue(obj).ToString();
      }
      index++;
      }

      e.Result = text;
      }
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

     

    /////////////////////////////////////////////////part of "aspx"  file//////////////////////////////////////////////////////////////////////

      <table class="style1">
      <tr>
      <td>
      <dxnc:ASPxNewsControl ID="ASPxNewsControl1" runat="server" NavigateUrlFormatString="BLOCKED SCRIPTvoid('{0}');"
      DataSourceID="XmlDataSource1" Width="400px"
      CssFilePath="~/App_Themes/Youthful/{0}/styles.css" CssPostfix="Youthful"
      ImageFolder="~/App_Themes/Youthful/{0}/" LoadingPanelImagePosition="Bottom">
      <LoadingPanelStyle ImageSpacing="3px">
      </LoadingPanelStyle>
      <LoadingPanelImage Url="~/App_Themes/Youthful/Web/tcLoading.gif" />
      <ItemDateStyle Spacing="10px">
      </ItemDateStyle>
      <Items>
      <dxnc:NewsItem Date="11/13/2008 15:36:12" HeaderText="asdfasd asdfa asd "
      Text="asdfasdf asdf asdf asdf adsf asdf asdf asdf ">
      </dxnc:NewsItem>
      <dxnc:NewsItem Date="2008-11-14" HeaderText="asdf asdf"
      Text="asdfa asdf asdf asdf ">
      </dxnc:NewsItem>
      </Items>
      <ItemSettings DateHorizontalPosition="OutsideLeft"
      TailPosition="KeepWithLastWord" MaxLength="120" ShowImageAsLink="True">
      <TailImage Align="Bottom" Height="11px"
      Url="~/App_Themes/Youthful/Web/hlTailImage.png" Width="16px" />
      </ItemSettings>
      <ItemRightPanelStyle Spacing="7px">
      </ItemRightPanelStyle>
      <ItemLeftPanelStyle Spacing="7px">
      </ItemLeftPanelStyle>
      <ItemHeaderStyle Spacing="2px">
      </ItemHeaderStyle>
      <ClientSideEvents TailClick="function(s, e) {
    OnTailClick(e.name, e.htmlElement);
    }" BeginCallback="function(s, e) {
     OnNewsControlBeginCallback();
    }" />
      <PagerSettings>
      <AllButton>
      <Image Height="15px" Width="21px" />
      </AllButton>
      <FirstPageButton Text="">
      <Image Height="15px" Width="21px" />
      </FirstPageButton>
      <LastPageButton ImagePosition="Left" Text="">
      <Image Height="15px" Width="21px" />
      </LastPageButton>
      <NextPageButton Text="">
      <Image Height="15px" Width="16px" />
      </NextPageButton>
      <PrevPageButton Text="">
      <Image Height="15px" Width="16px" />
      </PrevPageButton>
      <Summary AllPagesText="" Text="" />
      </PagerSettings>
      </dxnc:ASPxNewsControl>
      <asp:XmlDataSource ID="XmlDataSource1" runat="server"
      DataFile="~/App_Data/NewsControlRSS.xml"
      TransformFile="~/App_Data/NewsControlRSS.xslt"></asp:XmlDataSource>
      <dxcb:ASPxCallback ID="ASPxCallback1" runat="server" ClientInstanceName="NewsCallback1"
      oncallback="ASPxCallback1_Callback" style="margin-bottom: 0px">
      <ClientSideEvents CallbackComplete="function(s, e) {
     OnCallbackComplete(e.result);
    }" />
      </dxcb:ASPxCallback>
      </td>
      <td>
      <dxpc:ASPxPopupControl PopupAction="None" ClientInstanceName="ASPxPopupClientControl1" PopupHorizontalAlign="OutsideRight" EnableViewState="False" ID="ASPxPopupControl1" runat="server" PopupHorizontalOffset="5" AllowDragging="True" EnableAnimation="False" PopupVerticalAlign="TopSides" CloseAction="CloseButton" HeaderText="Details">
      <ContentCollection>
    <dxpc:PopupControlContentControl runat="server"></dxpc:PopupControlContentControl>
    </ContentCollection>
      </dxpc:ASPxPopupControl>
      </td>
      </tr>
      </table>
     

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

     

    Javascript file is the same as in the example.

     

     

  • 11/26/2008 5:11 AM In reply to

    Re: Bugs on ASPxperience demos?? - ASPxNewsControl :ex: Data Bindings

    I have seen into the code in the example .

     

    Above there is code copied from tutorial.  Everything is the same , but I do not have answer form server. Callback is done but I cannot see the reply. I debugged the code , but it does not work properly - newsID is empty!!!

    I cannot also use Demos?? I cannot run or compile  ASP demos . WHY??

  • 11/26/2008 5:30 AM In reply to

    Re: Bugs on ASPxperience demos?? - ASPxNewsControl :ex: Data Bindings

    Hello ,

    I have tried to do example "http://demos.devexpress.com/ASPxperienceDemos/NewsControl/DataBinding.aspx".

    I have two problems.

    First: I have copied code into my sample web site. When I am clicking 'details' . Popup shows with 'Loading ...',but I have no callback reply. When I looked into the code newsID is empty, so how can server identify the part of database to read??

    Second: I cannot run ASP demos. When I am clicking on them in Demo Center I have in 'HTTP 500.19 — Internal Server Error'.   When I was tring to run see them in visual studio it is written 'Unable to open the web [...] Internal Server Error'. I am using Vista Business

Page 1 of 1 (5 items)
Copyright © 1998-2008 Developer Express Inc.
ALL RIGHTS RESERVED