acceptsreturn button in datagrid

GornHorse

Centurion
Joined
May 27, 2003
Messages
105
Location
Australia
Hello there...

Why is it that when i press <enter> or <return> inside a datagrid it will not call the forms acceptbutton unless i physically click the mouse inside the datagridcell and then press either <return> or <enter>??

How can i fix this problem so that no matter where or when i press either the <return> or <enter> button the acceptbutton.click event will be fired?

It's almost as if it doesn't see that the datagridtextboxcolumn does not see the <enter> or <return> button during editing, as it will only fire when focus has been taken away from that cell and then clicked the cursor back into it with the mouse?

Please someone help me with this???


Thanks,
michelle
 
Hi,
When we click on the cell only the TextBox in the DataGridTextBoxColumn Instantiates. Before that it is just a label to see the data. Whenever you click on the cell it will show u the textbox. It is because that to reduce the consumption of memory. If the control is instantiated initially and if the grid is having 100 of rows then 100 instances of the text boxes will be in the memory which is not feasible.

regards,
ramnadh.

Why is it that when i press <enter> or <return> inside a datagrid it will not call the forms acceptbutton unless i physically click the mouse inside the datagridcell and then press either <return> or <enter>??

How can i fix this problem so that no matter where or when i press either the <return> or <enter> button the acceptbutton.click event will be fired?

It's almost as if it doesn't see that the datagridtextboxcolumn does not see the <enter> or <return> button during editing, as it will only fire when focus has been taken away from that cell and then clicked the cursor back into it with the mouse?

Please someone help me with this???


Thanks,
michelle[/QUOTE]
 
Back
Top