gridcontrol

Data Annotation for column width

橙三吉。 提交于 2021-01-26 22:49:21
问题 I'm binding a collection of objects to a DevExpress GridControl, and using 15.1 Data Annotations to customise the look. However I'm struggling to find anything about setting column size of a property. Is this possible through annotations? Class with annotations: public class DataFeedback { [Display(Name = "Row Num", Order = 0)] public int RowNum { get; set; } [Display(Name = "Description", Order = 1)] public string Desc { get; set; } public DataFeedback(int rowNum, string desc) { RowNum =

Native type binding source / How to fill a DevExpress GridControl with a List of strings?

别来无恙 提交于 2020-05-18 19:09:19
问题 I normally have no problem with binding a DataSource to a GridControl. I usually so something like this: myGrid.DataSource = myList // BindingList<ComplexObject> colMyStrings.FieldName = "PropertyNameOfComplexObject"; and it works fine. I can add and delete rows from the grid and they will get added to / deleted from the DataSource "myList". So I basically always see what's in my List. But now I don't have a List<ComplexObject> , where the Generic Type has Properties, but I have a List filled

Native type binding source / How to fill a DevExpress GridControl with a List of strings?

a 夏天 提交于 2020-05-18 19:07:49
问题 I normally have no problem with binding a DataSource to a GridControl. I usually so something like this: myGrid.DataSource = myList // BindingList<ComplexObject> colMyStrings.FieldName = "PropertyNameOfComplexObject"; and it works fine. I can add and delete rows from the grid and they will get added to / deleted from the DataSource "myList". So I basically always see what's in my List. But now I don't have a List<ComplexObject> , where the Generic Type has Properties, but I have a List filled

Native type binding source / How to fill a DevExpress GridControl with a List of strings?

瘦欲@ 提交于 2020-05-18 19:06:57
问题 I normally have no problem with binding a DataSource to a GridControl. I usually so something like this: myGrid.DataSource = myList // BindingList<ComplexObject> colMyStrings.FieldName = "PropertyNameOfComplexObject"; and it works fine. I can add and delete rows from the grid and they will get added to / deleted from the DataSource "myList". So I basically always see what's in my List. But now I don't have a List<ComplexObject> , where the Generic Type has Properties, but I have a List filled

Textbox only displays content when the row is in edit mode

痴心易碎 提交于 2020-01-17 03:38:27
问题 I have done every thing I can think of, but the textbox just does not display the values. Where is my mistake? <dxg:GridColumn FieldName="secUserName" Header="TRAIL"> <dxg:GridColumn.DisplayTemplate> <ControlTemplate> <StackPanel> <TextBox Text="{Binding Path=Data.secUserName, Mode=TwoWay}" ></TextBox> </StackPanel> </ControlTemplate> </dxg:GridColumn.DisplayTemplate> and in vb '<!-- load the datagrid --> Module1._Context.Load(Module1._Context.GetGESECsQuery()) GridControl1

DevExpress GridControl Unbound Columns

断了今生、忘了曾经 提交于 2019-12-31 05:25:11
问题 I would like to know how to properly add a unbound column into a gridview. I've added a unbound column in the designer (set the unbound type, display format and all) but whenever I run the application, try to change the value of the unbound column and loses its focus the value is not saved (even the display format is not displaying correctly when I'm changing it). I must be doing something wrong. I need help guys! Much appreciated! 回答1: Unbound column does not provide a storage to save its

DevExpress GridControl cells' inner text selectable but not editable

自闭症网瘾萝莉.ら 提交于 2019-12-20 07:29:02
问题 GridControl is working like~ Excel natively: Clicking once on the cell selects it . Copy copies the cell value and the header. Clicking twice on the cell selects the inner text . Copy copies only the inner text. I am working on preventing the cell edition hooking the ShowingEditor event, setting the edition to e.Cancel . However this prevents the behaviour 2. above. I'd like to still be able to select the inner text for copy , just that I'd like it to be not editable . Would you know how to

How to bind data to SyncFusion GridControl in C# using Windows Application?

帅比萌擦擦* 提交于 2019-12-13 23:44:05
问题 i am fed up with this Syncfusion Controls, these are very difficult compared to normal datagridview. where is the Datapropertyname in Syncfusion GridControl. how to bind Data to Grid Control. gridControl1.ColStyles[3].DataSource = dt1; gridControl1.ColStyles[3].DisplayMember = "bcmp_Name"; gridControl1.ColStyles[3].ValueMember = "bcmp_Id"; gridControl1.ColStyles[3].DropDownStyle = Syncfusion.Windows.Forms.Grid.GridDropDownStyle.Exclusive; gridControl1.ColStyles[5].DataSource = dt2;

How to set the default Sort on a DevExpress GridView

戏子无情 提交于 2019-12-12 16:00:43
问题 On .net WinForm, DevExpress's GridControl/GridView bound on a DataSet, how to specify the default sort order? The one that is used when there is no visible GridColumn with a SortOrder. By default, I have set a sorting on the view on my hidden DateTimeStamp GridColumn. It is of course overrided by user if user click on a column. User can "Clear Sorting" using the menu on column or by clicking on a column while pressing the Control key. When doing that, Rows are not sorted anymore (or maybe by

Why DevExpress GridControl show empty tooltip?

有些话、适合烂在心里 提交于 2019-12-12 04:58:59
问题 I create DevExpress GridControl. Here full code of GroupBox and GridControl, because i do not know why it shows empty tooltip. I try to make many changes at code, read DevExpress forum but it not work. <GroupBox Grid.Row="0"> <GroupBox.Header> <TextBlock FontWeight="Bold" Text="GroupBox"/> </GroupBox.Header> <Grid ScrollViewer.CanContentScroll="True" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" > <Grid.RowDefinitions> <RowDefinition Height=