Hello,
I had a project with exactly the same requirement and this is how I did it:
1) write a javascript to invoke the keyboard:
function PopupKeyboard() {
try{
var focusedElement = document.activeElement;
if (focusedElement.readOnly == false) {
var shell = new ActiveXObject("WScript.Shell");
var r = shell.Run('"C:/Program Files/Common Files/microsoft shared/ink/tabtip.exe"', 0, true);
setTimeout(function () {
if (focusedElement != null)
focusedElement.focus();
}, 100);
}
} catch (Exception) { }
return false;
}
Then write a little helper method to invoke the script:
private static void SetOnClickEvent(ControlCollection controls)
{
Control childControl = default(Control);
foreach ( childControl in controls) {
if (childControl is TextBox) {
TextBox textbox = (TextBox)childControl;
textbox.Attributes("onclick") = "PopupKeyboard()";
} else if (childControl is GridView) {
GridViewRow row = default(GridViewRow);
foreach ( row in ((GridView)childControl).Rows) {
SetOnClickEvent(row.Controls);
}
}
SetOnClickEvent(childControl.Controls);
}
}
Call the helper in the load event of the pages
SetOnClickEvent(page.Controls)
Valery.