Hi there, recently I found out about Flash Remoting, so now I have an issue
with DataBindings, when my template loads the first time I populate a cfgrid
with a query, and I have three input boxes that are binded to the grid, the
DataBinding until here works fine,, but then when a user enters a character in
another input box, I reload the data in my query so the user can have access to
probably new data or just to find what the user is looking for and here is
where my databinding stop workin and I don't know why can someone help? Give me
a tip or something like that?

I attach my template code.


Attach Code

<cfparam name="FORM.NombresBuscar" default="">
<cfif IsDefined("FORM.Aceptar")>
<cfinvoke
component="taller.components.Data"
method="AgregarMecanico"
returnvariable="AgregarMecanicoRet">
<cfinvokeargument name="Nombres" value="#FORM.Nombres#"/>
<cfinvokeargument name="Direccion" value="#FORM.Direccion#"/>
<cfinvokeargument name="Telefono" value="#FORM.Telefono#"/>
</cfinvoke>
<cfelseif IsDefined("FORM.Eliminar")>

<cfinvoke component="taller.components.Data"
method="EliminarMecanico"
returnvariable="EliminarMecanicoRet">
<cfinvokeargument name="IDMecanico" value="#FORM.ID#"/>
</cfinvoke>
</cfif>
<---<cfset BuscarMecanicos = queryNew("IDMecanico,Nom,Direccion,Telefono")
/>--->
<cfinvoke component="taller.components.Data"
method="BuscarMecanico2"
returnvariable="BuscarMecanicos">
</cfinvoke>
<cfsavecontent variable="getData">
//create connection
var connection:mx.remoting.Connection =
mx.remoting.NetServices.createGatewayConnection(
"http://localhost/flashservices/gateway/");
//declare service
var myService:mx.remoting.NetServiceProxy;

var responseHandler = {};

//put the controls in scope to avoid calling _root
var GridBuscar = GridBuscar;

responseHandler.onResult = function( results: Object ):Void {
//when results are back, populate the cfgrid
GridBuscar.dataProvider = results;
}

//function that receives any error that may have occurred during the call
responseHandler.onStatus = function( stat: Object ):Void {
//if there is any error, show an alert
alert("Error while calling cfc:" + stat.description);
}

//get service
myService = connection.getService("taller.components.DataAcces s",
responseHandler );
//make call
myService.BuscarMecanicos({Nombres:NombresBuscar.t ext});
</cfsavecontent>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin
template="../Templates/Main.dwt.cfm" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; cht=iso-8859-1" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Taller - Mecanicos</title>
<!-- InstanceEndEditable -->
<link href="../assets/css/basiclayout.css" rel="stylesheet" type="text/css"
media="all" />
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
</head>

<body>
<div id="wrapper">

<div id="banner"></div>
<div id="greetings"></div>
<div id="leftcol">
<div id="nav">
<ul>
<li><a href="#">Mecanicos</a></li
><li><a href="#">Marcas</a></li
><li><a href="#">Versiones</a></li
><li><a href="#">Tipos</a></li
><li><a href="#">Proveedor</a></li
>
</ul>
</div>
</div>
<div id="content">
<!-- InstanceBeginEditable name="Content" --><h1>Mecanicos</h1>
<cfform name="Mecanicos" format="flash"
action="file:///F|/Inetpub/wwwroot/index.cfm" width="400" height="500">
<cfformgroup type="accordion"
selectedindex="#iif(IsDefined("FORM.Buscar"),"'1'" ,"'0'")#">
<cfformgroup type="page" label="Mecanicos">
<cfinput name="ID" type="hidden"
bind="{GridBuscar.dataProvider[GridBuscar.selectedItem]['IDMecanico']}">
<cfinput type="text"
name="Nombres"
label="Nombres:"
maxlength="50"
size="28"
bind="{GridBuscar.dataProvider[GridBuscar.selectedItem]['Nom']}"
validate="required"
message="Debe ingresar un nombre."
validateat="onserver,onsubmit"
required="yes">
<cfinput type="text"
name="Direccion"
label="Direccion:"
maxlength="100"
size="28"
message="Debe ingresar una direcci?n."
bind="{GridBuscar.dataProvider[GridBuscar.selectedIndex]['Direccion']} "
validate="required"
validateat="onserver,onsubmit"
required="yes">
<cfinput type="text"
name="Telefono"
label="Telefono:"
message="Debe ingresar un numero de telefono correcto."
maxlength="50"
size="28"
required="no"
bind="{GridBuscar.dataProvider[GridBuscar.selectedIndex]['Telefono']} "
validate="telephone">
<cfformgroup type="horizontal">
<cfinput type="submit" value="Aceptar" name="Aceptar"
validate="submitonce" validateat="onserver,onsubmit">
<cfinput type="reset" value="Cancelar" name="Cancelar">
<cfinput type="submit" value="Eliminar" disabled="true" name="Eliminar"
validate="submitonce" validateat="onserver,onsubmit">
<cfinput type="button" value="Buscar" name="Buscar" >
</cfformgroup>
</cfformgroup>
<cfformgroup type="page" label="Buscar">
<cfinput name="NombresBuscar"
type="text"
size="20"
label="Criterio de Busqueda:"
maxlength="50"
onChange="#getData#"
value="#FORM.NombresBuscar#">
<!---<cfselect name="SubCriterios" label="En"
onChange="NombresBuscar.text=''" width="110">
<option value="Nombres">Name</option>
<option value="Direccion">Gender</option>
<option value="Telefono">Age</option>
</cfselect>--->

<cfgrid rowheaders="no"
name="GridBuscar"
<!---onChange="Eliminar.enabled=true"--->
query="BuscarMecanicos">
<cfgridcolumn name="Nom" header="Nombres">
<cfgridcolumn name="Direccion" header="Direcci?n">
<cfgridcolumn name="Telefono" header="Telef?no">
</cfgrid>
<cfformgroup type="horizontal">
<cfformitem type="spacer" />
<cfinput type="button" value="Volver" name="Volver" onclick="">
<cfformitem type="spacer" />
</cfformgroup>
</cfformgroup>
</cfformgroup>
</cfform>
<!-- InstanceEndEditable --></div>
<div id="footer">Mi compa&ntilde;&iacute;a</div>
</div>
</body>
<!-- InstanceEnd --></html>