Hi,
I'm having a problem when I try to set some value on a field. I have a GridTemplateColumn with a RadComboBox, and if some value in specific is selected a windows shows up and return a value. If I'm on insert mode I can put this value on the field whit this code
the combo variable is global and I obtain the value with this
this code works fine, but my problem comes when I try to update because doesn't change the value that the window returned.
I have this method
I'm setting the combo to the RadComboBox of the row, and use the same code of the method
Am I doing something wrong??
Thanks in advance.
I'm having a problem when I try to set some value on a field. I have a GridTemplateColumn with a RadComboBox, and if some value in specific is selected a windows shows up and return a value. If I'm on insert mode I can put this value on the field whit this code
protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e){ GridDataItem item = (GridDataItem)combo.NamingContainer; HtmlInputText valor = (HtmlInputText)item.FindControl("Valor"); valor.Value = e.Argument;}the combo variable is global and I obtain the value with this
protected void Op_OnSelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e){ combo = (RadComboBox)sender;}this code works fine, but my problem comes when I try to update because doesn't change the value that the window returned.
I have this method
protected void ItemDataBound_condicion(object sender, GridItemEventArgs e){ if (e.Item.IsInEditMode && e.Item is GridDataItem) { GridEditableItem item = e.Item as GridEditableItem; RadComboBox operador = (RadComboBox)item.FindControl("Operador"); combo = operador; if (operador.SelectedValue == "En la lista" || operador.SelectedValue == "No en la lista") { valor = (HtmlInputText)item.FindControl("Valor"); valor.Attributes.Add("onclick", "OnClientClick(valor.Value); } } }I'm setting the combo to the RadComboBox of the row, and use the same code of the method
RadAjaxManager1_AjaxRequest, but it doesn't work, only works when I change the value of 'Operador' but when I click the field 'Valor' doens't works.Am I doing something wrong??
Thanks in advance.