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

Double click action on GridView

5 Answers 87 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Nelson
Top achievements
Rank 1
Nelson asked on 22 Apr 2016, 04:37 PM

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.

5 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 25 Apr 2016, 10:05 AM
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.
0
Nelson
Top achievements
Rank 1
answered on 25 Apr 2016, 04:15 PM

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

0
Dimitar
Telerik team
answered on 26 Apr 2016, 09:41 AM
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.
0
Nelson
Top achievements
Rank 1
answered on 26 Apr 2016, 05:52 PM

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

0
Dimitar
Telerik team
answered on 27 Apr 2016, 11:30 AM
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.
Tags
GridView
Asked by
Nelson
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Nelson
Top achievements
Rank 1
Share this question
or