i have created a form with some fields user can't able to enter any information until unless the user clicks on the edit button that i have provided in the form and when user click on the edit button user can enter the informantion and the button should changed to save and i aslo have reset button for eg if user enter information in one textbox and click on reset the field should be blank same thing for 2 or more textbox.How can i make it using silverlight.
Can any1 help me on this i have attached the image of the form
navjyot rautPosted Sep 29, 2011, 2:37 AM
I made one small application according to your requirements, hope it will solve your problem
Thanks
Navjyot...
SweetyPosted Sep 23, 2011, 8:32 AM
But when i click on edit button it should changed to save not on textchanged in textbox and if user enter information and click on save it should be saved in database.
Prabhu RajaPosted Sep 23, 2011, 8:26 AM
1) First Write Two Function, one for to Enable all controls other then buttons and second one for to disable all controls.
2) on form load Event, call disable() function .
3) In Button Click Event, Check Button text is equal to "Edit"
If true,
then call enable function and change button text to Save.
If else,
then call disable function and Change button text to Edit.
4) For reset Button, Write one function that should clear all Fields. Call this function from Reset button Click Event
Akshay DalviPosted Sep 23, 2011, 7:43 AM
Open visual studio 2010-> installed templates-> silverlight-> siverlight application-> OK-> OK
I've made sample to understand the code. as follow.
Drag drop 1) 2 labels
2) 2 buttons.
3) 2 Text boxes
4) Rename buttons as EDIT_BUTTON, RESET_BUTTON
Open code behind file means .cs file by DOUBLE CLICKING the buttons.(Both buttons must be clicked to generate their event handlers. )
copy pase code from attachment file.
If you have any problem, u can ask.
Thanks :)
Lalit MPosted Sep 23, 2011, 7:13 AM
for alternate way you can find your answer or will guide you related your question pls visit below given link
http://indepthdev.com/2011/03/a-checkboxlist-for-silverlight/
http://forums.silverlight.net/t/106234.aspx/1
Hope Will Help You..!