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
Hi,
I need to bind webcombo inside webgrid based on other column.
I have senario bellow:
Columns: Id, Name, Email, PinCode, State and Phone
1. I want to dynmic binding in "State" column based on pincode.
2. While edit the row, when I change the Pincode, automatically related types of "states" to be populated in "State" Column.
I have attached a picture so that my question to be cleared.
waiting for your reply soon.
Thanks in Advanced.
Regards
Rupesh Shakti
(Software Developer)
Hi Rupesh,
You could achive this by applying an additional filter to WebCombo based on related column when you enter edit mode. As an example, you could run the following javascript as WebGrid OnEnterEditMode client side event handler:
WebGrid_OnEnterEditMode = function (controlId, tblName, editObject){ var cell = editObject.ToCellObject(); if (cell.Name == "State") { if (editObject.type == "WebComboNET") { var pincode = cell.Row.GetCells().GetNamedItem("Pincode").Value; var webCombo = editObject.element; var tempValue = webCombo.Value; var tempText = webCombo.Text; if(pincode == "") webCombo.ClearAdditionalFilters(); else webCombo.SetAdditionalFilters("[State_Pincode] = '" + pincode+ "'"); webCombo.Value = tempValue; webCombo.SetText(tempText); } } }
That should do it. Please note that setting the additional filter for the same column as DisplayMember might cause an unwanted user experience.
Best Regards,Leo
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