Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #16695 |

    We have a cell set as Boolean. A checkbox appears in this cell and is ticked/unticked according to our data.

    The gird is unbound to the data.

    We cannot get the checkbox to untick/tick.

    The cell is set ReadOnly = false.

     How can we change the value of the checkbox?

    Imported from legacy forums. Posted by Paligap (had 972 views)

    User (Old forums)
    Member
    Post count: 23064

    You probably have an exception being raised, which is swallowed by the .NET framework or by the grid.

    For trapping exceptions, you need to set the debugger to break on all exception.  Go to Debug Menu -> Exceptions -> Common Language Runtime Exceptions, and select “Thrown” CheckBox.

    Also make sure the “Enable Just My Code” CheckBox is unselected (Tools Menu -> Options -> Debugging -> General) if you’re using VS 2005 or up.

    This will make sure that no exceptions are swallowed by the grid or the framework, and that the debugger will break in any part of the code, not just yours.  It should give you the necessary information to make your code work.

    Imported from legacy forums. Posted by André (had 526 views)

    User (Old forums)
    Member
    Post count: 23064

    You have to mess with the CellEditorDisplayConditions property and/or the EditTriggers property of the grid.  Even if readonly is false, unless the editor can display, you won’t be able to toggle the checkbox (I think).

    Imported from legacy forums. Posted by Aline (had 175 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi,

    some good old references can always be useful:

    http://doc.xceedsoft.com/products/Xceedgrid/Editors_WinCheckBox_control.html

    http://doc.xceedsoft.com/products/Xceedgrid/CheckBoxViewer.html

    http://doc.xceedsoft.com/products/Xceedgrid/Xceed.Grid~Xceed.Grid.Viewers.CheckBoxViewer_members.html 

    Also the Xceed Grid for .NET Live Explorer 3.8 source code can always help.   In the Rich Text Editors, the CheckBox section which goes like:

          // CheckBox
          dataRow = gridControl1.DataRows.AddNew();

          dataRow.Cells[ “Editors” ].HorizontalAlignment = HorizontalAlignment.Center;
          dataRow.Cells[ “Editors” ].VerticalAlignment = VerticalAlignment.Center;
          dataRow.Cells[ “Editors” ].CellEditorManager = new CheckBoxEditor();
          dataRow.Cells[ “Editors” ].CellViewerManager = new CheckBoxViewer();
          dataRow.Cells[ “Editors” ].Value = true;
          dataRow.Cells[ “Description” ].Value = “CheckBox”;

          dataRow.EndEdit();
     

    Regards,

    Imported from legacy forums. Posted by Ghislain (had 1923 views)

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.