Page 1 of 1

Where is write function in Checkbox?

Posted: Mon Feb 04, 2008 6:07 am
by MARIMUTHU K
Hi Edward,

We r using .Net2007.3
we want display check and cross(Checkbox style) using different condition.


Now we wrote one function in checkbox control checked function property

if(({Table3.meal_type}=="Lunch") && ({Table3.is_meal_participated_in}==true ))
CheckBox34.Checked=true;
CheckBox34.CheckStyle=check;
else
Text13.Text="hai";

but didn't fire above function.

So, Please help us
Where is write code or How is write that code?

Its urgent help.


Thanks in Advance,



Where is write function in Checkbox?

Posted: Tue Feb 05, 2008 2:53 am
by Edward
KMarimuthu wrote:we want display check and cross(Checkbox style) using different condition.

Now we wrote one function in checkbox control checked function property

if(({Table3.meal_type}=="Lunch") && ({Table3.is_meal_participated_in}==true ))
CheckBox34.Checked=true;
CheckBox34.CheckStyle=check;
else
Text13.Text="hai";

but didn't fire above function.
In the GetCheckedEvent of the StiCheckBox, please write the following code:

if(some condition) e.Value = "true"; else e.Value = "false";

CheckBox's style can be changed with the following code:

CheckBox1.CheckStyleForTrue = StiCheckStyle.Check;
CheckBox1.CheckStyleForFalse = StiCheckStyle.Cross;

Here is the list of styles available:
public enum StiCheckStyle
{
Cross,
Check,
CrossRectangle,
CheckRectangle,
CrossCircle,
DotCircle,
DotRectangle,
NoneCircle,
NoneRectangle,
None
}

Thank you.