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
function WebCombo1_OnAfterItemSelected(){ var WebCombo1 = ISGetObject("WebCombo1"); var WebCombo2 = ISGetObject("WebCombo2"); var value = WebCombo1.Value; WebCombo2.SetText(value); WebCombo2.LoadValue(); }
Hello,Thank you for your question.I made a simple WebGrid sample, bind to access data source (Northwind.mdb database & Shippers table). Then I add one html input button to “BestFit” the Phone column.And yes, I can replicate your issue on my end as well.To resolve this “BestFit” issue, perhaps you could use HTML5 doctype in your page & set the “RenderingMode” in WebGrid property to “HTML5”.I attached my sample as well. Please kindly have review on my sample to see the result.Thank you very much.Regards,Hans.
Hello,Thank you for your valuable feedback.Yes I can replicate your reported problem with my simple WebInput sample.In this case, to get “May” value, you could you use up / down arrow keyboard.Please kindly have review on my sample & the video to see the result.Please let me know your response as well.Thank you very much.Regards,Hans.
Hello,Related to the “Unchecked Item” issue, after I investigate furthermore, it seems the issue occurs due to database value and data type itself.I have tried to bind the unbound column to another table (Categories table). I set the DataValue to “CategoryID” and DataText to “CategoryName”.The result is the “Unchecked Item” issue doesn’t occur, even without validation code that I wrote in my prior post.It happens due to the differences between data type in RegionDescription and data type in CategoryName.The data type of RegionDescription is “nchar” and data type of CategoryName is “nvarchar”.As we know, ‘char’ data type is used for storing fix length character strings. ‘Char’ will add the spacebar to the blank space. Unlike the ‘varchar’ data type, it will not add the spacebar to the blank space (Char_VarChar.jpg)However, in WebGrid’s InitializeRow server side event, we add the value text without blank space.It will cause the “Unchecked Item” issue occur, due to the value in database and the value in WebCombo doesn’t match. In my humble opinion, I suggest you to modify your database that using ‘char’ data type to use ‘varchar’ data type.Because as far I know the ‘char’ data type will also cause an issue / problem, when you want to do some databases query.I attached the modified sample that using Categories table as well.Thank you.Regards,Hans.
Hello,Thank you for reply.Perhaps you could you use this work around to fix this issue. I add some validation code in OnItemChecked client side event. Here’s how I implement the validation code:
function Regions_WebCombo_OnItemChecked(){ var Regions_WebCombo = ISGetObject("Regions_WebCombo"); var Values = Regions_WebCombo.GetMultipleValues(); var Rows = Regions_WebCombo.GetRows(); var rowsLenght = Rows.length; var selectedRow = Regions_WebCombo.GetSelectedRow(); var selectedRowValue = selectedRow.dataValue; var selectedRowChecked = selectedRow.childNodes[0].childNodes[0].checked; if (Values) { var valuesLength = Values.length; for (var i = 0; i < valuesLength; i++) { var valueItem = Values[i]; if (valueItem) { if (valueItem.Value == selectedRowValue && selectedRowChecked == true) { Values.splice(i, 1); } } } } Regions_WebCombo.UpdateUI(); } function Regions_WebCombo_OnShowDropDown(controlId) { var Regions_WebCombo = ISGetObject("Regions_WebCombo"); Regions_WebCombo.LayoutSettings.ClientSideEvents.OnItemChecked = "Regions_WebCombo_OnItemChecked"; }
I have modified your sample as well. Please kindly have review on the sample to see the result.Thank you very much.Regards,Hans.
protected void WebGrid1_InitializeRow(object sender, ISNet.WebUI.WebGrid.RowEventArgs e){ e.Row.Cells.GetNamedItem("Roles").Value = 1; e.Row.Cells.GetNamedItem("Roles").Text = "Research Staff"; }
And the result is the sample work fine on my end. Please kindly have a review on this modified sample as well.
To run the sample you just simple add/attach the page/file to WebGrid sample project.
Thank you very much.
Regards,
Hans.
protected void Page_Load(object sender, EventArgs e){ DataView view = Region_ISDataSource.Select() as DataView; Regions_WebCombo.PopulateUnboundData(view, true); }
Please have kindly have review on the modified sample to see the result.
You also can see on WebGrid sample, UsingWebComboNETwithMultipleSelection.aspx. This sample have similar scenario with your current scenario.
Thank you.
Hello,Thank you for your reply.I am really sorry, but I can’t run sample on my end, due to I don’t have your app_code file.Would you mind to provide the sample that I can run the sample properly?So I can help you to investigate this issue further more.Thank you very much.Regards,Hans.
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