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
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
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
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
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
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