Welcome Guest Search | Active Topics | Sign In | Register

Grid RaisesItemCommand Question Options
Ccolse
Posted: Thursday, December 16, 2010 4:01:05 PM
Rank: Newbie
Groups: Member

Joined: 11/29/2010
Posts: 7
Hi there,
I got a grid with no buttons inside. Instead i got two dropdownlist.
I want to raises server event when selecting drop, or when ClientSideEndEdit event in cell

This is my code:

html:

<eo:CustomColumn HeaderText="1RA MITAD" Width="110" DataField="Mitad1" ClientSideBeginEdit="IniciaEdicionMitad1" ClientSideEndEdit="FinalizaEdicionMitad1">
<EditorTemplate>
<select id="cboMitad1" style="width:110px">
<option>-Seleccione Pizza-</option>
<asp:Repeater ID="repMitad1" Runat="server">
<ItemTemplate>
<option value='<%#DataBinder.Eval(Container.DataItem, "NomProducto")%>
<%#DataBinder.Eval(Container.DataItem, "NomProducto")%></option>
</ItemTemplate>
</asp:Repeater>
</select>
</EditorTemplate>
<CellStyle CssText="text-align: center; color: #000000;" />
</eo:CustomColumn>


javascript:

function IniciaEdicionMitad1(cell) {
IndiceItem = cell.getItemIndex();
var ValorCelda = cell.getValue();
var dropDownBox = document.getElementById("cboMitad1");
for (var i = 0; i < dropDownBox.options.length; i++) {
if (dropDownBox.options[i].value == ValorCelda) {
dropDownBox.selectedIndex = i;
return;
}
}
dropDownBox.selectedIndex = 0;
}

function FinalizaEdicionMitad1(cell) {
var dropDownBox = document.getElementById("cboMitad1");
var selectedIndex = dropDownBox.selectedIndex;
if (selectedIndex == 0)
dropDownBox.selectedIndex = 1;

var grid = document.getElementById("gridMitades");
grid.raiseItemCommandEvent(0, "SelMitad1");
return dropDownBox.value;
}


vb.net:

Protected Sub gridMitades_ItemCommand(ByVal sender As Object, ByVal e As EO.Web.GridCommandEventArgs) Handles gridMitades.ItemCommand
Select Case e.CommandName
Case "SelMitad1"
...
Case "SelMitad2"
...
End Select

Me.CallbackPanel1.Update()
End Sub



I can`t access server side coding...

if i redirect to another function:

function Raises() {
var grid = eo_GetObject("gridMitades");
grid.raiseItemCommandEvent(0, "SelMitad1");
}

web browser notifies me: Out of memory at line: X
and if i put an alert(); in the previous function (Raises)
the alert appears in a endless loop...

what can i do? where i'm wrong?

eo_support
Posted: Thursday, December 16, 2010 4:24:51 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Ccolse
Posted: Thursday, December 16, 2010 5:42:35 PM
Rank: Newbie
Groups: Member

Joined: 11/29/2010
Posts: 7
Thanks a lot,
I'd been reading this topic, but i couldn't get the relation with my doubt
It works perfectly... great support, great components!


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.