grid.CheckedBox

  • Thread starter Thread starter Hrvoje Voda
  • Start date Start date
H

Hrvoje Voda

I have this code for searching through grid and putting a result into
another grid where I defined a checkBox.

Line with mark * is where I need to define where in gridGroups row I have to
put a checkBoxValue = true.

void ColumnDrawGroupsChecked (

Syncfusion.Windows.Forms.Grid.GridStyleInfo gridStyle, System.Data.DataRow
row )

{

gridStyle.CellType = "CheckBox";

gridStyle.CellValueType = typeof(bool);


DataSetAccounts.UsersRow rowGroups =

GetSelectedRow( gridUsers.Grid ) as DataSetAccounts.UsersRow;

if ( rowGroups != null )

{

DataSetAccounts.GroupsRow rowGroup =

rowGroups.GetParentRow( "GroupsUsersGroups" ) as DataSetAccounts.GroupsRow ;

if ( rowGroup != null )

{

* Here I need to determine where to put CellValue to true

gridStyle.CellValue = true;

}

}

}



Hrcko
 
Hi Hrvoje;

The following should work;

DataColumn checkboxColumn = table.Columns["CheckBoxColumnName"];

// Then in the * mark
rowGroup[checkboxColumn] = true;

Regards,
Dhanushka
 
This works, but it creates a new grid with columns.
I want to put a check value into available grid.

Hrcko

Dhanushka Nuwan said:
Hi Hrvoje;

The following should work;

DataColumn checkboxColumn = table.Columns["CheckBoxColumnName"];

// Then in the * mark
rowGroup[checkboxColumn] = true;

Regards,
Dhanushka



Hrvoje Voda said:
I have this code for searching through grid and putting a result into
another grid where I defined a checkBox.

Line with mark * is where I need to define where in gridGroups row I have to
put a checkBoxValue = true.

void ColumnDrawGroupsChecked (

Syncfusion.Windows.Forms.Grid.GridStyleInfo gridStyle,
System.Data.DataRow
row )

{

gridStyle.CellType = "CheckBox";

gridStyle.CellValueType = typeof(bool);


DataSetAccounts.UsersRow rowGroups =

GetSelectedRow( gridUsers.Grid ) as DataSetAccounts.UsersRow;

if ( rowGroups != null )

{

DataSetAccounts.GroupsRow rowGroup =

rowGroups.GetParentRow( "GroupsUsersGroups" ) as
DataSetAccounts.GroupsRow ;

if ( rowGroup != null )

{

* Here I need to determine where to put CellValue to true

gridStyle.CellValue = true;

}

}

}



Hrcko
 
Back
Top