Welcome Guest Search | Active Topics | Sign In | Register

Radio Button column on EO.Grid Options
Alex
Posted: Tuesday, November 23, 2010 6:06:04 AM
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
eo_support
Posted: Tuesday, November 23, 2010 9:56:35 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,072
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!
Alex
Posted: Wednesday, November 24, 2010 5:58:11 AM
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..
Alex
Posted: Wednesday, November 24, 2010 11:04:23 AM
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..
eo_support
Posted: Wednesday, November 24, 2010 1:23:56 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,072
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!
Alex
Posted: Thursday, November 25, 2010 9:14:38 PM
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.
eo_support
Posted: Thursday, November 25, 2010 9:32:39 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,072
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


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.