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

DataBinding Question based on error: {"DataBinding: 'DevExpress.Web.Data.WebCachedDataRow' does not allow indexed access."}

Last post 9/4/2007 8:10 AM by Mehul Harry (Developer Express). 1 replies.
Page 1 of 1 (2 items)
Sort Posts:
Previous Next
  • 9/1/2007 9:57 AM

    DataBinding Question based on error: {"DataBinding: 'DevExpress.Web.Data.WebCachedDataRow' does not allow indexed access."}

    I am using Xpo and have an Address table with Street, City, State, Zip fields. The State represents the FK to an Xpo State Table.

    I have an XpoDataSource1 hooked up to the address table and an XpoDataSource2 hooked up to the State table.

    With the bindings below, I get an exception:  

    {"DataBinding: 'DevExpress.Web.Data.WebCachedDataRow' does not allow indexed access."}

     It doesn't seem to like Bind("State!Key").

     

    How can I bind a simple state lookup combo to the gridview using xpo?

     

     

    <dxwgv:GridViewDataTextColumn Caption="State" FieldName="State!Key" VisibleIndex="5">

    <EditItemTemplate><asp:DropDownList

    ID="DropDownList1" runat="server"

    DataSourceID="XpoDataSource2" DataTextField="Name"

    DataValueField="Abbreviation" SelectedValue="<%# Bind('[State!Key]') %>"

    ></asp:DropDownList>

    </EditItemTemplate>

    <PropertiesTextEdit NullDisplayText="Select a State">

    </PropertiesTextEdit>

    </dxwgv:GridViewDataTextColumn>
    Dan Arnold
  • 9/4/2007 8:10 AM In reply to

    Re: DataBinding Question based on error: {"DataBinding: 'DevExpress.Web.Data.WebCachedDataRow' does not allow indexed access."}

    Hi Dan, 

    Yes, please use the ASPxComboBox to Filter instead of using the Dropdrown list inside of the template. Check out this sample that shows how to achieve this:

    Use a ComboBox to filter data instead of textbox

    This support issue includes a sample with XPO and an ASPxComboBox: Is it possible to filter with an ASPxComboBox?

    Thanks.

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