3
Answers

DataGrid Template Column Unique Id's

Nick Harrison

Nick Harrison

14y
3.8k
1
Does anybody know of a reason why a data grid would not generate unique Ids for the inputs in a template column?
I have a bound datagrid in a web page, each of the columns is a template column, with either a drop down list or a text box in it. I add ten lines to my underlying datasource and bind. The resulting table displays but each of the columns has the same ID for the control contained in it, the grid should be generating unique Ids based on its container. Flumoxed I am.
Answers (3)
0
Vulpes
NA 98.3k 1.5m 11y
Try this code:

private void Form1_KeyDown(object sender, KeyEventArgs e)
{
   pressed = true;
   label1.Text = "Key Pressed: " + e.KeyCode;
   timer1.Stop();
   timer1_Tick(timer1, EventArgs.Empty);
   timer1.Start();
}