checkbox, dropdown, multiplechoice from form custom binding
Hi,
I'm very new to sitefinity and ASP.NET so I have some particular problems with understanding how it works.
Let me describe the situation:
I've got couple of pages on my sitefinity project named test.
Firstly I created some basic form with checkbox, dropdownList, multiplechoice controls - all of them have default bindings like 'FirstChoice' etc. If I click edit on lets say DropdownList on the bottom is For developer name : FormDropDownList_C001.
Ok, so I come to home page, drag&drop form, select my created form and it shows up - perfect. Next publish the page...
Next step is go to visual studio, open the project 'test' and see what I can do with 'FormDropDownList_C001'. Here start problems. In let's say OnPageLoad I can see some 'form1' - guessing it's this form (but named it different). I can never see the generated names like FormDropDownList_C001 and so on..What to do?
Mainly question is - how to get to this form and it's content (checkboxes etc) and change theirs binding and whatever else?
Hi,
Since all controls that we have are compiled into assemblies and you don't have direct access to the control template or its code behind there are several options.
1. Inherit from the base control
2. Create a custom form control
3. Use client side api to make changes on the public page.
Regards,
Ivan Dimitrov
the Telerik team
Hmm ok I created some CaptureForm : FormsControl - as in some example. In this capture form I've got submit.Click event which fires SubmitClick method (based on
http://www.sitefinity.com/devnet/forums/sitefinity/general-discussions/problem-with-checkboxes.aspx ). Ok, so I have some CaptureForm which should take 'parent' form events like Submit.Click ;) Firstly I somehow made something simmilar - I builded ascx and cs files and gave it to Widgets, then imports into sitefinity. Next I drag&dropped in on my page so as I think created some container for forms. Another step was to drag&drop 'Form' on it (not next to it but into it) and select desired form.
After this I started my page by running visual studio program and after click submit button I could debug and so on.
My question is, why now I cannot do this?Everytime I try do drop the 'base' form (lets say that container) I got error that Widget need to inherit UserControl.
But to take the form events it needs to inherit by FormsControl as I guess.