father_pedro
January 3rd, 2006, 04:39 AM
Ok, what i'm looking for will sounds a bit weird I know ...
I have a Datagrid bound to an ArrayList of custom class objects.
Those objects contain 3 Bool parameters, which can be adjusted in the datagrid by using checkboxcolumnstyles. so, what i want is that if one of the tree booleans (checkboxes) is set to true, that the others become disabled of something like that
Found this solution: In the Set part of the parameter:
if(Bool1==false && Bool2==false)
{Bool3 = value;}
This has the effect that when you check one of the checkboxs, where another one has already been checked that the datagrid unchecks it.
"Is this the best practice ??" or is there a better solution ??
What I'm missing is the possibility to show an errormessage when this occurs.
Was thinking about this: Is it possible to throw an exception in the else part of the if above and where should i be able to catch it ??
Thanks in advance
I have a Datagrid bound to an ArrayList of custom class objects.
Those objects contain 3 Bool parameters, which can be adjusted in the datagrid by using checkboxcolumnstyles. so, what i want is that if one of the tree booleans (checkboxes) is set to true, that the others become disabled of something like that
Found this solution: In the Set part of the parameter:
if(Bool1==false && Bool2==false)
{Bool3 = value;}
This has the effect that when you check one of the checkboxs, where another one has already been checked that the datagrid unchecks it.
"Is this the best practice ??" or is there a better solution ??
What I'm missing is the possibility to show an errormessage when this occurs.
Was thinking about this: Is it possible to throw an exception in the else part of the if above and where should i be able to catch it ??
Thanks in advance