Hi,
I have some problems with a script, look, i have an UltraWebGrid and I want it to give me a variable when i choose a row, that's ok, the problem is that I have an input buttom disabled and a label, I want the buttom to become enable and I want the text of the lable to change to the variable I get from the row, all of that when I choose a row...well, the error I get is "Error: 'text' is null or not an object", here is the code:

<script type="text/javascript" language="javascript">

    //Script que saca el valor del idusuario seleccionando una celda del UWG
    function igUWGusuario(gridName, cellId, BtnModificar, LblUsuario) {
        var UsrActual =      igtbl_getCellById(cellId).Row.getCellFromKey('idusuario').getValue();
        alert('probando que traigamos usr' + UsrActual);
        alert('probando el lable' + LblUsuario.text);
        BtnModificar.disabled = "";
        LblUsuario.text = UsrActual;
    };

    </script>

I know you can help me guys :) Thanks

Member Avatar for stbuchok

can you show the code that is calling this function?

can you show the code that is calling this function?

Well, its a long pice of code, but the line that does everything is:

<ClientSideEvents CellClickHandler="igUWGusuario" />

I think it actually works because I get the first alert right, the problem starts when I try to do something with the buttom and the label, wich by the way look like this in my code:

<td><input id="BtnAgregar" type="button" value="Agregar" /></td>
                <td><input id="BtnModificar" type="button"  disabled="disabled"  value="Modificar" /></td>
Member Avatar for stbuchok

What is this from? It's not HTML, so it's got to be something serverside.

<ClientSideEvents CellClickHandler="igUWGusuario" />

How are you passing the parameters into the javascript function?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.