I think I just misunderstand the clientside model but here's what I'm trying to achieve.
I am trying to get a clientside reference to a raddatepicker in the editformtemplate of a radgrid. I've used the code previously provided in this forum to do this:
When I call this function, it does return what looks like the correct object.
However, when I examine the returned object it does not have the methods or properties of the raddatepicker client side object.
i.e.
var rdp = GetGridServerElement("rdpStartDate","*")
returns a valid object and it seems to be related to what I want (one of the properties 'className' is equal to 'pickerWrapper_Telerik'), but it does not seem to be a raddatepicker object. I would have expected to be able to do something like this:
rdp.get_selectedDate()
But, it doesn't work. I think there is some relationships between the object a get back from GetGridServerElement() and the expected client object - but I can't figure it out.
Can you please help??
Thanks.
I am trying to get a clientside reference to a raddatepicker in the editformtemplate of a radgrid. I've used the code previously provided in this forum to do this:
//walks over all elements with the specified tag name inside our grid |
//does not require registration, but is a bit more complex |
function GetGridServerElement(serverID, tagName) |
{ |
if (!tagName) |
tagName = "*"; //* means all elements |
var grid = $get("<%=RadGrid1.ClientID %>"); |
var elements = grid.getElementsByTagName(tagName); |
for (var i = 0; i < elements.length; i++) |
{ |
var element = elements[i]; |
if (element.id.indexOf(serverID) >= 0) |
return element; |
} |
} |
When I call this function, it does return what looks like the correct object.
However, when I examine the returned object it does not have the methods or properties of the raddatepicker client side object.
i.e.
var rdp = GetGridServerElement("rdpStartDate","*")
returns a valid object and it seems to be related to what I want (one of the properties 'className' is equal to 'pickerWrapper_Telerik'), but it does not seem to be a raddatepicker object. I would have expected to be able to do something like this:
rdp.get_selectedDate()
But, it doesn't work. I think there is some relationships between the object a get back from GetGridServerElement() and the expected client object - but I can't figure it out.
Can you please help??
Thanks.