|
Rank: Advanced Member Groups: Member
Joined: 2/4/2009 Posts: 31
|
Hi!
I have a ASP Checkbox inside an ItemTemplate I would like to read when the user clicks a selection. Doable?
Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi, You would do something like this:
Code: C#
CheckBox cb = (CheckBox)ListBox1.Items[0].Container.FindControl("CheckBox1");
cb.Checked = true;
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 2/4/2009 Posts: 31
|
Thanks, I should have been more clear. I was looking for a client side solution. Trying to avoid the round trip to the server. Nothing in the client objects jumps out at me, but thought I would ask the experts :)
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi, From the client side the furthest you can get from the Grid is calling this method to get the root DOM element of a Grid cell: http://www.essentialobjects.com/doc/1/jsdoc.public.gridcell.getdomelement.aspxOnce you are there, everything else is yours. Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 2/4/2009 Posts: 31
|
Ok, I dont see anything like that in the ListBoxItem object? I have version 2011, something newer perhaps?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Sorry we mixed up it with the Grid. ListBoxItem does not have this yet. We might have to add one for this.
Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi, We have added getDOMElement on the client side ListBoxItem object. The code will be something like this:
Code: JavaScript
//Get the ListBox object
var lb = eo_GetObject("ListBox1");
//Get the DOM element for the first item
var e = lb.getItem(0).getDOMElement();
Please see your private message for the download location of the new build. Thanks!
|
|