iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
I have a webcombo linked to an ISDatasource retrieving data from custom object. When I'm using AllowAutoQueryHandler = true, everything is working fine, but if I set this property to false, the value of the combo and the text is empty ... (everything else ie data retrieval, ... is working fine ... juste the value is not populated during the post)
Do you have an idea ? I'm using the latest version of both components
Here's some extract from the code
<ISDataSource:ISDataSource ID="idsStockOwner" runat="server" SchemaType="CustomObject"> <Tables> <ISDataSource:ISDataSourceTable SelectMethod="SelectWithPaging" SelectCountMethod="SelectCount" EnablePaging="True" TableName="StockOwners" TypeName="Pmi.ITrack.Web.StockOwnerComboProvider" > <SelectParameters> <asp:ControlParameter Name="additionalSearchFields" ControlID="wcStockOwners" PropertyName="AdditionalSearchFields" ></asp:ControlParameter> <asp:ControlParameter Name="textField" ControlID="wcStockOwners" PropertyName="DataTextField" ></asp:ControlParameter> </SelectParameters> </ISDataSource:ISDataSourceTable> </Tables> </ISDataSource:ISDataSource> <ISWebCombo:WebCombo ID="wcStockOwners" runat="server" DataMember="StockOwners" DataSourceID="idsStockOwner" Height="20px" UseDefaultStyle="True" Width="200px" DataTextField="Name" DataValueField="BusinessEntityId" AllowAutoQueryHandler="false" > </ISWebCombo:WebCombo>
C# part :
[System.ComponentModel.DataObject()] public class StockOwnerComboProvider : ILoadOnDemandDropDownDataSource<StockOwner> { #region ILoadOnDemandDropDownDataSource<StockOwner> Members public int SelectCount(string queryText, string textField, string additionalSearchFields) { return StockOwner.CountStockOwners ( LogicalOperator.Or, Pmi.ITrack.Web.ServerControls.DropDownList.DropDownList.BuildSearchCriteriaList(textField, additionalSearchFields, queryText), false ); } [System.ComponentModel.DataObjectMethod(System.ComponentModel.DataObjectMethodType.Select)] public List<StockOwner> SelectWithPaging(int maximumRows, int startRowIndex, string queryText, string textField, string additionalSearchFields) { if (maximumRows > 0) { var ordering = new List<OrderingCriteria>() { new OrderingCriteria("Code", OrderingDirection.Ascending), new OrderingCriteria("Name", OrderingDirection.Ascending) }; return StockOwner.SearchStockOwners ( LogicalOperator.Or, Pmi.ITrack.Web.ServerControls.DropDownList.DropDownList.BuildSearchCriteriaList(textField, additionalSearchFields, queryText), false, ordering, maximumRows, startRowIndex ).ToList(); } else { return new List<StockOwner>(); } } #endregion }
Hi,
AllowAutoQueryHandler=false only works for some condition.
First, for binding OnIntializeDataSource.
Second, only can work on ISDataSource control or ObjectDatasource control because oly those controls who support Paging.
It seems you are missing some method which need to be run when using ISDataSource.
Could you please let me know more detail about your Custom Object?
Regards,Handy
My custom objects are datacontract retrieve through WCF ... but you could simulate this with any custom object.
Ok ... Setting the DataSourceId in the InitializeDataSource solves the issue
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname