I’m trying to add a custom attribute on a
RadDatePicker but it adds the attribute to the wrapper instead of the inputfield.
is there a way to add an attribute to the input field of a
I found that if I opened the controls and selected the first value in my watch, I’d get the input field + it had an
but when trying to add an attribute to the first Control, it gives a red squigly line saying that
rdp.Controls.Attributes doesn’t exist.
RadDatePicker rdp = (RadDatePicker)control_object[control_id]; rdp.Attributes.Add("controlID", control_id); rdp.Controls.Attributes.Add("controlID", control_id);
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
I figured it out,
I had to define the rdp.Controls as a radDateInput.
//1 liner ((RadDateInput)rdp.Controls).Attributes.Add("controlID", control_id); //2 lines RadDateInput rdi = (RadDateInput)rdp.Controls; rdi.Attributes.Add("controlID", control_id);