adding a telerik dropdown/autocomplete control to telerik asp.net mvc grid - telerik-mvc

I have a telerik MVC grid wherein I want to add one databound column. I want this column to show telerik dropdown/autocomplete control.
How can I do that?

If you want to just show the data it is easy - you define the DropDownList in the Template method of the column.
If you want your changes to affect the model and change it - you need to use EditorTemplate. Use the UIHint attribute or use the TemplateName method of the column to specify the editor. You can check this demo for such implementation.

Related

Substitute for ListViewin WinForm

I have to create two column table with static information something like legend. But I can not use ListView, I can not use DataGridView too, I need to use devExpress component for it. Can someone suggest simple solution?
The very simple solution is to create a DataTable, add two columns to it, and add rows with appropriate data. Bind this DataTable to the GridControl.DataSource property.
The DevExpress XtraGrid works in bound mode only. That is why it is necessary to have the DataTable.

Is it possible to add two or more repository controls in devepxress grid control

Hey i am dealing with winform(c#) application. i am using Devexpress Grid Control.
Is it possible to have two or more repository controls in grid control column for edit purpose.
eg.. say like a textbox and combo box in a grid column.(this is possible in web application by adding item templates to the grid column)
Is this possible or any other way to get this done?
You can set the GridColumn.ColumnEdit property to specifying the editor used to edit a column's value

Adding filter textbox to header of a Listview in Gridview mode

I watched a demo video of Mole 2010 (a WPF debugger) in which there is a nice datagrid feature where the header contains a filter textbox, so you can type in a string and filter for that column. Here is the video, the feature is demonstrated at 3:00 minutes
http://www.youtube.com/watch?v=bgMg61iM9G8&feature=player_embedded#at=180
I am interested in replicating that feature, but I am not sure how to do it gracefully. My application is a WPF MVVM EF app, it's my first WPF app.
Is it possible to create a template for the header where I can also add a textbox, and a button with a cross so the contents can be cleared?
If so, how could I bind the textbox to filter its column?
Should I be hiding the actual header row and making an artificial one where I add my own header and textbox and button etc. and then bind them to filter clause properties that I add to my CollectionViewSource when a filter string is typed? I hoped to avoid this so I could retain sorting by clicking the header.
I dont really know how to start this. Are there any gurus that could suggest how this could be done? Thanks!
You might have a look at the BookLibrary sample application of the WPF Application Framework (WAF). It shows how to use a TextBox for filtering the data in a DataGrid. It uses MVVM and the Entity Framework as well.
you might want to try that : http://dotnetexplorer.blog.com/2011/04/07/wpf-itemscontrol-generic-staticreal-time-filter-custom-control-presentation/ => it filters any collections and you just have to decalre the control in XAML...

How to insert the combo box inside DFatagrid in Silverlight

I have to insert the combobox inside the DG in silverlight 4. And also it should be binded and the values inside
I don't think there is an "automatic" way to do this, unless you use some sort of custom third party grid. Otherwise, you'll need to define a custom column with the ComboBox as the template, and then on RowDataBind you can bind the data to the ComboBox ItemsSource property.
I found a post about this that has some examples.
Forum Post

Dynamically changing a WPF ListView between one that contains a GridView with column headers and another view that doesn't

I'm not quite sure how to go about this so any advice would be much appreciated.
I have a ListView whose default implementation is using with column headers. At runtime in the program I would like to be able to click on a button at runtime to change the view so that the list view loses the GridViewColumn headers and implements a new style using one of my own data template.
Then I would also like the ability to click the button and change the ListView back to a grid view with column headers.
Can anyone point me in the correct direction of how to go about this?
Thanks
Since ListView.View is dependency property, you can bind it to something on your VM via converter.
Microsoft has a sample that demonstrate how to create a ListView control that displays data in multiple view modes, which include the GridView and other custom view modes.
Search for ListView with Multiple Views Sample in the WPF Documentation Sample page.
http://archive.msdn.microsoft.com/wpfsamples
Here is a direct link to download the sample:
http://archive.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=wpfsamples&DownloadId=7766

Resources