Questions tagged as 'windows-forms'

1
answer

Concurrency violation: the UpdateCommand affected 0 of the expected 1 records. error datagridview?

I was developing an application in windows form but when wanting to update the datagridview and save it in the database this error occurs:    Concurrency violation: the UpdateCommand affected 0 of the expected 1 records. all within the me...
asked by 17.02.2018 / 02:17
1
answer

Change color selected item in CheckBoxList, C #

Is it possible to change the background color of the selected item in a CheckBoxList? Something like this: foreach (var item_select in checkBoxList1.CheckedItems) { checkBoxList1.Items[item_select].BackColor = Color.SeaGreen; }...
asked by 23.01.2018 / 20:52
1
answer

Indicate that a record already exists in the database

I would like to know how I do to indicate within the code, that the product already exists in the database. I explain: The form asks to enter an existing code, it is searched in BD, it is obtained and it shows the user a message that indi...
asked by 20.02.2018 / 14:56
1
answer

Search for matches in a text string from a list?

I want to develop a very simple application but I'm blocked because I do not know how to start. The idea is: I have a list of authors in a TXT file I introduce a text string where several authors are separated by commas in a text box...
asked by 20.01.2018 / 16:38
1
answer

how to minimize and maximize?

What kind of event do I need to be able to minimize and maximize, but by clicking in the icon of my application from the taskbar? The only thing I have is the following code: WindowState = FormWindowState.Minimized; I hope you can help m...
asked by 11.01.2018 / 01:38
2
answers

Problem: Set SelectedValue in DataGridViewComboBoxColumn, C #

A DataGridViewComboBoxColumn does not have the properties SelectedIndex , and SelectedValue . However, I want to get the same behavior of SelectedValue    I have a DataGridView that contains several columns of whic...
asked by 09.01.2018 / 21:23
2
answers

Pass values from a DataGridView to ComboBox and TextBox

I have the following conflict, when trying to pass the values of each row of my datagrid to the other contours of my form since it only loads the values of the first row and I require that according to the row on which the user clicks. load the...
asked by 26.01.2018 / 01:37
3
answers

When entering the temperature value, I must determine the type of climate

When entering the temperature value, I must determine the type of climate. must be done with Windows forms.    Temperature 10 and = 21 and 30 = Tropical This is the code I have: private void btnAceptar_Click(object sender, EventArgs...
asked by 11.11.2017 / 18:50
1
answer

Ordering error datagridview in c #

They could help me to solve this error, it works in a normal datagridview , but in this it does not work, in this datagridview I select any data and it puts it in texbox . It works in this way so that you can understand me...
asked by 26.10.2017 / 00:13
1
answer

How to create a Switch on / off button in c #

I am trying to create a swtich on / off for a desktop opalance in C # but I do not find any recent documentation of this, only half-finished documents or the examples I have tried have not worked Currently I'm trying to control the Checbox by...
asked by 04.10.2017 / 19:17