1) I have a routine that changes a regular GridViewTextBoxColumn to a GridViewCheckBoxColumn. Because in the previous grid, you couldn't just change the type of the column, I had to record the column index, remove it, create a new GVCBC and set the index of it. The index property is no longer settable.
2) I have a method that lets me programatically set the selected row. I used to say SelectedRows.Clear() and then Rows[x].Selected = true; Now the Clear() method is missing from the SelectedRows collection.
Thanks in advance,
Lars Solberg
8 Answers, 1 is accepted

Snippet
this.radGridView1.ClearSelection();
this.radGridView1.CurrentRow = null;
I still haven't found a workaround for the index...
But i have a different question how can we select multiple lines programmatically? before it was SelectedRows.Add(Row)...
Thank you for the constructive feedback. We appreciate that.
Regarding your questions:
1. We found that the Index property sometimes confuses our customers. This is why we decided to make it read only. You should use Columns.Move method instead:
this
.radGridView1.Columns.Move(5, 3);
2. We are always trying to keep our new API similar to the Microsoft DataGridView API. This gives our customers flexibility and they can easily switch from MS grid to RadGridView. Because of this we changed the selected rows collection to be a read only collection. As Emanuel said, you can use the ClearSelection method.
I hope this helps. I also updated your Telerik points for the feedback. Should you have any questions, do not hesitate to ask.
All the best,
Jack
the Telerik team

I opened a support ticked on the selected rows issue as well, because it's working in some of the cases but i can give you a specific example in which is not working properly:
If you select a row in the grid, call a ClearSelection() and after that add a new row, the newly added row is always selected, why?
If we take into consideration a system that receives data continuously this will cause the scrollbar to be stuck at the highest level.
Thank you,
Emanuel
In single selection mode the CurrentRow is always synchronized with the SelectedRows collection. The SelectedRows collection contains only one row, which is always the CurrentRow.
Please, give me more details on your scenario and the exact behavior that you want to achieve. I think that I can find a proper solution for you. I am looking forward to your reply.
Jack
the Telerik team

I have explain everything i think in the support ticked with id: 328768 .
And there is also a code example there, if you can please take a look at that and let me know if there is any other solution for this or is this a really annoying bug...
And again i will write here the example scenario if anyone else is interested:
1. Bind the grid
2. Add a new row to the grid
3. Select that row
4. Programatically call ClearSelection() and .CurrentRow = null; => no rows appear to be selected
5. Add a new row and that new row will be selected, why?
6. If data is being received, in a situation in which you are using the grid for monitoring purposes : this happened, that happened, ( first line in, last line out) if this happens you will always be stuck with the scrollbar on the first line and you won't be able to move it from there.
You can try in the example i've provided in the ticket.
Hope this is clear
Thank you,
Emanuel, Varga
You can find the answer of your question in your support ticket. If you have further questions do not hesitate to write us back.
Best wishes,
Svett
the Telerik team

I don't have any new answer to my support ticket can you please take another look or at least tell me if it's working for you or not
Thank you,
Emanuel Varga
Please refer to the answer given in Ticket ID 328768. The reason for the issue is the fact that RadGridView determines the current and selected row asynchronously, because of performance optimizations. Hence, when you add records through your data source, you need to invoke the Application.DoEvents method immediately after that and before clearing the selection. This will cause all pending events to be processed.
Kind regards,
Svett
the Telerik team