Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
58 views

Winform VB.net Datagridviewtextboxcell selectionstart and selection length

I Have a question about a winform: I need the selection start and length of textboxcell. As it is now i always get the start and length of a previous edit (eg. the values are one edit behind the ...
Loïc Van Wetter's user avatar
0 votes
0 answers
49 views

Disable row resizing on datagridview c#

I wounder how to disable or prevent users from resizing Datagridview Rows and also disable the click on the horizontal line of the rows. I have tried setting the DataGridView.AllowUserToResizeRows to ...
ABOU-YOUSSEF EL Mehdi's user avatar
0 votes
1 answer
65 views

Focus DataGridView control on a specific cell

I know there are multiple posts on this but their solution do not work for me. In a WinForms application in .Net 8.0, I have added a DataGridView control. Trying to set the focus to a specific cell ...
nepdev2's user avatar
  • 11
1 vote
1 answer
33 views

Setting the vertical alignment of grid cells

Is there a way to align the top of the cell entries in a grid row when the cells contain text that spans more than one line? Example: Test 'F'⎕WC'Form' 'F.G'⎕WC'Grid'('Values'(1 2⍴('foo',[0.5]'bar')'...
August Karlstrom's user avatar
0 votes
1 answer
33 views

How can I add items to DataGridViewComboBoxColumn

I have a a DataGridView which has a list assigned as a datasource and that list contains objects, in that list I have a List which contains objects and this object has a 'name' field. I created an ...
user28314043's user avatar
0 votes
1 answer
43 views

C# DataGridView, automatic RowHeaders size calculation

I have a custom Gridview inherit from DataGrieviw, with an automatic RowHeadersWidthSizeMode set. RowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.AutoSizeToDisplayedHeaders; It seems ...
jokn's user avatar
  • 94
0 votes
2 answers
60 views

How can I optimize loading large datasets in a DataGridView in C# (.NET Framework)?

I'm developing a Windows Forms application in C# that loads a large dataset into a DataGridView. When I load more than 10,000 records, the UI becomes very slow and unresponsive. How can I improve ...
trench74's user avatar
0 votes
1 answer
37 views

how to pass the concatinated column from datagridview to another form with specified text boxes? vb.net, mysql xampp

im using vb.net and I've ran into a problem where i have to concatinate names (e.g. sName, fName, MI) in mysql and it successfully shown in my data grid but the problem was I cannot pass the ...
rosesarecute andurtoo's user avatar
0 votes
1 answer
58 views

Where does DataGridView get its default DateTime format?

I am trying to determine where the DataGridView is getting its default format string to convert a DateTime to a String. As seen in the screenshot, on my system the date format used is yyyy-MM-dd h:mm ...
Loathing's user avatar
  • 5,246
0 votes
1 answer
33 views

How to allow user to edit column names of a DataGridView

This post generally asks how to edit the column names of a DataGridView. Here, I'm specifically interested in allowing the user to re-name the displayed column headers themselves. This answer points ...
javery's user avatar
  • 41
0 votes
1 answer
52 views

How can I add specific cells from one DataGridView in form2 to another DataGridView in form1

I am working on a .NET 8, C#, SQL Server project which is a stock management system. My issue is: I have a DataGridView in one form which is used to save invoices like this screenshot: enter image ...
Ali Aker's user avatar
0 votes
1 answer
76 views

Transposed editable DataGridView from list and datatable with vb.net

I'm Trying make Transposed editable DataGridView from list and datatable with vb.net. so in Datagridview1 Transposed editable (From list) with result in Datagridview1 non Transposed and non editable ...
dlaksmi's user avatar
  • 295
0 votes
0 answers
58 views

ReasonsGridView_CellFormatting messes up the datagridview display

I looked at this post: How can I change the background color of a row from my datagridview if column 1 holds a string with "Aborted"? to implement the change I want. But there's a ...
ratboybyron's user avatar
0 votes
0 answers
29 views

how to make the user not repeat the item (productname) in the datagridview with the cellendedit and EditingControlShowing events in the vb.net

I'm trying to make the user not repeat the item (productname) in the datagridview with the cellendedit and EditingControlShowing events in the vb.net. You can see the gif file in this post 2 items are ...
dlaksmi's user avatar
  • 295
0 votes
0 answers
20 views

how to maintain beginedit with ProcessCmdKey in datagridview with vb.net

I'm trying to maintain beginedit with ProcessCmdKey in datagridview with vb.net So I want to tab once in keyboard then beginedit in the productname column and double tab or twice tab in keyboard then ...
dlaksmi's user avatar
  • 295
0 votes
0 answers
66 views

error Option Strict On disallows operands of type Object for operator '=' in datagridview with vb.net

I have an error Error BC32013 Option Strict On disallows operands of type Object for operator '='. Use the 'Is' operator to test for object identity.in datagridview with vb.net The purpose of the ...
dlaksmi's user avatar
  • 295
0 votes
2 answers
76 views

DataGridViewCellPaintingEventArgs: Infinite repainting loop?

I'm trying to customize certain cells in a WinForms DataGridView, but I'm running into an issue where the painting event is firing over and over again non-stop forever, even when not scrolling through ...
Bighead's user avatar
  • 75
0 votes
0 answers
43 views

why I use 1 form as view and insert becomes an error in the datagridview CellValidated event with vb.net

I'm Trying to use 1 form as view and insert but becomes an error the datagridview CellValidated event with vb.net when I do a click in column Productname . can I disable the event when I use the form ...
dlaksmi's user avatar
  • 295
0 votes
0 answers
100 views

How to make bindingsource add new only limit one row in DataGridView with vb.net

I'm Trying to make bindingsource add new only limit one row in DataGridView with vb.net So if the user doubles tab in the keyboard, two empty rows appear in the DataGridView or avoiding double addnew(...
dlaksmi's user avatar
  • 295
0 votes
1 answer
54 views

C# DataGridViewComboBoxColumn Index out of range setting HeaderText in Designer file

I have a DataGridView on a form which has a ComboBox column in it. There is no data source for the grid when the form loads as it gets loaded to the grid by another method triggered by the user. When ...
welshsteve147's user avatar
0 votes
1 answer
65 views

how to maintain Selected Rows from a DataGridView Control after inserting,updating & deleting with bindingsource in vb.net

I'm Trying to maintain Selected Rows from a DataGridView Control after inserting,updating & deleting with bindingsource in vb.net. I've also used the "DataBindingComplete" event ...
dlaksmi's user avatar
  • 295
0 votes
1 answer
50 views

Access to the Cell values in each row of Datagridview

I write a foreach loop to access the value of all cells in each row of datagridveiw, but I have an Error "DataGridRow' does not contain a definition for 'Cells' and no accessible extension ...
Daryush's user avatar
  • 60
1 vote
1 answer
83 views

DataGridView I want to format the date in the tenth cell from the current date 2024-11-18T10:59:00.000+0000 to 2024-11-18

DataGridView I want to format the date in the tenth cell from 2024-11-18T10:59:00.000+0000 to 2024-11-18 The history appears to be very long and all I want is history. The date is showing too long and ...
fooof20002's user avatar
1 vote
1 answer
170 views

How to refresh via bindingsource in DatagridView in the main form when updating in other forms without closed or not in VB.NET

I'm Trying to refresh via bindingsource in DatagridView in the main form when updating in other forms without closed or not in VB.NET Please Guide me Thanks Code in autocompledatagridview (Form main) ...
dlaksmi's user avatar
  • 295
1 vote
0 answers
128 views

How to insert to a database without looping with vb.net and Have an error Value cannot be null in CellEndEdit

I'm Trying to insert to a database without looping with vb.net and Have an error Value cannot be null in CellEndEdit This post I refer to @dr.null Actually, this is related to the previous post link ...
dlaksmi's user avatar
  • 295
-1 votes
2 answers
117 views

How do I show a wifi signal strength meter in a cell of a datagridview? In C#

I have a list of different IOT, in a datagridview, in C#, that I would like to show WIFI signal strength for each on each row. This is for my own personal use. I have found a 'Signal Strength Control ...
mikep_1998's user avatar
1 vote
1 answer
119 views

Is there a way to disable drag selection in a DataGridView without disabling MultiSelect?

I am trying to display data in a table format and allow users to pick cells. However, they should only be able to pick 1 cell per column, which is why MultiSelect is required. Example of 1 cell ...
Matt's user avatar
  • 13
0 votes
1 answer
62 views

When click a row in a datagrid view , how data are autofill to relevant input fields in same form in C#?

I am doing a project on c#. I have created forms. In my userform, there are 3 input fields for user details as username, phone number and password . when i click the add button it added details to ...
Dulashani Sithara's user avatar
0 votes
0 answers
10 views

Combobox cell in DataGrid, Dropping down in one click instead of 2 - Possible?

I have a form that has a datagridview in it. I have bound this data with properties from a different class. The populating of the grid is working along with the populating from the dropdown is also ...
Tiffany Hayden's user avatar
-2 votes
1 answer
72 views

C# Incrementing Interval

I'm trying to achieve an interval the increments with each step. If the initial interval is 30 and the increment level is 1: the next interval is 31, then 32, 33... int ii = 1800 int ib = 60 private ...
Barak Stav's user avatar
1 vote
1 answer
56 views

Shift DataGridView up by one row

I've found this code to shift a column down by one row: private void ShiftColumnByOneRow(DataGridView dataGridView, int columnIndex) { if (dataGridView.Rows.Count > 1 && columnIndex >...
Barak Stav's user avatar
0 votes
1 answer
45 views

change each row color in gridview c# [duplicate]

How to do like this , each row has brown and white color in gridview c#. foreach(DataGridview row in datagridview1.Rows { row.DefaultCellStyle.BackColor = Color.Brown; row.DefaultCellStyle.BackColor = ...
WIKI's user avatar
  • 1
0 votes
0 answers
15 views

My grid cannot be found in pageSource for automation test using WinAppDriver

I have a winforms project which uses clgride / clrow / etc. However, I cannot find the related elements in the real pageSource, so I cannot fetch the cell and fill in data. Could you share how I can ...
user1765438's user avatar
0 votes
0 answers
21 views

C# Graph Auto Height from Maximum Value

I want to draw a graph, that shows integer values, and the maximum value sets the height for the rest of the entries. I'm using Paint and Rectangles. For example, if the overall graph height is 200px -...
Barak Stav's user avatar
0 votes
0 answers
38 views

Datagridview error. System.IndexOutOfRangeException: 'Index 1 does not have a value.'

I am using 2 bindlist _productList and _resultList. _resultList shows the result of when a barcode is searched. and added to _productList. _productList has an option to remove and add using buttons. ...
thorcureg's user avatar
0 votes
1 answer
155 views

how to Force user only select suggested entry from datagridview Autocomplete textbox in VB.Net

I'm Trying to Force user only select suggested entry from datagridview Autocomplete textbox in VB.Net and one more I want the "Unit" column to appear according to the database when the "...
dlaksmi's user avatar
  • 295
0 votes
0 answers
25 views

populating C# Winform DatagridView from MySQL but the records are per row (transposed) [duplicate]

Description Code Debit Credit Electricity Expenses 101020220 1,000.00 Rent Expenses 10102030 5,000.00 Fuel and Oil 110201010 2,000.00 Receivables 10301020 8,000.00 Grand Total 8,000.00 8,000.00 ...
Benj Ko's user avatar
1 vote
1 answer
101 views

DataGridView Editing in multiline mode

How do I make the DataGridView show multiline text when it is being edited? I added: dataGridView1.Columns[1].DefaultCellStyle.WrapMode = DataGridViewTriState.True; dataGridView1.AutoSizeRowsMode = ...
Barak Stav's user avatar
1 vote
3 answers
92 views

DataGridViewComboBoxCell with different entries, as selected in another DataGridViewComboBoxCell

I've been struggling with a problem of having two DataGridViewComboBoxCell columns in a datagrid. Upon changing an item in column 1 in given row, I want the corresponding cell in column 2 to change ...
kmrydlx's user avatar
  • 91
1 vote
0 answers
35 views

Excel export: extra row added above headers and missing second column from DataGridView in VB.NET

I'm working on exporting data from a DataGridView to an Excel sheet using VB.NET. However, I'm facing two issues: An extra row is being inserted above the headers in Excel The second column from my ...
Russel Tiangco's user avatar
0 votes
0 answers
63 views

DataGridView AutoGeneratingColumn event property not found

I am attempting to add the "AutoGeneratingColumn" event to a DataGridView control programmatically: DataGridView dataGridView1 = new DataGridView(); dataGridView1.AutoGeneratingColumn += ...
Barry Burns's user avatar
0 votes
0 answers
44 views

Add data to existing rows of BufDataGridView

I have a BufDataGridView called Data, and the data class of items is called Test. Data has 4 columns: Serial No, Location, Test1, and Test2. I have a function set up to import 40 rows of serial ...
Robbie Schertz's user avatar
0 votes
0 answers
64 views

System.Windows.Forms.DataGridView.CurrentRow.get returned Nothing

Private Sub SaveBtn_Click(sender As Object, e As EventArgs) Handles SaveBtn.Click Dim enter As New Apptfm ' Ensure a row is selected in the DataGridView If enter.DataGridView1.CurrentRow ...
Awit's user avatar
  • 9
1 vote
0 answers
48 views

Hoping implement color picker in a datagrid view. Code below launches the CP when the button in the DGV cell is clicked currentcell returns nothing

The currentcell in the code below returns 'nothing. Please help. Private Sub dgvDMs_CellContentClick(sender As System.Object, e As DataGridViewCellEventArgs) Handles dgvDMs.CellContentClick Dim ...
mrfowles's user avatar
0 votes
0 answers
49 views

Slow performance on write with data-bound DataGridView

I have a Windows Forms app written in C# which uses 4 data-bound DataGridView (DGV) controls. They consist of text cells and of dropdown value cells. The entire layout (including the data binding) was ...
TomS's user avatar
  • 511
0 votes
1 answer
23 views

Using BindingListView with a composite predicate

I'm using BindingListView recommended here Generic IBindingListView Implementations and I wanted to apply a composite predicate as a BidingListView filter: var lst = new List<DemoClass> ...
ShamilS's user avatar
  • 1,594
0 votes
1 answer
81 views

Datagridview Image Column - Retrieve Image Path

I have a datagridview that has a column for an Image. The user can choose an image file from their local computer and add it to the datagridview. Bitmap bmp = (Bitmap)Bitmap.FromFile(...
bjcasey's user avatar
  • 37
1 vote
1 answer
52 views

Unable to open a link with UseColumnTexForLink: True

I retrieve external data including links to profile pages In the "Url" column of the DataGridView, I configured it like this: Column Type: DataGridViewLinkColumn UseColumnTexForLink: True ...
zollen 123's user avatar
0 votes
1 answer
53 views

Winforms C# - parse DataTable into existing BufDataGridView binding source

I'm trying to write code that parses through the rows of a CSV and imports them into an existing bufDataGridView binding source named "Test" with columns already named in the binding source. ...
Robbie Schertz's user avatar
1 vote
1 answer
115 views

why event datagridview RowPostPaint output image in row header becomes blurry in vb.net

I'm Trying to use event datagridview RowPostPaint but output image in row header becomes blurry and there is a white color on each side of the in image with vb.net. If you look at the screenhot, the ...
dlaksmi's user avatar
  • 295

1
2 3 4 5
409