Questions tagged [datagridviewtextboxcell]

91 questions
2
votes
2 answers

How to detect whether a winforms DataGridViewCell.Value is entirely visible in its cell?

I'm looking for an easy way of identifying whether a WinForms DataGridViewCell.Value is entirely visible in its cell. If the column is too narrow, only part of the value will be visible, and I need to detect that situation in code. So far I'm…
ChrisA
  • 4,163
  • 5
  • 28
  • 44
2
votes
0 answers

How to advance to the next cell when user presses down-arrow at the end of the text in a DataGridViewTextBoxEditingControl

I have a winforms application with a DataGridView that has some multi-line text cells. The default behavior of the DataGridViewTextBoxEditingControl seems strange. For some reason, if a cell is being edited and the selection is at the very end of…
Tom Bogle
  • 464
  • 4
  • 18
1
vote
1 answer

KeyPress handler being applied to wrong control

I have a .KeyPress event handler which is supposed to limit/control the keys which can be entered in a specific TextBox (more precisely, any of the textboxes in a specific DataGridViewTextBoxColumn) Private Sub dgv_EditingControlShowing(sender As…
1
vote
1 answer

Use property of a custom DataGridView Column in a custom EditingControl

I've created my own class MyDataGridViewTextBoxEditingControl and my class MyDataGridViewTextBoxCell. Inside the MyDataGridViewTextBoxEditingControl I need receive some information through properties, but I don't know how to send these values from…
1
vote
1 answer

Handling keyboard events for custom DataGridView column type

In the code below I'm extending the class DataGridViewTextBoxCell to control the values that the user will input in this field, for that I need to catch the event KeyDown. But the event is invoked only when I'm navigating in the DGV using the…
1
vote
1 answer

Replacing huge DataGridViewComboBoxColumn for performance

I have a dialog with a WinForms DataGridView that shows a user list. Each row contains an AD-User combobox (DataGridViewComboboxColumn) that can grow very large (10K+ items). This DataGridView is used to link the users with their corresponding…
1
vote
1 answer

masked Textbox control in datagridview

I have TextboxColumn in Datagridview.usually editing and entering text in this control is cumbersome.I want to make entering text in this control easy.I want following functionality. Better interface for entering text for example like. Multiline…
OnTheFly
  • 2,059
  • 5
  • 26
  • 61
1
vote
2 answers

Can a DataGridView cell be instructed to mask entered characters with an asterisk?

Is there a way to replace the characters entered in a cell of a DataGridView with an asterisk while entering them? If so, how can I do this? Any help is appreciated.
1
vote
1 answer

Display related data in a datagridviewtextboxcolumn

I have a datagridview bound to a bindingsource. Two of the columns contain values that link to the primary keys in other tables. Instead of displaying the primary key values, I would like to display the name of the item associated with the primary…
blueshift
  • 831
  • 2
  • 12
  • 24
1
vote
1 answer

Stop text from being highlighted/overwritten in a DataGridViewTextBoxCell

I am developing a Windows Forms application that uses a DataGridView for a user to enter some data. The user enters the data into a DataGridViewTextBoxCell. This works fine, however if the user wants to go back and edit that data, the existing text…
Atari2600
  • 2,643
  • 2
  • 20
  • 18
1
vote
1 answer

Host Checkbox in a DataGridViewTextBoxCell

I have a custom DataGridView with a number of different Cell Types which inherit from DataGridViewTextBoxCell and DataGridViewCheckBoxCell. Each of these custom cells has a property for setting a background Colour (needed for some functionality of…
Your_Unequal
  • 246
  • 1
  • 5
  • 17
1
vote
1 answer

DataGridViewCell trap CTRL+Up or CTRL+Down

C# form has a datagridview. I need to trap an event when CTRL+UP Arrow or CTRL+Down Arrow is pressed in a cell in edit mode. Not sure which event to handle and how it should be handled.
Rob
  • 13
  • 2
1
vote
2 answers

How to Set Value in DataGridViewTextBoxCell in WindowForm c#

I can't set Value in DataGridViewTextBox Here is my code DataGridViewTextBoxColumn tbCol = new DataGridViewTextBoxColumn(); DataGridViewTextBoxCell tbCell = new DataGridViewTextBoxCell(); tbCell.Value = "1"; tbCol.CellTemplate = tbCell; tbCol.Name…
Chanom First
  • 1,136
  • 1
  • 11
  • 25
1
vote
1 answer

How i can get result on cell leave event of datagrid view?

Here is my code That displays multiplication of Rate * Supply column values and assign it to the Amount column in data grid view : try { Query = "Select id,Code,Description,Rate,Cust_Id,Supply,Empty,Amount,Received from Items where Cust_Id='" +…
1
vote
3 answers

How to set DataGridView columns text format to uppercase by adding new property?

I have a custom DataGridView control and want to set the text format for custom columns in the designer (CellStyle builder). Let's say I want to make the text format to uppercase. After searching about this I've found some solutions with adding new…
Jooj
  • 687
  • 4
  • 15
  • 32