I am unable to find any means to enable client editing of the grid as initial mode.
I wish to have several checkbox colums that can have items checked. As far as I know the table should be in edit mode. But there seems to be no other way than to have a command column, in which the user has to click "UPDATE" or such to enter the edit mode.
What I need is no command column, but just a grid that is in Edit mode from the beginning and has more than one check columns the user can check items in.
Hope you can help me out on this......
Kind regards,
Jack
8 Answers, 1 is accepted

Here's a help document which explains on how to set the grid in EditMode by default:
Default edit mode for grid items on initial load
This should probably help you out!
Princy.

It enables my checkboxes.......yes
But: all rows get a selected theme instead of the default.
second. I have a submit button in the page. Once clicked, I wish to traverse the marked items....
However the event handler of the submit button never gets reached!!! (It get reached if I don't include the Prerender of the grid)
Instead it throw a JavaScript error:
Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Specified argument was out of the range of valid values.
Parameter name: index

for your information the version I use is: ASP.NET_AJAX_2009_3_1103
Specified argument was out of the range of valid values.
Parameter name: index
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: index
Source Error:
|
Stack Trace:
|

<telerik:RadGrid ID="RadGridTrackItems" runat="server" AllowSorting="True" AutoGenerateColumns="False"
GroupingEnabled="False" OnSelectedIndexChanged="RadGridTrackItems_SelectedIndexChanged"
Skin="Outlook" Height="524px" Width="300px" meta:resourcekey="RadGridTrackItemsResource1"
GridLines="None" AllowAutomaticUpdates="False" AllowAutomaticInserts="False"
AllowAutomaticDeletes="False" OnNeedDataSource="RadGridTrackItems_NeedDataSource">
<MasterTableView AllowMultiColumnSorting="True" GridLines="Both" PageSize="200" AllowCustomSorting="True"
AllowAutomaticUpdates="False" AllowAutomaticInserts="False" AllowAutomaticDeletes="False"
Enabled="True" EditMode="InPlace">
<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
<RowIndicatorColumn Visible="False">
</RowIndicatorColumn>
<PagerStyle Visible="False" />
</MasterTableView>
<HeaderStyle HorizontalAlign="Left" VerticalAlign="Top" />
<ClientSettings AllowColumnsReorder="True">
<Selecting AllowRowSelect="True" />
<Scrolling AllowScroll="True" UseStaticHeaders="True" />
<Resizing AllowColumnResize="True" AllowRowResize="True" EnableRealTimeResize="True"
ResizeGridOnColumnResize="False" ClipCellContentOnResize="True" />
</ClientSettings>
</telerik:RadGrid>
and the cs code to create the columns:
private void SetupTrackObjectControl()
{
List<GridColumn> columns = new List<GridColumn>();
GridCheckBoxColumn chkCol = new GridCheckBoxColumn();
chkCol.AllowSorting =
true;
chkCol.AllowFiltering =
false;
chkCol.Resizable =
true;
chkCol.DataField =
"IsDeleted";
chkCol.HeaderText = (
string)GetLocalResourceObject("Delete");
chkCol.SortExpression =
"IsDeleted";
chkCol.UniqueName =
"IsDeleted";
chkCol.ReadOnly =
false;
//this.RadGridTrackItems.AutoGenerateEditColumn = true;
this.RadGridTrackItems.MasterTableView.Columns.Add(chkCol);
GridImageColumn imgCol = new GridImageColumn();
imgCol.AllowSorting =
true;
imgCol.AllowFiltering =
false;
imgCol.Resizable =
true;
//imgCol.ReadOnly = true;
imgCol.DataImageUrlFields =
new string[1] { "IconName" };
imgCol.DataImageUrlFormatString =
@"..\TrackItems\Icons\{0}.png";
imgCol.HeaderText = (
string)GetLocalResourceObject("Icon");
imgCol.SortExpression =
"IconName";
imgCol.UniqueName =
"IconName";
this.RadGridTrackItems.MasterTableView.Columns.Add(imgCol);
GridBoundColumn textCol = new GridBoundColumn();
textCol.AllowSorting =
true;
textCol.AllowFiltering =
false;
textCol.Resizable =
true;
textCol.DataField =
"Identity";
textCol.ReadOnly =
true;
textCol.HeaderText = (
string)GetLocalResourceObject("Identity");
textCol.SortExpression =
"Identity";
textCol.UniqueName =
"Identity";
this.RadGridTrackItems.MasterTableView.Columns.Add(textCol);
textCol =
new GridBoundColumn();
textCol.AllowSorting =
true;
textCol.AllowFiltering =
false;
textCol.Resizable =
true;
textCol.ReadOnly =
true;
textCol.DataField =
"DisplayName";
textCol.HeaderText = (
string)GetLocalResourceObject("Alias");
textCol.SortExpression =
"DisplayName";
textCol.UniqueName =
"DisplayName";
this.RadGridTrackItems.MasterTableView.Columns.Add(textCol);
}
data source is set by a custom object:
RadGridTrackItems.DataSource = _contents.Items;
where Items is a list of my items to be displayed
I have reviewed your code and it looks correct.
I suggest that you take a look at the following resources showing how functionality similar to the desired by you can be implemented:
Changing the grid structure dynamically on postback
Programmatic creation
Excel-like RadGrid
If the issues persist, please open a formal support ticket and attach a sample project demonstrating the problem. We will debug it locally and get back to you with our findings.
Sincerely yours,
Mira
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.

I have tried using NeedDataSource, but it doesn't seem to work. I dynamically set the controls on Page_Load (post back and not post-back) but without success. It doesn't seem the (IsPostBack) fires before this error... It seems I need to create the columns earlier...
so what event fires before this error occurs?
-----------------------------
Specified argument was out of the range of valid values.
Parameter name: index
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: index
Stack Trace:
[ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: index]
System.Web.UI.ControlCollection.get_Item(Int32 index) +8820194
Telerik.Web.UI.GridTextBoxColumnEditor.LoadControlsFromContainer() +70
Telerik.Web.UI.GridColumnEditorBase.InitializeFromControl(Control containerControl) +50
Telerik.Web.UI.GridDataItem.InitializeEditorInCell(IGridEditableColumn column) +157
Telerik.Web.UI.GridEditManager.GetColumnEditor(IGridEditableColumn column) +175
Telerik.Web.UI.GridBoundColumn.FillValues(IDictionary newValues, GridEditableItem editableItem) +82
Telerik.Web.UI.GridEditableItem.ExtractValues(IDictionary newValues) +164
Telerik.Web.UI.GridTableView.ExtractValuesFromItem(IDictionary newValues, GridEditableItem editedItem) +115
Telerik.Web.UI.GridItemBuilder.CreateItems(GridGroupingContext group) +1129
Telerik.Web.UI.GridTableView.CreateItems(IEnumerator enumerator, GridColumn[] columns, ControlCollection controls) +193
Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource) +2170
Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +832
System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +161
System.Web.UI.Control.EnsureChildControls() +102
Telerik.Web.UI.GridTableViewBase.get_Controls() +33
System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +24
System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +225
System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +148
System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +225
System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +148
System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +225
System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +148
System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +225
System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +148
System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +225
System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +148
System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +225
System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +148
System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +225
System.Web.UI.Page.LoadAllState() +312
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +747

Now I still need to solve the problem of the Grid not remaining in edit mode after paging.
As this article says when you will add columns to the specified collections depends on which events you are doing it. If it is on Page_Load you should add the column first, otherwise no ViewState will be persisted. If it is on Page_Init you should add the column after you have set all of its properties.
About your other question you have several options that are described in this help topic.
Give these suggestion a try and check whether this solves your issue.
All the best,
Andrey
the Telerik team