Questions tagged as 'datagrid'

2
answers

How to display Menu by right clicking on a DataGridView C #?

I explain what I need: I want, by right clicking on a cell of a DataGridView that I was displayed a menu on it (on the cell) . The problem is: When you right-click the menu, it always appears in the upper part of DataGridView...
asked by 21.02.2018 / 15:30
1
answer

VB.NET DataGridView change image style (tile, stretch, center, zoom)

How can I change in a Picture Cell of a DataGridView, that the image be seen in tile, stretch, center or zoom mode? By default I get the image that protrudes from the Cell and I need it to look whole.     
asked by 29.06.2018 / 06:48
1
answer

How to delete not only datagrid rows, but also columns from header c #?

I'm doing this to erase the rows of my datagrid.Rows.Clear (); this erases the rows to me, but it leaves me the headings and I also want to erase the columns, how do I do it? the rows and columns are added by code datagrid.rows.add (), not fi...
asked by 05.12.2018 / 19:40
1
answer

Assign variable in CellClassRules AgGrid Angular2

I have the following code that works but it has the problem that I have to define 'green' about 20 times, I want to call a function and in that function if it fulfills it that returns the 'green' or in the future another different chain....
asked by 03.05.2018 / 12:50
1
answer

Problem building data from a DataSet manually C #

I have a dataset that contains a structure of 12 columns and I manually add 3 columns Entrada Parámetro , Salida Parámetro and Parámetro from another dataset , then link it to DataGridView , I am working w...
asked by 15.02.2018 / 20:55
2
answers

Move Previous / Next Record in DataGridView, C #

I am browsing the DataGridView records through the actions of the Anterior and Siguiente buttons, the current method that works correctly to scroll through each record. But I used this code for combining the same cells in...
asked by 09.02.2018 / 14:48
1
answer

filter data datagriddview, data table C #

Is it possible to filter data from a datagridview without first loading the data? Is that I have a data gridview that I load with information from the active directory which I assign to a datatable and later this datatable I assign it as datasou...
asked by 06.02.2018 / 19:11
1
answer

Export from datagridview to excel certain columns

I have a question. I have this code for filling out a datagridview, which gets the data from an excel document. string constr = (@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + textBox1.Text + ";Extended Properties=Excel 12.0 Xml;"); O...
asked by 18.04.2017 / 16:23
1
answer

how can I save all the data from a DataGridView in a txt file in C #

I already try to do it but it only saves me the first line (that of the titles) and I need to start saving from the second line to the bottom. this is my code: private void btnguardar_Click(object sender, EventArgs e) { StreamWriter esc...
asked by 09.06.2018 / 10:48
1
answer

Problem C # winforms LinQ

I am working CodeFirst and I have the following table in my DB and when I want to show it the query in a DataGridView brings all fields, but I want to show only 2, exactly the name and the price. What should I modify in the Linq query? var pro...
asked by 20.06.2018 / 18:30