Questions tagged as 'c#'

0
answers

help with autocomplete in dynamically created elements

I appeal to you because I have not been able to implement the autocomplete in dynamically created elements with jquery, I do it in the following way. $('#addMarcaTabla').click(function () { var html = ''; html += '<tr class="...
asked by 30.01.2018 / 21:23
0
answers

How to change a cell background of a DataGrid in a style based on the current element of a collection

I have a collection of objects that have a collection of other objects in the following way: public class Elemento { public string Nombre {get; set;} public ObservableCollection<OtroObjeto> Lista {get; set;} } In WPF, I link...
asked by 30.12.2017 / 23:13
2
answers

How to know if a textbox.text is number or character in c #?

I want to know if it is a number or letter the textbox that you enter by keyboard if (txtCodigo.Text) { MessageBox.Show("son numeros"); } else {...
asked by 10.10.2017 / 18:12
1
answer

How to clean the contents of a DataGrid?

I have a (WPF) window and a C # code that contains the following One button: <Button x:Name="btnBuscar" Content="Buscar por" HorizontalAlignment="Left" Margin="157,10,0,0" VerticalAlignment="Top" Width="85" Height="30" Click="btnBuscar_...
asked by 09.04.2018 / 07:38
1
answer

How to make a validation in C #?

I'm new to this C # and my question is: how can I do a number validation for a calculator? I would like to apply the validation in this part of my code: float a, b; Console.Write("INGRESE PRIMER VALOR: "); a = float.Parse(Console.ReadLine()...
asked by 27.06.2017 / 05:39
2
answers

How do I write in a text file?

Good, I am more or less new in c #, in access to data and others, and I need to go making a log of where my program goes until the end, to know by try catch and others how it works. My question was, how can I make it write messages in...
asked by 20.09.2017 / 15:58
4
answers

Know when to use the keywords new and override

What is the difference between using keywords new and override when creating a method in a class that inherits from another which has a method with the same name? A basic example with the classic method ToString() priva...
asked by 01.09.2017 / 22:03
3
answers

Load two or more rows to a DataTable by means of a Button

Good morning everyone, I'm using the following method to load a DataTable that in turn will show this information within a DataGridView , the problem I have is that by pressing the button I should add each new record to the Data...
asked by 28.11.2017 / 19:37
2
answers

Asynchronous javascript calls and asynchronous task .net

In my work a colleague made a statement, he said that it did not make sense to do an asynchronous method in c # if in ajax . What would be the advantage of having an asynchronous call in
asked by 20.07.2016 / 18:05
2
answers

Format 001-000001 in a textbox (editbox)

I want to enter data into a text box the app is windows forms, what I want to enter is in this format 001-000001 the first two digits are zero the third digit of 1 to 9 the fourth digit a - of the fifth digit to the t...
asked by 27.07.2016 / 03:13