How to add controls(like image,button etc) to a GridControl in devexpress?
Those controls are called Repository Items. You can add them via GridControl Designer
And assign particular Repository Item to column you want.
If you mean ASP.NET ASPxGridView, there are two different solutions:
1) you can use different ASPxGridView columns kinds as it is explained in the Data Columns topic. However, generally, this only affects data representation when a certain data row is being edited. In this case, different editors are used for different columns.
2) since this is an ASP.NET grid, it allows a developer to use Templates. This is a very powerful approach which allows you to change the grid's lookandfeel significantly. Please take a look at the ASPxGridView demos and click the "Templates" command in the navigation panel. You will see some examples of how templates can be used in the ASPxGridView.
If you install devexpress you can also see Demo-Center for example. (also online demo)
look for Grid-Columns
In Asp you got these:
Related
What is the best way to create an empty chart (like a spreadsheet) so that the user can fill the cells with some data (strings, numbers)? The number of rows and columns is not known, it's determined at runtime. The data given by the user should then be easily loaded to, say, 2D array. Is using DataGrid a good solution?
You might want to check
RadSpreadSheet
Infragistic WPF SpreadSheet
DevExpress Spreadsheet
SynFunction Spreadsheet
These are third party control and not free.
This one is open source control.
Creating your own is of course lots of work and you may want to refer to these for a starter.
If you want to make a simple editable DataGrid follow this link.
Also look at IEditableCollectionView
IEditableCollectionView is a new collection view that you can use to supports adding and removing new items, as well as editing items in a transactional way. It is implemented by ListCollectionView (the default view for ObservableCollection) and BindingListCollectionView (the default view for DataTable). I will go through an example to further describe it and summarize afterwards.
I want to represent objects in HubSection, but they don't have to be presented in the same way. I have also two additional buttons: Add new session and Show all.
I wanted to use GridView, but I don't know how to use different styles depending of some the object's properties.
The second option is just create Grid and access to it from code according to this article.
Which option is recommended in this case, if first, how can I use different styles in GridView in Windows8.1 application?
ItemTemplate and ItemTemplateSelector is your friend when you want to achieve different appearance for items based on their properties
Example here http://www.geekchamp.com/articles/windows-8---winrt-datatemplateselector-change-the-color-of-listboxitem-depending-on-condition
i need a solution like this:
http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/checkboxes/defaultcs.aspx
however, i need the user to be able to add entries in here.
does such a control already exist?
it can be either jquery or asp.net
it also does not have to be a combobox, it can be a listbox. i need to have every item have a checkbox next to it and be able to add a comment for each entry.
Take a look at the ASPxGridLookup control from the DevExpress component vendor.
The ASPxGridLookup component allows the implementation of the multi-select DropDown functionality:
http://demos.devexpress.com/ASPxGridViewDemos/ASPxGridLookup/MultiSelect.aspx
http://www.devexpress.com/example=E3467
http://codecentral.devexpress.com/E3467/
with editing capabilities via the embedded ASPxGridView object:
http://demos.devexpress.com/ASPxGridViewDemos/GridEditing/EditModes.aspx
Ref : DropdownList with Multi select option?
Multiple dropdownlist with checkbox....checkout below link...
checkout demo page here...
http://download.ysatech.com/ASP-NET-Multiple-Selection-DropDownList/ASP-NET-Multiple-Selection-DropDownList.aspx
Blog page here....
http://blog.ysatech.com/post/2009/09/09/ASP-NET-Multiple-Selection-DropDownList-with-AJAX-HoverMenuExtender.aspx
http://www.codeproject.com/KB/user-controls/MultiSelectDropdownList.aspx
To me it sounds like it might be better for you to run with a ListBox. Telerik offers the RadListBox, which allows you to have checkboxes as seen here.
Additionally, you could allow for edits upon, for example, double-click as is displayed in the source code attached to this forum post.
Finally, if you want to also display the comments then you could use an ItemTemplate to define a custom layout for each RadListBoxItem and allow the user to edit both the main and comment fields.
That should cover everything that you need.
Can anyone tell me if what is detailed in this example is possible with GridView using TemplateColumns. http://www.codeproject.com/KB/webforms/CustomDataGridColumn.aspx
I need to dynamically generate a GridView that may need not have one datatype in a column. Say Column 1 could have Checkbox or TextBox control (based on a logic, of course)
I tried implementing ITemplate and adding custom controls in InstantiateIn(), but as far as I understand - the binding here on on a per column level and not on per Item level.
How can I acheive this?
Thanks in advance. I can stub out the code I have if the question needs more clarification.
Yes, Telerik's RadGrid supports this.
The same code will work with only minor changes. For example, ListItemType becomes GridItemType. DataGridItem becomes GridDataItem, etc. Also, the way Telerik creates the controls means some of the indices need to change. For example, their ItemDataBound event has this code:
string dataType = e.Item.Cells[0].Text;
but with a Telerik RadGrid, that needs to be:
string dataType = e.Item.Cells[2].Text;
Other than those kinds of minor changes, it all works with RadGrid.
Note: When I see code samples from Telerik, they generally go a different route. The way I've seen them provide custom content for a cell is to put your customization logic in the ItemCreated event. That will be called for each row. So you can have the column's template contain all the possible controls and then in ItemCreating event, modify the instance of that template by setting the correct control to Visible based on your logic (this is the approach used in the article you linked to). Or you could create only a single specific control in that event for the correct type of control. Here is the documentation for the ItemCreated event and also a code sample from Telerik that modifies a LinkButton for each row but the same approach can be used.
How do I display a DataGridView within a cell of another datagridview in C# forms app?
How would I have to handle Sorting & value changed if this possible?
That is the only way I can display data to make some sense.. Think of it like I have a task column and dates column. Under the dates column I have a list of things to be done. These date columns are dynamic & there might be multiple date columns
That sounds like a difficult interface to use, have you considered some kind of tree control?
If you're determined to use data grid views, look at customizing data grid view columns and cells. You need to declare custom subclasses for the column and cell behaviour that you want. I don't know if it's possible to do what you want, but that's where I would start.
This is a suggestion since what your asking I do not think is possible with the built in DGV of .NET.
Using custom controls made by professional companies that provides a DataGrid with the capability of hierarchical data. For example a row can be expanded to show multiple entries (the multiple entries can be an entirely different table containing completely different columns even). Here are a few options that you can check out.
Infragistics WinGrid
Component One
There are a few other places/companies that make great .NET component packages that provide added features to the existing .NET components.
http://blogs.msdn.com/markrideout/archive/2006/01/08/510700.aspx
Found a link where hierarchichal datagrid is implemented.
Now, I have to either modify the control, or settle for hierarchichal gridview!
Hope this helps someone. Will update later