Questions tagged as 'c#'

1
answer

Add row to DataGrid with DataSource defined

I have DataGridView that has DataSource setado with List<MinhaClasse> and would like to add a new line to it. I know this is not possible using the AddRow() method of DataGrid . Is there any way I...
asked by 16.10.2015 / 21:53
1
answer

Feed list gives "Index out of range"

On my system, I need to return the number of questions the student missed on a given topic. To achieve this, I tried creating a class that has two attributes: Tema and QteErros and instantiated it in my controller. public ActionR...
asked by 14.10.2015 / 02:25
1
answer

View a Direct Message on the MainPage page

How to display a message directly from MainPage, I'm using MessageDialog, as per the code below: namespace App4 { /// <summary> /// An empty page that can be used on its own or navigated to within a Frame. /// </summary>...
asked by 27.09.2015 / 22:37
1
answer

ComboBox in WPF - How to populate using MVVM

I am having doubts on how popular a ComboBox in WPF using the MVVM standard. Here in Stackoverflow there is a similar question to mine, but it was not answered ( # ). I searched and saw that people mixed the Persistence layer a bit with View...
asked by 07.10.2015 / 05:13
2
answers

Write in the "Command Line" by C #

Good, I have a program that uses the command line, but I can only get it to write "one line", and I needed it to write more than one without deleting what was already written ... What I have so far: CODE private void button3_Click(obj...
asked by 06.10.2015 / 15:37
2
answers

Linq, Join by comparing with Like

I have a question regarding Linq. As I have observed some codes, they usually use for example: var _s = (from p in exemplo1 join q in exemplo2 on p.blabla equals q.blablabla I would like to know if a structure like for example t...
asked by 10.03.2016 / 18:25
1
answer

Retrieving FindControl from parent repeater in event of child repeater

I'm having trouble getting a field from my parent repeater in the click of my linkbutton that is inside another repeater (child). My parent repeater contains the report code and other information and my child repeater contains the dates for t...
asked by 25.02.2016 / 12:52
1
answer

Application stopping when there are many users accessing

My application is crashing and I do not know exactly why. The only thing I notice is that when there are many users accessing, or making requests this happens. When it happens, I have to restart the application pool and lift the application a...
asked by 16.03.2016 / 15:04
1
answer

How to identify the Entity that throws the error when saving?

In my application, with Entity Framework, I make a query in an Entity Framework: var lista = contexto.Rodada.Where(condições); Then iterate over this list with a foreach. During the iteration there are "updates" and "inserts" of several...
asked by 17.03.2017 / 22:21
3
answers

Dynamic Search in C # and WPF

Good morning I would like to ask you a question about a dynamic search. Scenario: I have a search screen where the user selects 3 fields, which are: The first is the field of the search screen, where you select which field you wan...
asked by 20.03.2017 / 15:49