1. There is buggy thing in HyperLinkField to stop javascript code to execute(you simply can't successfully call window.open("xx","xx","width=xx,height=xx....")), you can google this.
Of course, you cannot directly call window.open in HyperLinkField, neither Hyperlink cannot. Because the method returns window object, after calling, caller windrow shows [object] (in IE) or [object Window] (in FF). Solution is you create a simple javascript function like
function newWin()
{ var win = window.open(URL,...);
win.focus();
} Then set HyperLinkField’s NavigateUrl="javascript:newWin();"
2. For built-in CheckBoxField, there must be a bool type field in database table. What if I need checkbox on right hand side for choosing specific row, basically the only thing I can do is with Custom TemplateField.
Basically CheckBoxField is also a bound field. The major purpose is to show data rather than operation purpose. However, it’s possible to use it as operation purpose.
3. the reason adding custom TemplateField generates blank column, I have no clue so far. You can try to do yourself, see if there is something happening.
No blank column when I try it. If I were you, I would check my code (in both .cs and .aspx files) very carefully.
Of course, you cannot directly call window.open in HyperLinkField, neither Hyperlink cannot. Because the method returns window object, after calling, caller windrow shows [object] (in IE) or [object Window] (in FF). Solution is you create a simple javascript function like
function newWin()
{ var win = window.open(URL,...);
win.focus();
} Then set HyperLinkField’s NavigateUrl="javascript:newWin();"
2. For built-in CheckBoxField, there must be a bool type field in database table. What if I need checkbox on right hand side for choosing specific row, basically the only thing I can do is with Custom TemplateField.
Basically CheckBoxField is also a bound field. The major purpose is to show data rather than operation purpose. However, it’s possible to use it as operation purpose.
3. the reason adding custom TemplateField generates blank column, I have no clue so far. You can try to do yourself, see if there is something happening.
No blank column when I try it. If I were you, I would check my code (in both .cs and .aspx files) very carefully.