This is a migrated thread and some comments may be shown as answers.

Inline Editing of unbound gridcheckcolumn

3 Answers 97 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Toxic
Top achievements
Rank 1
Toxic asked on 06 May 2011, 07:49 PM
Ok. I have a grid which is a list of tests for patients. It has two grid check columns at the end to allow selection for either male, female or both for each row.

I need to be able to allow the checkboxes to be editable immediately on load.

I have used  -

e.Item.Edit = True in itemcreated and allowed multiple row edits in the mastetableview.

If I use form edit you can change the values of the checkboxes in the form. If I use inplace edit the checkboxes are disabled.

Really stuck with this. Either a bug with inline or I am doing something totally wrong.

Any ideas?

Tox

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 09 May 2011, 05:15 AM
Hello,

GridCheckBoxColumn is enabled in "Edit" mode only. RadGrid has two types of columns:Data columns and Structure columns. The following help article gives more information about grid columns.
Column types.

Another approach is you can use CheckBox inside EditItemtemplate.

Thanks,
Princy.
0
Toxic
Top achievements
Rank 1
answered on 09 May 2011, 09:38 AM
Thanks Princy, I completely understand, but the problem is that the grid is IN EDIT mode (muli line edit mode with EVERY item editable). But the check columns are not enabled.

If I use edit forms editing mode the check boxes are enabled.

It is only when I change this to InPlace edit mode that they are not enabled for editing.

I have no idea why, and assumed this to be a bug, or that I was doing something wrong. Could it be because those columns are not databound? (since I want them for selection) But if so why then do they work in the form but not in place edit?

Cheers

tox
0
Toxic
Top achievements
Rank 1
answered on 09 May 2011, 10:38 AM
Ok. I think it may be something to do with the editing status.

I have been using the following code to change all the items to be editable.

Protected Sub tests_bacteriology_grid_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles tests_bacteriology_grid.ItemCreated
        e.Item.Edit = True

End Sub

But this does not work with InPlace editing, unless I add an edit command column. If I do this and click ANY of the EDIT links all of the items become editable with InPlace editing??!??!?

Is setting all items to be editable being done wrongly? Am I even able to set the grid items to be editable without an Edit command column?

I'm definitely missing something.
Tags
Grid
Asked by
Toxic
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Toxic
Top achievements
Rank 1
Share this question
or