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 set a linqdatasource to a webcombo and set its value field to "Id" and text value field to "Name" and when no onselecting event is set to linqdatasource; all of the text values are shown as expected.
But when I set a onselecting event to the linqdatasource just to filter the values to only get the values when "Type" column is "1"; webcombo shows the Id values instead of the text values "Name".
onselecting event is like:
dataSource1.Where = @"Type = 1"
Thanks in advance.
Hello,I apologize for any inconvenience this problem may have caused you.I have made a simple sample that maybe similar with your application scenario.I use LinqDataSource with Northwind.mdf database and Shippers table. Then I bind to WebCombo. In WebCombo, I set DataTextField property to "Phone" & DataValueField to " CompanyName ".In Selecting() server side event, I add query code like you did. Here’s the snippet code below:
protected void LinqDataSource1_Selecting(object sender, LinqDataSourceSelectEventArgs e){ LinqDataSource1.Where = @"ShipperID=1"; }
But unfortunately, I can’t replicate your issue on my end. I attached the screenshot of my sample’s result (wcLinqDataSource.jpg file). Actually, to filter another field that is not the value or text, simply use “AdditionalSeacrhProperty”. By using this property, you would no longer to requery manually.For further information about AdditionalSearchField feature, you could in WebCombo’s documentation. You also could see in WebCombo’s sample (AdditionalSearchField.aspx)But if that feature doesn’t suit with your scenario, would you mind to telling me step-by-step How can I reproduce your issue.Or if you don’t mind, could you attach your simple sample that indicate your issue? So I can analyze your issue.Thank you.Regards,Hans
Sorry for the disturbance I've given; thanks to you, I could easily understood the problem that I've been ignoring from the beginning assuming that the control had a fault, not mine.
I was applying the where condition after a if (!IsPostback) condition so the initial binding was not included in the webcombo.
Once I removed this (extremely fool attempt of me) condition, everything worked file.
Seems like, all I need was somebody saying that "control is not the problem" afterall.
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