xtragrid

Can I make row cell value readOnly on XtraGrid just for one row?

末鹿安然 提交于 2019-12-23 11:34:27
问题 How can I make a specific row cell readonly(not editable) on XtraGrid? For example just for row[0] but not all rows. 回答1: You can use the GridView.CustomRowCellEdit event: //... var repositoryItemTextEditReadOnly = new DevExpress.XtraEditors.Repository.RepositoryItemTextEdit(); repositoryItemTextEditReadOnly.Name = "repositoryItemTextEditReadOnly"; repositoryItemTextEditReadOnly.ReadOnly = true; //... void gridView1_CustomRowCellEdit(object sender, CustomRowCellEditEventArgs e) { if(e

How to hide column of devexpress XtraGrid

懵懂的女人 提交于 2019-12-22 08:07:37
问题 Hai all, Am using devexpress XtraGrid in C#.NET application.On run time i want to hide 1 column of XtraGrid and access that column in code behind page.And please help to access rows and columns of XtraGrid. Thank You 回答1: You should use the View.Columns[someFieldName].Visible property to hide / show a column. Please also refer to the following topic: http://documentation.devexpress.com/#WindowsForms/CustomDocument753 回答2: To hide a column from user set columns visible property to False as

Devexpress Repository ComboBoxEdit loosing cursor position. Edit.SelectionStart Not being assigned

北城余情 提交于 2019-12-14 03:15:59
问题 I am having an issue with my comboBoxEdit in a gridcontrol. I am using Winforms Devepress 11.2. I clicked in the text of an existing Repository comboBoxEdit, and typed in "appear backwards", however, it displayed as "sdrawkcab raeppa" like it would in a mirror. There are some posts about this topic but none of the solutions seem to work The reason for this is the following foreach (GridColumn column in this.gvNotes.Columns) { var columnEdit = column.ColumnEdit; if (columnEdit != null) {

Is there a way to make a cell editable where column is readonly in XtraGrid?

那年仲夏 提交于 2019-12-14 02:04:39
问题 My grid looks like this. Key Value 1 A 2 B 3 C I have Value column read-only in my grid. "Value" column's columnedit is associated with memoexedit repository. Now what I want to do is on some condition like when key=2, I want my value cell to be editable. I tried making the whole column ReadOnly = false. and then handled ShowingEditor to cancel edit on everything else than Key=2, but that prevents even opening up the editor for other values. What I want is able to see the editor but it should

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

How to add to the GRidViewColumnMenu Color und Font Editors

≯℡__Kan透↙ 提交于 2019-12-12 04:45:42
问题 I use Xtragrid. I would like to change the default popupmenu columnmenu GridViewColumnMenu and add ColorPieker and FontEditor to change color of cells in the Column and font of the column. Add to the standard menu column two editors have failed. More precisely, the menu items were added, but by clicking on them, nothing happens. I also tried to add all of the standard menu items to menu with the editors, and display it all in barmanager. In this case, working as editor of color and font

Load values via junctions table

空扰寡人 提交于 2019-12-12 02:46:05
问题 I need to load all the rows from the ItemToGroup table into one field separated with a comma, I can't use String.Join since I'm using server mode from DevExpress, it loads the data dynamically from the database on demand. And String.Join only works on generic lists. I tried this LINQ Statement: e.QueryableSource = From c In sqlData.ItemStores Select c.Price, c.Status, ItemGroupNames = c.ItemToGroups.Select(Function(g) g.ItemGroup.ItemGroupName) Problem is that in the grid column it shows:

Problem with data binding to DevExpress XtraGrid

两盒软妹~` 提交于 2019-12-12 02:35:15
问题 I have a XtraGrid dropped on to a Winform. I have created 3 unbound columns named ID, StartTime and EndTime and set their unbound types as Int, DateTime and DateTime respectively. I have created a class: public class Data { public Data(int id, DateTime startTime, DateTime endTime) { this.id = id; this.startTime = startTime; this.endTime = endTime; } private int id; private DateTime startTime; private DateTime endTime; public int ID { get { return id; } set { id = value; } } public DateTime

is there off-the-shelf convenient way to filter by a group column in XtraGrid GridView?

懵懂的女人 提交于 2019-12-11 17:09:36
问题 I know I can invoke filter editor and so on. But this is not a convenient thing, especially for non technical users. Can GridView continually display a nice filter field for a group column as it does for normal columns? I know I can roll my own via filtering on a hidden column and so on, but that's a lot of work. Maybe there is a built-in way to do this instead? 回答1: Set the GridView.OptionsView.ShowGroupedColumns property to true, the group column will be also shown in the column header

DevExpress XtraGrid RepositoryItemButtonEdit event is not firing

人走茶凉 提交于 2019-12-10 13:26:07
问题 I have added a new ButtonEdit column to my gridview, I turned buttons to ImageButton. I added button_click event but event is not firing. Should I bound - unbound something to my columnbutton? Here are the properties: // // gvPrompt // this.gvPrompt.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { this.gcID, this.gcName, this.gcPromptFileName, this.gcTypeName, this.gcDomainName, this.gcPromptText, this.gcLanguage, this.gcPromptPlayType, this.gcDuration, this.colPlayPrompt}); *