I am dynamically creating templated columns which is determined by the 'Data Type'
gvMC.Rows(i).Cells.FromKey("Response").Value = ctrlString
Where ctrlString can be ie. "<input type='text' name='header' size='50' />" OR "<textarea name='comments' rows='3' cols='50'>" etc..
The problem with these controls in the grid is that they do not function properly. I cannot press the 'delete' or 'spacebar' in the text control
and in the textArea control i sometimes cannot type without holding the mouse button down. Its as if the grid cell click is overriding the fact that the Html control has focus..
What can I disable in the grid to get these controls to function normally? Do i need javascript to set focus to the Html controls?
Thanks ,
MC
You'll need to use a templated column to display the textbox. The grid's activation code captures most of the mouse and keyboard events and uses them to do navigation and text entry in the grid. It has some special code to exclude elements inside a templated column from this logic.
You can find out about column templates here: http://help.infragistics.com/Help/NetAdvantage/NET/2007.3/CLR2.0/html/WebGrid_Using_Column_Templates.html
Helen
Thanks, but that's for creating the columns at design time . I'm creating each HTML control dynamically based on another column.
The only problem I'm having now is with the text area control.
gvMC.Rows(i).Cells.FromKey("Response").Value ="<textarea name='comments' rows='3' cols='50' />"; Just about every mouse click on the control is getting overridden by the grid's code - which moves focus outside the txt area not allowing the user to type. Turning on the 'Templated Column' property on that col does not change the overriding code