No selection

4 posts, 1 answers
  1. Filleau
    Filleau avatar
    114 posts
    Member since:
    Jun 2006

    Posted 29 Oct 2010 Link to this post

    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
  2. Answer
    Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 29 Oct 2010 Link to this post

    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
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Filleau
    Filleau avatar
    114 posts
    Member since:
    Jun 2006

    Posted 29 Oct 2010 Link to this post

    Perfect !
    Thanks
  5. Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 29 Oct 2010 Link to this post

    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
Back to Top