Selection out of range

Posts   
 
    
mohamed avatar
mohamed
User
Posts: 136
Joined: 10-Mar-2008
# Posted on: 22-Apr-2008 12:10:58   

Hi all

i want to pass filter to llblgendatasource when l passed it, it through an exception

Selection out of range
Parameter name: value 

this is code


var p = new PredicateExpression();
            p.Add(GLAccountFields.ARAccountName == "");

            IRelationPredicateBucket filter = new RelationPredicateBucket();
            filter.PredicateExpression.Add(p);
//pass to llbldatasource
           dsChartOfAccount.FilterToUse=filter;
           dsChartOfAccount.Refetch = true;

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 22-Apr-2008 12:14:49   

Please pot the stack trace and the LLBLGen Pro runtime library version used.

Also if you can check the generated SQL query and post it here. Refer to the manual's section "Using the generated code -> Troubleshooting and debugging"

mohamed avatar
mohamed
User
Posts: 136
Joined: 10-Mar-2008
# Posted on: 22-Apr-2008 12:26:33   

var p = new PredicateExpression();
            p.Add(GLChartOfAccountFields.AccountNo == new Guid(e.Node.Value));

            var filter = new RelationPredicateBucket();
            filter.PredicateExpression.Add(p);

            dsChartOfAccount.FilterToUse=filter;
                dsChartOfAccount.Refetch = true;

this is stack


[ArgumentOutOfRangeException: Selection out of range
Parameter name: value]
   Telerik.Web.UI.RadComboBox.PerformDataBinding(IEnumerable dataSource) +290
   Telerik.Web.UI.RadComboBox.OnDataSourceViewSelectCallback(IEnumerable data) +7
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +29
   Telerik.Web.UI.RadComboBox.OnDataBinding(EventArgs e) +90
   Telerik.Web.UI.RadComboBox.PerformSelect() +18
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
   System.Web.UI.Control.DataBindChildren() +204
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +216
   System.Web.UI.Control.DataBind() +12
   System.Web.UI.Control.DataBindChildren() +204
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +216
   System.Web.UI.Control.DataBind() +12
   System.Web.UI.Control.DataBindChildren() +204
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +216
   System.Web.UI.Control.DataBind() +12
   System.Web.UI.Control.DataBindChildren() +204
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +216
   System.Web.UI.WebControls.DetailsView.CreateChildControls(IEnumerable dataSource, Boolean dataBinding) +2343
   System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +59
   System.Web.UI.WebControls.DetailsView.PerformDataBinding(IEnumerable data) +9
   System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +111
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +29
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
   System.Web.UI.WebControls.DetailsView.DataBind() +4
   System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
   System.Web.UI.WebControls.DetailsView.EnsureDataBound() +181
   System.Web.UI.WebControls.DetailsView.OnPreRender(EventArgs e) +24
   System.Web.UI.Control.PreRenderRecursiveInternal() +86
   System.Web.UI.Control.PreRenderRecursiveInternal() +170
   System.Web.UI.Control.PreRenderRecursiveInternal() +170
   System.Web.UI.Control.PreRenderRecursiveInternal() +170
   System.Web.UI.Control.PreRenderRecursiveInternal() +170
   System.Web.UI.Control.PreRenderRecursiveInternal() +170
   System.Web.UI.Control.PreRenderRecursiveInternal() +170
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041


Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 22-Apr-2008 12:57:29   

Please attach the aspx file and the complete code behind file.

Are you trying to select an item from the comboBox at any stage? It seems to me that filtered collection doesn't contain an entity needed by the comboBox, maybe to be selected as the default value.

mohamed avatar
mohamed
User
Posts: 136
Joined: 10-Mar-2008
# Posted on: 22-Apr-2008 13:46:30   

senario i have tree when i select item it bind to detailView to show details

this is page

Attachments
Filename File size Added on Approval
ASPX.rar 3,753 22-Apr-2008 13:46.42 Approved
mohamed avatar
mohamed
User
Posts: 136
Joined: 10-Mar-2008
# Posted on: 23-Apr-2008 08:46:27   

Ok i got it and solve it thanks