Hi,
I am trying to update a read-only GridDateTimeColumn field in a Rad Grid while the item is being edited. The computation to do the update is to calculate the calendar date based off the Julian date in a RadNumeric TextBox. I am able to get the two controls client ID's by using the following code server-side on the Item Created event:
RadNumericTextBox rnumtxt1 = item.FindControl("gtbJulianDate") as RadNumericTextBox;
RadDatePicker picker = (RadDatePicker)item["GroundDate"].Controls[0] as RadDatePicker;
rnumtxt1.Attributes.Add("onBlur", "return updateGround('" + rnumtxt1.ClientID + "','" + picker.ClientID + "')");
The javascript function finds the RadNumeric TextBox just fine and can perform the computation, but when I set the picker field on the client-side, it always ends up being null. I use the following code to set the variables:
var julianTxtBox = $find(txt1);
var groundDate = $find(txt2);
Can you please help by letting me know why that is not working or if there are any other ways to access that field and set it on the client?
Thanks,
Joe
I am trying to update a read-only GridDateTimeColumn field in a Rad Grid while the item is being edited. The computation to do the update is to calculate the calendar date based off the Julian date in a RadNumeric TextBox. I am able to get the two controls client ID's by using the following code server-side on the Item Created event:
RadNumericTextBox rnumtxt1 = item.FindControl("gtbJulianDate") as RadNumericTextBox;
RadDatePicker picker = (RadDatePicker)item["GroundDate"].Controls[0] as RadDatePicker;
rnumtxt1.Attributes.Add("onBlur", "return updateGround('" + rnumtxt1.ClientID + "','" + picker.ClientID + "')");
The javascript function finds the RadNumeric TextBox just fine and can perform the computation, but when I set the picker field on the client-side, it always ends up being null. I use the following code to set the variables:
var julianTxtBox = $find(txt1);
var groundDate = $find(txt2);
Can you please help by letting me know why that is not working or if there are any other ways to access that field and set it on the client?
Thanks,
Joe