at our project we have specific request on search feature in datagridview. When user starts typing in datagrid we have to perform incremental search in selected column (in THE column that is sorted) as user types. At the same time the grid should scroll through records the datagrid.
I know the similar functionality in that use case is achieved via filter, but customer want to have all the items in the grid while searching for the record.
is there any easier way to implement this (than my solution mentioned lower)? Perphaps by telerik API?
It's just a first draft because i will have to extend this code so that typed string is somehow "visible" to the user)
private string searchString = "";
private void grdKlienti_KeyPress(object sender, KeyPressEventArgs e)
{
searchString += e.KeyChar;
int sortColumn = grdKlienti.Columns.Where(a => a.IsSorted).First().Index;
int scrollTo;
for (scrollTo = 0; scrollTo < grdKlienti.RowCount; scrollTo++)
{
if (grdKlienti.Rows[scrollTo].Cells[sortColumn].Value.ToString().StartsWith(searchString))
{
break;
}
}
grdKlienti.GridElement.ScrollToRow(scrollTo);
}
9 Answers, 1 is accepted
This feature is not supported in the current version of RadGridView. We will schedule a research for string search or full text search API.
Currently the only possible solution is similar to your draft method with cycling RadGridView rows.
Greetings,
Julian Benkov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Currently, we do not have a specific time frame set for the desired feature, because of other important issues and improvements. We will address it in a future version. The priority of this feature can be changed if we have more votes from our customers about the same functionality.
All the best,Julian Benkov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>
Thank you for your vote. You can also vote for this feature in our Public Issue Tracking System.
In addition to the draft of FilipN, you may also find useful this article where at the bottom you can see how you can color cells that match a particular string.
Nikolay
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>
Thank you for writing.
The full text search functionality is not implemented yet. The feature request is moved in our new Feedback Portal. You can track the item for status changes and add your vote for it here.
Also I cannot provide you with a specific time frame for item completion.
As an alternative you can check if the custom filtering implementation from the following article is suitable for your case: Use custom filtering to search in all columns of RadMultiColumnComboBox.
Please let me know if there is something else I can help you with.
Dimitar
Telerik
DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.
Hi Team. Could you tell me if this type of search has ever been implemented as standard?
Many Thanks
Thank you for writing.
RadGridView offers a built-in search functionality available for both end users and developers. Please refer to the relevant feedback item: https://feedback.telerik.com/Project/154/Feedback/Details/109762-add-radgridview-search-functionality
The search mechanism executes in a separate thread which leaves the UI responsive at all times. To enable the search row for end users all you have to do is set the AllowSearchRow property of RadGridView to true. Additional information is available here: http://docs.telerik.com/devtools/winforms/gridview/rows/search-row
I hope this information helps. Should you have further questions I would be glad to help.
Regards,
Dess
Progress Telerik