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

No selection

3 Answers 121 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Filleau
Top achievements
Rank 1
Filleau asked on 29 Oct 2010, 07:12 AM
Hi,

I would like to disable all possible selection (rows, Cells & Columns). The grid view is used for the display purpose, so users don't have to select anything.

I don't find how to do this in VB

In the Forum, I found a sample in C#
this.radGridView1.CurrentRow = null;
this.radGridView1.CurrentRowChanging += 
new CurrentRowChangingEventHandler(radGridView1_CurrentRowChanging);

private
 
void radGridView1_CurrentRowChanging(object sender, CurrentRowChangingEventArgs  e)
 {
 e.Cancel =
true;
 }

Bur I can't translate it in VB

3 Answers, 1 is accepted

Sort by
0
Accepted
Emanuel Varga
Top achievements
Rank 1
answered on 29 Oct 2010, 08:08 AM
Hello,

There is a code converter here provided by telerik but that also has problems translating event handlers.
The code you provided translates to:
Me.RadGridView1.CurrentRow = Nothing
AddHandler Me.RadGridView1.CurrentRowChanging, AddressOf radGridView1_CurrentRowChanging
 
Private Sub radGridView1_CurrentRowChanging(ByVal sender As Object, ByVal e As CurrentRowChangingEventArgs)
    e.Cancel = True
End Sub

Hope this helps, if you have any other questions or comments, please let me know,

Best Regards,
Emanuel Varga
0
Filleau
Top achievements
Rank 1
answered on 29 Oct 2010, 08:58 AM
Perfect !
Thanks
0
Emanuel Varga
Top achievements
Rank 1
answered on 29 Oct 2010, 09:37 AM
Glad to be able to help,

If you have any more questions please just let me know, and if the question has been solved, please mark the question as answered, so that others can find the answers to their questions faster.

Best Regards,
Emanuel Varga
Tags
GridView
Asked by
Filleau
Top achievements
Rank 1
Answers by
Emanuel Varga
Top achievements
Rank 1
Filleau
Top achievements
Rank 1
Share this question
or