Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
425
DatePicker get set in WebGrid RowEditTemplate
posted

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