I have a Infragistics ultragrid with a checkbox column (no binding on the checkbox column) . I need the user to only have one check box selected at a time. If a checkbox is checked and the user checks another row I need the first checkbox to uncheck. I am new to infragistic controls. Can any one provide me sample code or any trick so i can go through out the code and don the required change.Please its urgent.
Thankx in Advance
RegardsVijay Singh
I don't think Infragistics has a built in solution for that, but we here wrote a helper for that.
For example (project attached to the message):
Any employee has properties:
1. CEO (bool) - exactly one employee is a ceo
2. Manager (bool) - Each branch should have exactly one manager.
3. Secretary (bool) - Each branch might have one secretary but might not have one.
3. Branch (string) - The employee branch name.
4. City (string) - The employee city name. Two Branches in diferrent cities are not the same.
According to these rules you expect:
1. Exactly one check box in the "CEO" column should be checked.
2. All rows with the same branch and city should have exactly one check box checked in the "Manager" column.
3. All rows with the same branch and city might have one check box checked in the "Secretary" column.
Open the attached project and see.
For a single Band grid the following working for me.
private
foreach (var item in ultragrid1.Rows)
{
if(e.Cell.Row.Index != item.Index)
item.Cells["Check"].Value = "False";
}