VT
Vivek Thirumalai
October 1, 2009 11:05 PM UTC
Also is there a way to specify the value of the radiobutton options?
VT
Vivek Thirumalai
October 5, 2009 10:53 PM UTC
Hi Lingaraj,
Thanks for the example. About my second question, if the choicelist is :
sc.AddRange(new String[]{ "radio 0", "radio 1"});
when radio 0 is selected the value is 0, but can the value be different. Basically I want this to be other way, meaning my I want to display radio 1 before radio 0:
sc.AddRange(new String[]{ "radio 1", "radio 0"});
and I want the value to be the same i.e., when radio 1 is selected the value needs to be 1. Is this possible? I can do it programmatically, but want to see if this doable via choicelist.
Thanks.
JJ
Jisha Joy
Syncfusion Team
October 6, 2009 11:47 AM UTC
Hi Vivek,
You could try handling the CellButtonClicked event and let me know if this helps.
void gridControl1_CellButtonClicked(object sender, GridCellButtonClickedEventArgs e)
{
GridCurrentCell cc = this.gridControl1.CurrentCell;
if (this.gridControl1[cc.RowIndex, cc.ColIndex].CellValue.Equals(0))
{
this.gridControl1[cc.RowIndex, cc.ColIndex].CellValue = 1;
}
else if (this.gridControl1[cc.RowIndex, cc.ColIndex].CellValue.Equals(1))
{
this.gridControl1[cc.RowIndex, cc.ColIndex].CellValue = 0;
}
}
Regards,
Jisha
VT
Vivek Thirumalai
October 7, 2009 02:07 PM UTC
That would not work as the underlying data is changed as well.
JJ
Jisha Joy
Syncfusion Team
October 8, 2009 11:01 AM UTC
Hi Vivek,
There is no property setting available to alter the behavior.The cellvalue for the first button will return 0 and cell value of the second button will return 1.
Please let me know if you have any questions.
Regards,
Jisha