I am using a WebDialogWindow to provide a modal dialog box for editing the contents of a WebDataGrid. I'm having some trouble getting and setting the value of a WebDatePicker in that modal dialog.
<script language="javascript">
var currentRow;
function gridTemplateOpening(sender, args)
{
var dialog = $find('<%= cnModalDialog.ClientID %>');
currentRow = args.get_row();
var dateText = currentRow.get_cellByColumnKey("expire_datetime").get_text();
$get("<%=cnTextBox.ClientID%>").value = dateText;
$get("<%=cnWebDatePicker.ClientID%>").value = dateText;
dialog.set_windowState($IG.DialogWindowState.Normal);
}
</script>
In this example cnTextBox is an asp:TextBox control. This control displays the date from column "expire_datetime" just fine. The cnWebDatePicker (a WebDatePicker control) however shows no selected value when the dialog opens. Does it not have a .value property or is that not the correct way to set it's value? Better yet, can you direct me to the CSOM documentation for the WebDatePicker control? I have not been succesful finding it.
My environment is 2010.vol 2 CLR 2.0
Hi ,
I m using ultrawebgrid in asp.net .........i am facing porblem like we have one ultrawebgrid and applying AllowSorting =True, in the ultrawebgrid we have multiple paging option let say we are in second page and applying sorting and we have also one button in ultrawebgrid ....in the button click we open one popup window from there we have one save button click on save button saving the popup value and reload the ultrawebgrid page .....after the reloading page index will be change and soting order will be change but we don't want to change the sorting order and don't want to change page order also ....................wnat to do all from javascript ......................
Please help ..............................i have already spent much time but didn't find any solution...............................
Thanks for your reply.Thank u again .....
Done.
Hi Bubhash,
In case of WebDateChooser, you may use global igdrp_getComboById or ig$ methods to get reference to webdatechooser object, and use get/setValue methods to get/set value of WebDateChooser. Below are examples:
<igsch:WebDateChooser ID="WebDateChooser1" runat="server"></igsch:WebDateChooser><input type="button" value="clear" onclick="igdrp_getComboById('WebDateChooser1').setValue(null)" /><input type="button" value="get" onclick="alert('value:' + ig$('WebDateChooser1').getValue())" /><input type="button" value="set" onclick="ig$('WebDateChooser1').setValue(new Date(1955, 1, 19))" />
Hi I am using WebDateChooser , I want to clear the control when i click the button on client click using javascript.
Please reply needfull.
Thanks so much Viktor that corrected the problem!