|
Rank: Member Groups: Member
Joined: 9/1/2010 Posts: 20
|
Hi,
Hi, I really appreciate your help on my last on the grid data.
Now, I see the conditions in which I have to bring in EO.Grid radio button so that I could choose one of the existing line on EO.grid. I've tried using custom column , but the radio button only appears when I select the row. Is it possible that all the radio buttons appear at the beginning, just like a checkbox column behaviour?
Thank you
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You will need to use raw HTML to render radio buttons. For example, if you give a GridCell "123", it will display "123" in the cell. If you give the GridCell "<img src='hello.gif' />", it will display an image in the cell. If you give the GridCell "<input type='button' />", it will display a button. The idea is similar to CustomColumn, but it is raw HTML, not server controls (with CustomColumn you can put server controls in the column's EditorTemplate). Because it's raw HTML, the Grid does not offer anything else rather than a cell for you to put the HTML in. So all other issues, such as handle click event will need to be implemented by yourself.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 9/1/2010 Posts: 20
|
Hi,
Ok, thanks for your help... I will try to find a workaround for me..
|
|
Rank: Member Groups: Member
Joined: 9/1/2010 Posts: 20
|
Hi, i've use raw HTML inside Grid Cell. I'm using <input type="radio" onClick="javascript:setActive()" /> in static column. But somehow, when i click on radio button it didn't call the javascript function.
When i view source in the rendered page,it show something like this onClick=\!1javascript:setActive();\!1, and i think it's a reason why i can't call the javascript function.
Is there any workaround for this problem?
Thanks..
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You may want to try your code without the Grid first. What you see in HTML source ("\!1javascript:setActive();\\!1") is correct. The Grid escapes them when rendering them. So this is not an issue with the Grid.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 9/1/2010 Posts: 20
|
Is there a way so that the grid will not escapes them? Can you give me an example?
Thanks.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You completely missed the point. Whether the Grid escapes the code has nothing to do with you. It escapes it so that the code can be correctly transferred to the client and it will unescape it before using it. This is just like TCP adds a package header before sending the package and remove the package header when the package is received. The only thing you care about is the package data, not whether or how TCP adds the package header. Similarly, whether and how the Grid transfer the code is the Grid’s internal implementation and is completely irrelevant to whatever issue you are having.
Thanks
|
|