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

skip column in edit view

3 Answers 71 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 08 Dec 2008, 05:31 AM
Hi all,
I am using a radgrid and allowing multi-row edit in inline edit form. I have 2 columns, 1 of which I would like to skip. Since the use only wants to tab though the one column, i need to figure out a way for him to hit tab and essentially skip the second column and go directly to the row below.

I have found zero on this topic on regular gridview or radgrid.

Could I programmatically get tab to equal tab +1 (i.e. add an additional tab to one tab click)

Help appreciated.

Ryan

3 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 08 Dec 2008, 09:55 AM
Hello Ryan,

The easiest way to achieve the desired behavior is to set the second column to be non-editable (ReadOnly="true"). In this way in edit mode there will be no textboxes in that column and the tab sequence will include only textboxes from the first column.

All the best,
Dimo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Ryan
Top achievements
Rank 1
answered on 31 Dec 2008, 12:13 AM
Used the below

 

Protected Sub RadGrid1_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadGrid1.PreRender

 

 

For Each dataItem As Telerik.WebControls.GridDataItem In RadGrid1.MasterTableView.Items

 

dataItem.Edit =

True

 

 

Next

 

RadGrid1.MasterTableView.Rebind()

 

For Each dataItem As Telerik.WebControls.GridItem In RadGrid1.MasterTableView.Items

 

 

If TypeOf dataItem Is Telerik.WebControls.GridEditableItem Then

 

 

Dim editableItem As Telerik.WebControls.GridEditableItem = CType(dataItem, Telerik.WebControls.GridDataItem)

 

 

CType(editableItem("Ret").FindControl("RetTextBox"), TextBox).TabIndex = 1

 

 

End If

 

 

Next

 

 

End Sub

 

0
Shinu
Top achievements
Rank 2
answered on 31 Dec 2008, 04:38 AM
Hi Ryan,

As Dimo explained in the above post you just need to set the second columns readonly property to true,

Please go through the online demo link below that implements a  similar scenario where the OrderID field is set to  ReadOnly so it wont appear while editing.

http://demos.telerik.com/aspnet/Grid/Examples/DataEditing/ExtractValues/DefaultCS.aspx

 <rad:GridBoundColumn ReadOnly="True" HeaderText="OrderID" DataField="OrderID" SortExpression="OrderID"
                            UniqueName="OrderID">

Thanks,
Shinu.
Tags
Grid
Asked by
Ryan
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Ryan
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Share this question
or