I am using visual studio 2008 with vb as my language. I have a databound multiextended listbox. I need to get the selected value for each item that is selected. I have searched for two weeks trying to find and answer. Can anyone help? I would greatly appreciate it.
Something is up with the way you are binding your data to the listbox in the first place, or you need to do a "DirectCast" of the item before you can see it's contents.
How about this:
For Each Item In ListBox1.SelectedItems
//Do Stuff here to the item
Next
Related
All we know the famous NotInList event of combo box in world of VB6 , VB.net and MS-Access.
Its surprising how Delphi Rad Studio does not provide this IMPORTANT frequently requested feature in their combo box and similar controls?
How to efficiently implement this in Delphi ( using Data aware combo box linked to FireDac dataset)?
We in our Application use a primitive solution as in the following:
In OnExit combo box event , we search for the .Text in associated Dataset.
if we don't find it, we show message to the user: (Item Not found in List, add it now?)
if user choose OK then we add the new item and refresh the dataset and update combo box items.
Is their more efficient way to do this?
Thanks.
I'm using and loving react-hook-form. I've run across an issue where I have a list of items (let's say in the left column), then when you click on any item it will display an edit component for the selected item in the right column. The issue is when I switch between items, nested array values don't seem to update the data correctly.
I think I understand that because a new edit component isn't created for each parent item (I'm just passing the selected index down) the nested useFieldArray in the edit component still references the first parent item. If that's the case, I'm not exactly sure how to make sure a new useFieldArray is created for each item that gets selected.
Here's a codesandbox replicating the issue:
https://codesandbox.io/s/dreamy-brattain-r74lx
Any help is much appreciated.
I think you can just map over the childItems prop of your watched item inside your <Details /> component instead of using fields. As you are using watch the <Details /> will be re-rendered after appending a new child item.
If your <Details /> component should get more complex i would also suggest to use useWatch here instead of passing watch. Check this quote from the documentation for useWatch:
Behaves similarly to the watch API, however, this will isolate
re-rendering at the component level and potentially result in better
performance for your application.
Here is an example using useWatch:
I need to allow my users to view a previously selected item from a ComboBox. A query provides the previous choice to the ComboBox.
I was hoping Live Bindings would get me through it, but it is so slow, I can't use it.
I am able to complete a similar action using a ComboEditBox, but can't seem to sort out what needs to be done with the ComboBox.
For the ComboEditBox, the following code works fine:
ComboInspector1.Text := FDQueryGetInspectionInspector_1.Text;
However, the following code does not work for the ComboBox:
ComboStationLocated.Selected.Text := FDQueryGetInspectionStation_Found.Text;
Any Ideas?
I believe you are trying to select an item based on some text, so below will select an item in the combobox if it already exists from the text of YourObject (whatever this may be)
ComboStationLocated.ItemIndex:=ComboStationLocated.Items.IndexOf(YourObject.Text);
If this is not what your are trying to do I will edit my answer.
I have two Listboxes (select_tag) containing values and I would to create a button that transfer a value from one to the other.
I would like the user to be able to click on one value or more and move them to the other list.
Only then a submit button will send it to the server.
any idea how should I implement it ?
What component/action should I use ?
any design tip or reference that will help me google further will be welcome.
check this website
http://elegantcode.com/2009/07/01/jquery-playing-with-select-dropdownlistcombobox/
basically using jQuery it's the simplest solution.
get element by it's ID or css
get selected value by selector
get other element
add value to the new list by appending html code to existing
In my application I have a TcxGrid (devexpress datagrid) that displays the data returned from a stored procedure.
Now I would like to add a column showing checkboxes from which the values cannot come from the database but are calculated internally.
When the checkboxes are clicked, some internal logic needs to be triggered.
Any suggestions?
#boris, I recommend you use the Support Center site of DevExpress for this type of question, there are thousands of articles to DevExpress products.
Anyway I leave here a link to something that might help ;)
How to set up an unbound item in a data-aware View
Are you creating the view at runtime or at designtime?
I sort of cheated when I did this at runtime, and returned a static value as one column from my query:
select false as processed,col1,col2 from table where true
I could then safely attach the dataset, and I had my new column to play with.
You would then perhaps use the properties.onChange or properties.onEditValueChanged for your logic code.