listbox

GAS Listbox breaks doPost

谁说我不能喝 提交于 2019-12-11 13:34:45
问题 Code works ok and posts (except cell 3 says "not found" where i deleted the email field, any help here is also welcome) until i add the second listbox (listitems2) somehow it breaks the code and it wont post. The execution transcript shows no issues on doGet so I assume the problem is in doPost. Any help is much appreciated var submissionSSKey = '...LE0tU'; var docurl = 'https://docs.google.com/spreadsheets/d/...LE0tU/edit' var listitems = ['Select a Location','A Res','B Res','C Res','D Res',

ListBox Selected Item

╄→尐↘猪︶ㄣ 提交于 2019-12-11 13:16:36
问题 I am developing a wpf app. I have a database like this. I have three columns(id,name,profession).listbox shows name column. When the user clicks the item in listbox, i wanna show his/her profession in textblock. listbox works well. I have bounded it to a dataview. but how can i show his/her profession in textblock? private void listBox1_SelectionChanged(object sender, SelectionChangedEventArgs e) { //What can I write here? } 回答1: You should proably just bind the text attribute of the

Moving Data From Databound Listbox To Unbound Listbox And Back VB.NET

孤街浪徒 提交于 2019-12-11 12:46:56
问题 So I have been browsing about and there are a lot of explanations on how to move data from listbox to listbox. I have a listbox bound to a source from my SQL server and another unbound. My aim is to move the data from the first (LBsearch) to the second (LBselect) and back. I have seen people say use LBselect.Items.Add(LBsearch.SelectedItem) however it doesn't return data and instead shows System.Data.DataRowView . I've tried many different suffixes and all show this apart from LBsearch.text .

How VerticalOffset changes when Scrollable height changes while having list inside a list

天大地大妈咪最大 提交于 2019-12-11 12:43:38
问题 I am making a WP7 app which has a Listbox of UserControls. Each UserControl has an ItemsControl and Button(for getting more results). On click of the button the ItemsControl items will be increased by 5 or 10. Now on clicking on the GetMore button of any of the usercontrols except the first or last, there will be an increase in Scrollable height(Total height of the listbox) of the ListBox but the VerticalOffset(position of scrollbar from top) of the ListBox remains same. Now the problem I am

ListBox in devexpress gridview in c#

懵懂的女人 提交于 2019-12-11 12:41:00
问题 I have a gridview as you can see here: As you can see i read the data in materialrequestcontractorId i have a listbox that this listbox reads its value from the database as you can see here: List<MaterialRequestContractor> lstMRC = _materialRequestContractorRepository.Get().ToList(); foreach (MaterialRequestContractor VARIABLE in lstMRC) { LstMaterialRequestContractorId.Items.Add(VARIABLE.Id); } But the problem is i need to show my user the name of my MaterialRequestContractor not its id ,the

Userform listbox rowsource not populating

99封情书 提交于 2019-12-11 12:19:19
问题 I have a userform with an OK and Cancel button and a listbox. It is supposed to populate using this code: Private Sub UserForm_Initialize() Me.StartUpPosition = 0 Me.Top = Application.Top + (Application.Height / 2) - (Me.Height / 2) Me.Left = Application.Left + (Application.Width / 2) - (Me.Width / 2) With Me.ListBox1 .RowSource = "" .ColumnCount = 7 .ColumnWidths = "80;100;20;1;20;1;1000" .RowSource = Sheets("BOH Database").Range("H9:N14").Address ' .RowSource = Sheets("BOH Database").Range(

Bind List<Double> to WinForms-Listbox

可紊 提交于 2019-12-11 11:57:12
问题 I have an small (probably dumb) issue with databinding. I try to bind a List List<double> _measuredValues = new List<double>(); to a winforms ListBox. In Form_Load I set: lstMeasuredValues.DataSource = _measuredValues; When I update the values, nothing appears?! _measuredValues.Add(numBuffer); One thing I thought about is a data type issue. But how do I change the type just to change it into a string? lstMeasuredValues.DataSource = _measuredValues.ToString().ToList(); Another reason might be

Removing items from listbox according to their values VBA

我的梦境 提交于 2019-12-11 11:53:52
问题 I'm trying to delete all the items in a user form list-box except for specific values lets say I want to delete everything in my list-box except "Cat" and "Dog" I wrote: For i = 0 To ListBox2.ListCount - 1 If ListBox2.List(i) <> "Cat" or ListBox2.List(i) <> "Dog" Then ListBox2.RemoveItem i End If Next For some reason it doesn't work, I tried to find a solution but I couldn't. What is wrong here? 回答1: Use backwards loop: For i = ListBox2.ListCount - 1 To 0 Step -1 If ListBox2.List(i) <> "Cat"

Access VBA listbox method .Selected versus .ItemData

喜夏-厌秋 提交于 2019-12-11 11:27:07
问题 While working on an application I had trouble getting a selected item in my listbox to actually output the correct row value. I was using the .Selected method to choose which row needed to be selected in order to proceed to the next step, which would pull the bound column's value from the listbox for further processing, without the need of the user to interact with the listbox. It turns out that .Selected doesn't work the same way as clicking on a listbox row, as its output value remains the

Sending a textbox string from one form to a listbox in another form

一笑奈何 提交于 2019-12-11 11:23:44
问题 I have uploaded my code below. The problem I am facing is trying to get the text from the textBox1 & textBox2 in form2 into the listBox in form1. When the user opens the 2nd form, they should place text into the textboxes and upon clicking the button - it should close the form2 and insert the text into form1's listBox I have tried multiple things but I can't seem to do it. I am also quite new to c# coding and have just started on windows forms so any help would be much appreciated. FORM 1