I am using a webgrid with RowEditTemplate as follows
<ClientBindings> <ig:RowEditingClientBinding ColumnKey="DataConteúdo" ControlID="WebDatePickerDataConteudo" GetValueJavaScript="$get({ClientID}).value" SetValueJavaScript="$get({ClientID}).value={value}" /> <ig:RowEditingClientBinding ColumnKey="ConteúdoDesenvolvido" ControlID="controlConteudo" GetValueJavaScript="$get({ClientID}).value" SetValueJavaScript="$get({ClientID}).value={value}"/> </ClientBindings>
<RowEditingClientEvents TemplateClosing="onTemplateClosing" />
I am using a javascript function as follows I have found in the forum
function onTemplateClosing(sender, args) { var ret = sender.get_behaviors().get_editingCore().get_behaviors().get_rowEditingTemplate(); var colKey = "DataConteúdo"; var binding = ret._bindings._getObjectByAdr(colKey); var datePicker = $find(binding.get_clientID()); var dateVal = datePicker.get_value(); }
It's not setting the Date column in the WebGrid with the DatePicker value! Can you please tell me what is going wrong?
Can you provide me a javascript function to get the Date field in the grid and set the DatePicker in the RowEditTemplate?
I have search the forum and the web and I think that you could provide this as a sample. I think that using RowEditTemplate is very good with IG controls!!
Thanks in advance!
Edson
Hello Edson,
Thank you for contacting Infragistics!
I have a few follow up questions concerning this matter. What version of NetAdvantage are you using? What service release are you using? Do you see this in multiple browsers or just one? If so what version of the browser?
Looking forward to hearing from you.
Mike,
Thank you for your reply.
IG: Infragistics4.Web.v12.2, Version=12.2.20122.2054 downloaded a month ago for trial.
Browsers: Chrome Versão 25.0.1364.152 m and IE 9.0.8112.16421 -
OS: Windows 7
Note that I have sent you just the javascript function that get the Template values and set the Grid values.
I need also a funtion that get the Grid values and set the Template values.
If I use regular text controls on the template, it works fine, but when I use IG DatePicker I can't set its value based on the Grid value using the default Get Set for text controls. The same occurs when I try to update the Grid value with the DatePicker template value.
Can you provide me me a simple sample with these behaviors?
Thanks