Click here to Skip to main content
15,914,795 members
Home / Discussions / C#
   

C#

 
AnswerRe: conver speech to the text Pin
Richard MacCutchan18-Mar-14 22:29
mveRichard MacCutchan18-Mar-14 22:29 
GeneralRe: conver speech to the text Pin
mohammad_mgh99118-Mar-14 23:12
mohammad_mgh99118-Mar-14 23:12 
AnswerRe: conver speech to the text Pin
Bernhard Hiller19-Mar-14 0:37
Bernhard Hiller19-Mar-14 0:37 
QuestionHow many dynamic check boxes are checked Pin
NYCABR18-Mar-14 7:42
NYCABR18-Mar-14 7:42 
AnswerRe: How many dynamic check boxes are checked Pin
BillWoodruff18-Mar-14 22:08
professionalBillWoodruff18-Mar-14 22:08 
GeneralRe: How many dynamic check boxes are checked Pin
NYCABR19-Mar-14 3:10
NYCABR19-Mar-14 3:10 
Questionc# - accessing a web service using Soap XML request client through tls authentication Pin
Member 1067924618-Mar-14 2:00
Member 1067924618-Mar-14 2:00 
QuestionHow to create Textbox with ellipse button Pin
ahmed_one18-Mar-14 1:31
ahmed_one18-Mar-14 1:31 
AnswerMessage Closed Pin
18-Mar-14 3:09
professionalBillWoodruff18-Mar-14 3:09 
GeneralRe: How to create Textbox with ellipse button Pin
Wayne Gaylard18-Mar-14 3:49
professionalWayne Gaylard18-Mar-14 3:49 
GeneralRe: How to create Textbox with ellipse button Pin
BillWoodruff18-Mar-14 4:43
professionalBillWoodruff18-Mar-14 4:43 
GeneralRe: How to create Textbox with ellipse button Pin
ahmed_one18-Mar-14 5:19
ahmed_one18-Mar-14 5:19 
AnswerRe: How to create Textbox with ellipse button Pin
Ravi Bhavnani18-Mar-14 5:26
professionalRavi Bhavnani18-Mar-14 5:26 
GeneralRe: How to create Textbox with ellipse button Pin
ahmed_one18-Mar-14 5:31
ahmed_one18-Mar-14 5:31 
GeneralRe: How to create Textbox with ellipse button Pin
Ravi Bhavnani18-Mar-14 5:39
professionalRavi Bhavnani18-Mar-14 5:39 
GeneralRe: How to create Textbox with ellipse button Pin
BillWoodruff18-Mar-14 6:07
professionalBillWoodruff18-Mar-14 6:07 
GeneralRe: How to create Textbox with ellipse button Pin
Ravi Bhavnani18-Mar-14 6:33
professionalRavi Bhavnani18-Mar-14 6:33 
AnswerRe: How to create Textbox with ellipse button Pin
Ravi Bhavnani18-Mar-14 5:42
professionalRavi Bhavnani18-Mar-14 5:42 
GeneralRe: How to create Textbox with ellipse button Pin
ahmed_one18-Mar-14 5:51
ahmed_one18-Mar-14 5:51 
GeneralRe: How to create Textbox with ellipse button Pin
Ravi Bhavnani18-Mar-14 6:06
professionalRavi Bhavnani18-Mar-14 6:06 
AnswerMSDN solution Pin
Ravi Bhavnani18-Mar-14 6:08
professionalRavi Bhavnani18-Mar-14 6:08 
AnswerRe: How to create Textbox with ellipse button Pin
BillWoodruff18-Mar-14 6:01
professionalBillWoodruff18-Mar-14 6:01 
GeneralRe: How to create Textbox with ellipse button Pin
ahmed_one18-Mar-14 6:18
ahmed_one18-Mar-14 6:18 
GeneralRe: How to create Textbox with ellipse button Pin
BillWoodruff18-Mar-14 7:00
professionalBillWoodruff18-Mar-14 7:00 
AnswerRe: How to create Textbox with ellipse button Pin
Alan N18-Mar-14 7:36
Alan N18-Mar-14 7:36 
Why not just add a column of buttons next to the text column. The simplest and easiest way to do this would be to add an unbound DataGridViewButtonColumn to the DataGridView in the DataBindingComplete event and then handle the CellContentClick event to respond to button clicks.

Sample event handlers for a DataGridView 'dgv' on a Form 'Form1'

C#
int buttonColumnIndex;  // to identify the button column in the CellContentClick handler

public Form1() {
  InitializeComponent();
  // add the event handlers
  dgv.CellContentClick += new DataGridViewCellEventHandler(dgv_CellContentClick);
  dgv.DataBindingComplete += new DataGridViewBindingCompleteEventHandler(dgv_DataBindingComplete);
}

private void dgv_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e) {
  DataGridViewButtonColumn bc = new DataGridViewButtonColumn();
  bc.Name = "ButtonColumn";
  bc.HeaderText = "";
  bc.UseColumnTextForButtonValue = true;
  bc.Text = "Edit";
  bc.AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
  buttonColumnIndex = dgv.Columns.Add(bc);
  // Column will be at the right, move to the required position
  // e.g move to left
  dgv.Columns[buttonColumnIndex].DisplayIndex = 0;
}

private void dgv_CellContentClick(object sender, DataGridViewCellEventArgs e) {
  if (e.ColumnIndex == buttonColumnIndex) {
    MessageBox.Show(String.Format("Edit button clicked on row {0}", e.RowIndex));
  }
}

Alan...

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.