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

Problem with binding data.

Last post 12/2/2008 3:03 PM by Chandrakanth M. 3 replies.
Page 1 of 1 (4 items)
Sort Posts:
Previous Next
  • 9/25/2008 8:45 AM

    Problem with binding data.

    I decided to create PivotGird on simple table, where i have three fields

     

    • ProductID
    • PriceTypeID
    • Price

     

    So. I used such code, where i get Data using DataSetTableAdapter(i cheked that it returns adequate data)...

     

     

     <dxwpg:ASPxPivotGrid ID="sdf" DataSourceID="testODS" runat="server" >

            <Fields>

                <dxwpg:PivotGridField ID="CA"  FieldName="PriceTypeID" Area="ColumnArea" AreaIndex="0" ></dxwpg:PivotGridField>

                 <dxwpg:PivotGridField ID="RA"  FieldName="ProductID" Area="RowArea"  AreaIndex="0" >  </dxwpg:PivotGridField>

                <dxwpg:PivotGridField ID="DA"  FieldName="Price" Area="DataArea"   AreaIndex="0" Caption="Price"  ></dxwpg:PivotGridField>

            </Fields>

        </dxwpg:ASPxPivotGrid>

        <asp:ObjectDataSource ID="testODS" runat="server" SelectMethod="GetPrices" TypeName=" DataSet1TableAdapters.TestTA"></asp:ObjectDataSource>

     

     

    And it creates table with "0"s in DataCells, where i need prices, also it adequately leaves cells without data empty. What can be my problem?

    Filed under: ,
  • 10/5/2008 6:41 AM In reply to

    Re: Problem with binding data.

    When that has happened to me, it usually turns out that I have not used the exact field name from the query/procedure in the DataAxis.

    Without seing your database code, I can not confirm this, but it is worth checking.

    There may be a problem with using the DataSet1TableAdapter.

    So, another option is to use DataSource markup with a stored procedure such as this :

     

     

     

     

    <asp:SqlDataSource id="DataSource1" SelectCommand="spProductReports"ConnectionString="<%$ ConnectionStrings:strConnNorthwind %>" SelectCommandType="StoredProcedure" runat="server"></asp:SqlDataSource>

    Again, without seeing your data acess code, it is not possible to be more specific.

    Regards,

    Leo

     

  • 12/2/2008 12:46 PM In reply to

    Re: Problem with binding data.

     I too have the same problem. I have the same data coming from two interfaces with one of them it works and with the other it doesnt. I have confirmed the column name and it seems to be fine. Spent quite some time on this. Can someone help ?

  • 12/2/2008 3:03 PM In reply to

    Re: Problem with binding data.

     I figured out what the problem was. The data source that worked fine maintained the database constraints specially datatype as I read it from a sql reader. The other source of data was a DataTable formed out of a xml 's cdata I got from a interface. I didnt maintain the datatype in this data table which was causing the issue.

    Thanks

     

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