devexpress

vb.net DevExperess winforms gridview mouse down event

ぃ、小莉子 提交于 2019-12-08 08:27:05
问题 I have a problem with MouseDown event for GridControl with GridView . If user press control + shift + click column header is to select the column and also click the most top left will select all row. I managed to do that but either one will work for my code. It seems the logic have some problem with if-else statement. Anyone can help? Private Sub gridView1_MouseDown(ByVal sender As Object, ByVal e As MouseEventArgs) Handles GridView1.MouseDown If Control.ModifierKeys = (Keys.Control) Then Dim

XtraGrid - Export To Excel

二次信任 提交于 2019-12-08 07:26:55
问题 I'am using Developer Express XtraGrid Component to show some data. I have 2 XtraGrid on my Windows Application Form. Both grids have more than 200k+ lines, and 8 columns of data, and I have export to excel button. There are two ways (as I know) for exporting grid data to excel. 1- grid.ExportToXls(); or grid.ExportToXlsx(); 2- Using Office Interop, and OpenXML Utilities If I use grid.ExportToXls(); or grid.ExportToXlsx(); , the process time is faster than Office Interop Codes (for arround 2k

How to sort the items of a TcxImageComboBox by Description?

南楼画角 提交于 2019-12-08 06:24:25
问题 I've found a good component to implement a Caption<->Value List for ComboBox: Is there a ComboBox that has Items like a TcxRadioGroup? The only problem is: It has a Sorted property, but that doesn't work. So, how do I sort the Items of a TcxImageComboBox? 回答1: Quick and dirty method, should work fine for most cases: function CompareItems(AFirst: TcxImageComboBoxItem; ASecond: TcxImageComboBoxItem): Integer; begin Result := AnsiCompareText(AFirst.Description, ASecond.Description); end;

importing an excel file to datagrid on delphi

血红的双手。 提交于 2019-12-08 05:46:22
问题 I've tried this code on .NET -to import an excel file to devxpress datagrid- and it worked fine but i have to create a procedure doing the same job on delphi now. i dont know much about delphi so i need some ideas how to do that. public static DataTable ImportExcelXLS(string FileName, bool hasHeaders) { string HDR = hasHeaders ? "Yes" : "No"; string strConn; if (FileName.Substring(FileName.LastIndexOf('.')).ToLower() == ".xlsx") strConn = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" +

DevExpress dateedit customization to allow only specific dates

自古美人都是妖i 提交于 2019-12-08 05:22:51
问题 I have used the example here How to create a DateEdit descendant that will allow date unit selection, and multiple dates and periods selection. I wanted to add one more functionality where I would provide an array of dates only those will be visible. I have modified the code and included a property to accept the date ranges, which if provided would only allow seeing and selecting those dates, but I'm unable to understand which function I should override to accomplish the task. The behavior

XtraGrid - Export To Excel

若如初见. 提交于 2019-12-08 04:33:28
I'am using Developer Express XtraGrid Component to show some data. I have 2 XtraGrid on my Windows Application Form. Both grids have more than 200k+ lines, and 8 columns of data, and I have export to excel button. There are two ways (as I know) for exporting grid data to excel. 1- grid.ExportToXls(); or grid.ExportToXlsx(); 2- Using Office Interop, and OpenXML Utilities If I use grid.ExportToXls(); or grid.ExportToXlsx(); , the process time is faster than Office Interop Codes (for arround 2k lines of data). But, this method can be used for just 1 grid. So result appears on 2 different Excel

XtraScheduler create appointment programmatically

人盡茶涼 提交于 2019-12-08 04:07:17
问题 I am (trying) to use the DevExpress XtraScheduler to - (don't ask why) to create an appointment without actually using the scheduler control in the form i have attempted to do that like this... conn = new SqlConnection("connectionstring"); conn.Open(); int ResourceId = 18; AppointmentsAdapter = new SqlDataAdapter(); AppointmentsAdapter.SelectCommand = new SqlCommand("spGetAppointmentsForResourceById", conn); AppointmentsAdapter.SelectCommand.CommandType = CommandType.StoredProcedure;

Binding GridViewComboBoxColumn to a datasource

…衆ロ難τιáo~ 提交于 2019-12-08 03:15:50
问题 I already know how to specify the datasource but afther doing that it is not populated yet so i was thinking you need some kind of bind() command to populate the comboboxcolumn in the edit form This below is how i bind the datasource to the comboboxcolumn (and yes i am sure that ds has data rows in it) (ASPxGridView4.Columns["Naam"] as GridViewDataComboBoxColumn).PropertiesComboBox.DataSource = ds as DataSet; So could anyone tell me how i can now populate the comboboxcolumn in edit mode? Edit

MVC 3 DevExpress - Model Returned to Controller is Empty

半腔热情 提交于 2019-12-08 00:40:58
问题 The problem is really simple, but I just can't seem to solve it. I am using Razor engine with DevExpress combo box. I have this code: MODEL: public class TestModel { public string Name { get; set; } public List<Role> Roles { get; set; } } public class Role { public int RoleId { get; set; } public string RoleName { get; set; } } CONTROLLER public ActionResult OpenTest() { TestModel tm = new TestModel( ); tm.Roles = new List<Role>( ); tm.Roles.Add( new Role( ) { RoleId = 1, RoleName = "Role 1"

Remove gridview options

二次信任 提交于 2019-12-07 20:11:10
问题 How to remove "Show Group By Box" and "Remove This Column" from GridView menu? When I go to events there are no ShowGridMenu event so THIS will not work for me... 回答1: Use the GridView.PopupMenuShowing event instead for this purpose. private void gridView1_PopupMenuShowing(object sender, DevExpress.XtraGrid.Views.Grid.PopupMenuShowingEventArgs e) { if(e.MenuType == GridMenuType.Column) RemoveItem(e.Menu, GridLocalizer.Active.GetLocalizedString(GridStringId.MenuColumnRemoveColumn)); else if(e