Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 09, 2011 01:00 AM by xxarchexx
Member
2 Points
2 Posts
Nov 08, 2011 05:24 PM|LINK
please explain the code in the ArticleListing.cs and ProductListing.cs
private bool _showDepartmentPicker = true; public bool ShowDepartmentPicker { get { return _showDepartmentPicker; } set { _showDepartmentPicker = value; ddlDepartments.Visible = value; lblDepartmentPicker.Visible = value; lblSeparator.Visible = value; } } protected override void LoadControlState(object savedState) { object[] ctlState = (object[])savedState; base.LoadControlState(ctlState[0]); this.ShowDepartmentPicker = (bool)ctlState[1]; this.ShowPageSizePicker = (bool)ctlState[2]; this.EnablePaging = (bool)ctlState[3]; } protected override object SaveControlState() { object[] ctlState = new object[4]; ctlState[0] = base.SaveControlState(); ctlState[1] = this.ShowDepartmentPicker; ctlState[2] = this.ShowPageSizePicker; ctlState[3] = this.EnablePaging; return ctlState; } I can not understand what set value to the Properties
_showDepartmentPicker = value; ddlDepartments.Visible = value; lblDepartmentPicker.Visible = value; lblSeparator.Visible = value;
and when it is. sorry for the English thank you very much
All-Star
23404 Points
4018 Posts
Nov 08, 2011 05:39 PM|LINK
1) ShowDepartmentPicker
if you call ShowDepartmentPicker=true then it will make 3 controls visible, if ShowDepartmentPicker=false - all 3 controls will be hidden.
2, 3) Both methods LoadControlState and SaveControlState take arrays of type object and load values to appropriate variables/properties.
Nov 09, 2011 01:00 AM|LINK
Very thanks
xxarchexx
Member
2 Points
2 Posts
please explain the code in the
Nov 08, 2011 05:24 PM|LINK
please explain the code in the ArticleListing.cs and ProductListing.cs
private bool _showDepartmentPicker = true; public bool ShowDepartmentPicker { get { return _showDepartmentPicker; } set { _showDepartmentPicker = value; ddlDepartments.Visible = value; lblDepartmentPicker.Visible = value; lblSeparator.Visible = value; } } protected override void LoadControlState(object savedState) { object[] ctlState = (object[])savedState; base.LoadControlState(ctlState[0]); this.ShowDepartmentPicker = (bool)ctlState[1]; this.ShowPageSizePicker = (bool)ctlState[2]; this.EnablePaging = (bool)ctlState[3]; } protected override object SaveControlState() { object[] ctlState = new object[4]; ctlState[0] = base.SaveControlState(); ctlState[1] = this.ShowDepartmentPicker; ctlState[2] = this.ShowPageSizePicker; ctlState[3] = this.EnablePaging; return ctlState; } I can not understand what set value to the Properties_showDepartmentPicker = value; ddlDepartments.Visible = value; lblDepartmentPicker.Visible = value; lblSeparator.Visible = value;smirnov
All-Star
23404 Points
4018 Posts
Re: please explain the code in the
Nov 08, 2011 05:39 PM|LINK
1) ShowDepartmentPicker
if you call ShowDepartmentPicker=true then it will make 3 controls visible, if ShowDepartmentPicker=false - all 3 controls will be hidden.
2, 3) Both methods LoadControlState and SaveControlState take arrays of type object and load values to appropriate variables/properties.
xxarchexx
Member
2 Points
2 Posts
Re: please explain the code in the
Nov 09, 2011 01:00 AM|LINK
Very thanks