Double click action on GridView

6 posts, 0 answers
  1. Nelson
    Nelson avatar
    3 posts
    Member since:
    Apr 2016

    Posted 22 Apr Link to this post

    Hi,

    I was testing the radGridView component and I was wondering how can I execute an action on double click, that is from scratch, I can see some info on the forum but its mostly particular to the post.

    On my main form I fill the grid like:

            public Main()
            {
                InitializeComponent();

                grdMainWorkGrid.DataSource = WorksList.List();
            }

     

    Regards.

  2. Dimitar
    Admin
    Dimitar avatar
    1404 posts

    Posted 25 Apr Link to this post

    Hi Nelson,

    Thank you for writing.

    Generally, you can use the DoubleClick event. However if the grid is in edit mode the editor will have the focus and the event would not fire. This is why I wanted to ask you what exactly you want to use this event for? 

    I am looking forward to your reply.

    Regards,
    Dimitar
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Nelson
    Nelson avatar
    3 posts
    Member since:
    Apr 2016

    Posted 25 Apr in reply to Dimitar Link to this post

    Hi, thanks for your reply,

    Well... Initially I wanted to popup a new form with the specific double-clicked record but I change my mind after a while trying and went for a "button column" at the end, so that's what I'm doing right now to pop up the new form...

    Within the same question but different component:

    on this form that pops up I got three radDropDownList each one getting data from a different table I already try to sort them alphabetically from the properties tab and works fine except that the default selected record is the ID = 1 even when this record might start with a "z"... So I was wondering if there's a way of having it blank by default so then I can use autocomplete on the search...

    Regards

  5. Dimitar
    Admin
    Dimitar avatar
    1404 posts

    Posted 26 Apr Link to this post

    Hello Nelson,

    Thank you for writing back.

    You can set the SelctedValue to null after setting the data source:
    radDropDownList1.DataSource = GetTable();
    radDropDownList1.DisplayMember = "Name";
     
    radDropDownList1.SelectedValue = null;

    Let me know if I can assist you further.

    Regards,
    Dimitar
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  6. Nelson
    Nelson avatar
    3 posts
    Member since:
    Apr 2016

    Posted 26 Apr in reply to Dimitar Link to this post

    Yup, thats perfect, thanks...

    Last question: How do I filter the elements of the radDropDown component based on a previous selection... So if I have 3 dropdowns after selecting the first value the second would only show relative records to that value and the third will only display records relative to the second value:

    Eg:

    Make -> Model -> Version

  7. Dimitar
    Admin
    Dimitar avatar
    1404 posts

    Posted 27 Apr Link to this post

    Hi Nelson,

    Thank you for writing back.

    You can use a filter method:
    public RadForm1()
    {
        InitializeComponent();
     
        radDropDownList1.ListElement.Filter = FilterMethod;
     
    }
    private bool FilterMethod(RadListDataItem itemToFilter)
    {
        return itemToFilter.Text.Contains("Sam");
    }

    Detailed information is available here: Features.

    I hope this will be useful. 

    Regards,
    Dimitar
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top
UI for WinForms is Visual Studio 2017 Ready