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
WebGrid1_OnSynchronizeCell
I find the solution, i insert this codeSortKeyField = "productnumber"in the webcombo <ISWebGrid:WebGridColumn Caption="Product" DataMember="productid" Name="productid" SortKeyField = "productnumber" Width="190px" EditType="WebComboNET" WebComboID="WebComboProd" InputRequired="True" InputRequiredErrorText="Specify the Product." TreatMarkupAsLiteralText="True" ColumnType="Custom"> </ISWebGrid:WebGridColumn> thanks
Thanks,i try to insert in the server side this protected void WebGrid1_InitializeRow(object sender, ISNet.WebUI.WebGrid.RowEventArgs e) { if (e.Row.Type == RowType.Record) { DataRowView a = (DataRowView)e.Row.DataRow; WebGridCell productIdCell = e.Row.Cells.GetNamedItem("productid"); productIdCell.Column.ColumnType = ISNet.WebUI.WebGrid.ColumnType.Custom; string productNumber = (string)a["productnumber"]; productIdCell.Text = productNumber.Replace(" ", " ");...But it doesn't work.Is very strange because in other parts of the application the sorting working ( but they don't use the webcombo component).Is possibile that it depend because the cell of the product is a WebCombo?
This is the definition of the WebCombo in my code
<ISWebCombo:WebCombo ID="WebComboProd" runat="server" AdditionalSearchFields="ProductName, Speedy_CustProdRefDescription" DataTextField="ProductNumber" DataValueField="ProductId" MinCharsToRequest="2" Height="20px" UseDefaultStyle="True" OnInitializeRow="WebComboProd_InitializeRow" Width="550px" Latency="200" OnInitializeDataSource="WebComboProd_InitializeDataSource" OnInitializeLayout="WebComboProd_InitializeLayout" AllowWildCardSearch="True" DropDownRows="7" > <Columns> <ISWebCombo:WebComboColumn BaseFieldName="productnumber" Name="productnumber" HeaderText="Number" Width="150" /> <ISWebCombo:WebComboColumn BaseFieldName="productname" Name="productname" HeaderText="Name" Width="250" /> <ISWebCombo:WebComboColumn BaseFieldName="productid" Name="productid" Hidden="true" RenderOnHidden="true" /> <ISWebCombo:WebComboColumn BaseFieldName="Quantity" Name="Quantity" Hidden="true" RenderOnHidden="True" /> <ISWebCombo:WebComboColumn BaseFieldName="Speedy_MinimumSellingPrice" Hidden="True" Name="Speedy_MinimumSellingPrice" RenderOnHidden="True" /> <ISWebCombo:WebComboColumn BaseFieldName="Speedy_MinimumSellingQuantity" Hidden="True" Name="Speedy_MinimumSellingQuantity" RenderOnHidden="True" /> <ISWebCombo:WebComboColumn BaseFieldName="Speedy_CustProdRefDescription" Name="Speedy_CustProdRefDescription" HeaderText="Customer reference" Width="150" /> <ISWebCombo:WebComboColumn BaseFieldName="canModifyCustProdRef" DataType="System.Boolean" Name="canModifyCustProdRef" RenderOnHidden="True" Hidden="True" /> <ISWebCombo:WebComboColumn BaseFieldName="StateCode" Name="StateCode" RenderOnHidden="True" Hidden="True" /> <ISWebCombo:WebComboColumn BaseFieldName="speedy_referenceallowed" Name="speedy_referenceallowed" HeaderText="ReferenceAllowed" Hidden="true" RenderOnHidden="True" /> <ISWebCombo:WebComboColumn BaseFieldName="speedy_directdelivery" Name="speedy_directdelivery" HeaderText="DirectDelivery" Width="120" RenderOnHidden="True" /> <ISWebCombo:WebComboColumn BaseFieldName="statuscodename" Name="statuscodename" HeaderText="StatusCode" Width="120" /> <ISWebCombo:WebComboColumn BaseFieldName="speedy_special" Name="speedy_special" HeaderText="special" Width="120" Hidden="true" RenderOnHidden="True" /> <ISWebCombo:WebComboColumn BaseFieldName="speedy_prodgroupdes" Name="speedy_prodgroupdes" HeaderText="speedy_productgroupdes c" Width="120" /> <ISWebCombo:WebComboColumn HeaderText="Url" BaseFieldName="speedy_urltds" Name="speedy_urltds" Hidden="true" RenderOnHidden="true"> </ISWebCombo:WebComboColumn> </Columns> <FlyPostBackSettings PostControlState="False" PostViewState="False" /> <LayoutSettings ComboMode="MultipleColumns" EntryMode="AutoComplete" LoadMoreKeyGesture="DownArrowKey" > <ClientSideEvents OnAfterItemSelected="WebComboProd_OnAfterItemSelected" OnAfterResponseProcess="WebComboProd_OnAfterResponseProcess" /> </LayoutSettings> </ISWebCombo:WebCombo>
and the WebCombo was insert into WebGrid in this way
<ISWebGrid:WebGridColumn Caption="Product" DataMember="productid" Name="productid" Width="190px" EditType="WebComboNET" WebComboID="WebComboProd" InputRequired="True" InputRequiredErrorText="Specify the Product." TreatMarkupAsLiteralText="True" ColumnType="Custom"> </ISWebGrid:WebGridColumn>
I try to replace the webcombo with a simple WebGridColumn
<ISWebGrid:WebGridColumn Caption="Product Number" DataMember="productnumber" HiddenDataMember="productid" Name="productnumber" ColumnType="Custom" TreatMarkupAsLiteralText="true" Visible="true" Width="100px"> </ISWebGrid:WebGridColumn>
and it works.
So i think it depends of the setting of WebCombo and seems that the sorting was made for the productid ( GUID ) and not for the product number ( text)
Thanks
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