I'm trying to find an event for the combobox when its selected value changes , but I can't seem to find the right one since I've tried several events in the dataGridView that are just triggering at the wrong moments. I need to remove the selected item from that combobox so that it doesn't get selected again at the second combobox which usually have the same items .
I am not getting all the records.... when i select the same date in both datetimepicker no record is displayed... i also want the record of the selected dates from both datetime picker..
I have a data-bound ComboBox and I populate a DataSet with the values returned from a SQL query.
public DataSet CompanyArray(DataSet dataSet) { SqlConnection connection = InstancesTest.IDataInterface.DefineConnection(); SqlCommand command = new SqlCommand(); command.CommandText = "usp_CompanyArray"; command.CommandTimeout = 20000;
[code]....
All this works fine. The reason I populated it in an array was so that I could sort the items alphabetically. I know I could just do an "order by" in SQL but I chose this route.
What I'm after is putting a "Please Select" at index 0 in the ComboBox. How can I move this value to the top of the list, without reordering the sorted list?And I don't really want to insert a "Please Select" as a first row in a database table.
I would like to fill a combobox with particular field for example if i have atable with fields such as CustID, CustName, CustAge.
I would like to only fill the combobox with the Name filed such that only the CustNames will be field in the combobox and am able to write an event handler for the selected index.
passing selected row in gridview to my dropdown. I have 1 gridview, 1 textbox and 1 dropdown list box. My dropdown is populated by SqlDataSource from my table Country. On my gridview, I have 3 columns, which are SELECT, NAME and COUNTRY. Under SELECT column, I have my hyperlinked Select, every time I clicked on a certain row NAME will pass in textbox (no problem with that), but in my dropdown it does not populates the COUNTRY that I choose. For example, I have Jack for name and USA for country. Beside Jack and USA, I have a hyperlink Select, when I click Select, Jack will display on my textbox and supposed to be USA will display on my dropdown but not displaying instead it says an error "'cboCountry' has a SelectedValue which is invalid because it does not exist in the list of items. Parameter name: value".
actually i want to add combobox will all of the above elements in one combobox..when i double click it again..in next line another combobox will be added with all elements...
I'm working in a web aplication in c#, vs 2008, framework 3.5, I need to assign a value to a var, in this case "problemas", when I tried to save the value that I have in the checkboxlist, it does, but if don't selected, can't show 0, besides if I change the value "problemas = 9" to problemas = 111111" doesn't works.
I want to set the rootpath of an executable application. This rootpath should be the same as the path of an item that I select from a ListBox. The code for selecting the item is as follows.
namespace Menu { public partial class Form1 : Form { private Button button; private ListBox listBox1; private string selecteditem;
[Code] ....
Now what I want is: Whatever I get the output as in the :
Console.Writeline(path + selecteditem),
I would want to set this as a rootpath for an application so as to do rest of the measurements or steps only in that path/folder. Is it possible to do something like this?
I have a window in WPF which I want the user to use to enter the information for a COM Port.
The intent is to populate two ComboBoxs from a two different ObservableCollection<string> which I am having no luck with.
I don't think that it is a DataContext issue, as I am able to get something from the ComRateList when the window opens, but nothing from BaudRateList. Either way I have included the way that the window is opened and DataContexts assigned...
When the code runs, the COM Port list is updated when the window opens - However, it is not updated when the user reclicks the ComboBox which was my intended behavour.
All the adds for the BaudRateList do not populate the ComboBox for the baud rates on start up, nor when the code is running.
When I step through the code, I can see all of the BaudRateList items being added... The window is called by the main window's datasource like so...
OpenSerialCommunication OpenView = new OpenSerialCommunication(); OpenView.Show();
This opens fine.
The OpenSerialCommunication.xaml is as follows: (Note that any business names have been replaced with [snip])
<Window x:Class="[snip].SerialCommunication.OpenSerialCommunication" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:serial="clr-namespace:[snip].SerialCommunication" Title="Open COM Port - [snip]" Height="300" Width="300"> <Grid>
these function do the same of the sprintf() function. but instead we use a variable for add the result, i want to return the result. when i use it:
string f; f=ToString("hello world"); gives me several errors: "error: crosses initialization of 'std::string f'" "error: jump to case label [-fpermissive]"