Subject |
Author |
Date |
|
Marcos Tadeu Rena
|
Oct 25, 2007 - 5:59 AM
|
Hi, we are using the Elegant grid in an application that requires screen update, but when we try to update the datasource of a Bound Grid it keeps the old data and add the new one, kind of duplicating columns.
We have tried to clean the datasource with .Datasource = Nothing, but this causes an
"Object Reference Not Set to an Instance of an Object" error.
How can we proceed?
Thanks so much
Marcos
|
|
Technical Support
|
Oct 25, 2007 - 6:44 AM
|
Unfortunately we failed to reproduce this problem. Could you send us a project that illustrates the issue?
|
|
Marcos Tadeu Rena
|
Oct 25, 2007 - 7:17 AM
|
Hi, I’ve just sent an e-mail with the sample. The subject was "RE: Cleaning the Datasource property in a Bound Grid".
But I’ve sent the mail from wsouza@bulltick.com ’cause my mail has problems...
Thanks in advance,
|
|
Marcos Tadeu Rena
|
Oct 25, 2007 - 7:24 AM
|
It semms that the mail doesn’t allow zip files so I’m sending a text file
|
|
Technical Support
|
Oct 25, 2007 - 9:22 AM
|
Just rename the extension to "._zi". Please note we need a project not a source code excerpt. It is much easier to find out what’s wrong having a project rather than a code snippet.
|
|
CARLOS HERNANDEZ
|
Oct 22, 2007 - 11:36 AM
|
From a click button, I try to consent to the value of a cell with DataValue, but an error exists
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click UnboundGridControl1.Cell(1,1).DataValue <-----------ERROR EndSub
|
|
Martin S
|
Feb 22, 2012 - 7:15 AM
|
got it, sorry, changed datarow for row when adding references
|
|
Martin S
|
Feb 22, 2012 - 7:11 AM
|
tried this example to modify a column value depending on other comboboxcell but can’t cause it says
Dim _TotalByColumnRow As Elegant.Ui.Grid.Row _TotalByColumnRow = grdU.Rows(1) Dim totalByColumnCell As Elegant.Ui.Grid.Cell = _TotalByColumnRow.Cells(grdU.Columns(1))
_TotalByColumnRow.Cells(grdU.Columns(1))
’Cells’ is not a member of ’Elegant.Ui.Grid.Row’.
what reference i’d have to add to use object cells?
thanks
|
|
CARLOS HERNANDEZ
|
Oct 22, 2007 - 11:40 AM
|
In the event click, intent to save to a file in particular the value of some cell.
|
|
CARLOS HERNANDEZ
|
Oct 22, 2007 - 12:08 PM
|
SOLUTION
Dim _TotalByColumnRow As DataRow _TotalByColumnRow = UnboundGridControl1.Rows(1) Dim totalByColumnCell As Cell = _TotalByColumnRow.Cells(UnboundGridControl1.Columns(1))
THANKS
|
|
CARLOS HERNANDEZ
|
Oct 22, 2007 - 10:30 AM
|
As I can consent to the value of a cell of an UnboundGridControl from code?
|
|
Technical Support
|
Oct 22, 2007 - 10:35 AM
|
You can use Cell.DataValue and Cell.DisplayValue properties for that.
|
|
CARLOS HERNANDEZ
|
Oct 22, 2007 - 10:44 AM
|
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
UnboundGridControl1.Cell.DataValue EndSub
|
|
CARLOS HERNANDEZ
|
Oct 22, 2007 - 10:47 AM
|
Impossible, it indicates me ERROR
|
|
Technical Support
|
Oct 22, 2007 - 11:35 AM
|
You should obtain a particular cell instance and then use the properties. You can obtain cells in a variety of ways so a particular way depends on what you are trying to achieve. Please tell us know more so we can help you.
|
|
CARLOS HERNANDEZ
|
Oct 18, 2007 - 4:35 PM
|
greetings. My question is, like I can set text to a cell of the RowHeaderColumn
|
|
Technical Support
|
Oct 19, 2007 - 5:24 AM
|
There is no default implementation for text in row header cells but you can render it yourself using the ICellContentViewer interface. All you need is to implement two methods of this interface: Measure() and Paint() . Then you should set the CellStyle.CustomContentViewerType property of a particular cell style to the type of class that implements the methods in order to apply your custom viewer. You can learn how to make custom cell viewer from the following samples in Simple Demos set: Search, Product Photos, Multithreading, and Graphs.
|
|
CARLOS HERNANDEZ
|
Oct 19, 2007 - 9:21 AM
|
|
|
CARLOS HERNANDEZ
|
Oct 17, 2007 - 3:03 PM
|
I have modified the code of the TextCell and I have compiled the code of the "ElegantGrid", it generates me the file Elegant.Grid.dll, simply substitution the new file compiled by the previous one, but when trying to use the ElegantGrid the TextCell doesn’t modify. Not you if it should assemble the file Elegant.Grid.dll or simply to substitute it. If one has to assemble, could I explain as making it?
|
|
Technical Support
|
Oct 18, 2007 - 4:26 AM
|
We are not completely sure what the problem is but if you compiled Elegant Grid successfully and cannot see any changes in your modified TextCell then you may have forgotten to install your new assembly to GAC (global assembly cache). If it is the case, use gacutil.exe (it comes with Visual Studio) in the following way: gacutil.exe /i Elegant.Grid.dll This procedure guarantees that you are using the proper assembly. Please however note that you can modify the source code on your own risk because we do not provide any support for such changes but rather the source code is provided for maintenance purposes.
|
|
CARLOS HERNANDEZ
|
Oct 18, 2007 - 10:51 AM
|
I agree, the problem is that I need that in a cell there are a button and an editbox together, something similar to a combobox but when giving click in the button I appear a dialog. thank you
|
|
CARLOS HERNANDEZ
|
Oct 18, 2007 - 3:05 PM
|
thanks, my solution is TextCellStyle
|
|
Andrew Brown
|
Aug 27, 2007 - 5:54 AM
|
When a grid is placed on a form that has AcceptButton and CancelButton configured and you press either Enter or Esc while editing a cell then the key event is taken by the form and you cannot use Enter or Esc to finish the editing. Is there some property I need to set to make this work?
|
|
Andrew Brown
|
Aug 27, 2007 - 5:46 AM
|
The grid will crash with an ArgumentOutOfRangeException in the following example case:
1. Add unbound grid to form 2. Set AllowRowSelection = false 3. Add two rows with one text column 4. Double click on row #1 to edit text 5. Press Enter to confirm change 6. Press down cursor to move to next row:
at System.Collections.CollectionBase.System.Collections.IList.get_Item(Int32 index)\r\n at Elegant.Auxilary.SelectionRangeCollection.get_Item(Int32 index)\r\n at Elegant.Auxilary.SelectableByItemControl.ProcessUpKeyDown(KeyEventArgs e)\r\n at Elegant.Auxilary.SelectableByItemControl.OnKeyDown(KeyEventArgs e)\r\n at Elegant.Grid.GridControlBase.OnKeyDown(KeyEventArgs e)\r\n at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)\r\n at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)\r\n at System.Windows.Forms.Control.WmKeyChar(Message& m)\r\n at System.Windows.Forms.Control.WndProc(Message& m)\r\n at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)\r\n at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)\r\n at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)\r\n at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)\r\n at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)\r\n at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)\r\n at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)\r\n at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)\r\n
|
|
Kevin Roberson
|
Jul 31, 2007 - 9:51 PM
|
Is there not a way using the bound grid to allow the user to add a new row to the grid similar to Microsoft’s DataGridView, by clicking on the last row? Thanks for your help.
|
|
Technical Support
|
Aug 1, 2007 - 12:11 PM
|
This feature is not supported but we plan to release a new version of Elegant Grid soon and we will consider this feature to be added. Thank you.
|
|
Mallikarjun Lavate
|
Jul 19, 2007 - 11:23 PM
|
Dear Sir\Madam,
I have one query regarding property grid.
1. Say in One of the row in the property grid we are having the combo box. 2. Choose the appropriate option from Combo Box. 3. After selecting the option atleast one of the rows in the property grid should be enable or disable.
Let me know how to disable or enable the row, which is explained in the step 3.?
Waiting for your fast reply. Thanks in advance
Regards
Lavate Mallikarjun Avanna
|
|
Technical Support
|
Jul 20, 2007 - 10:18 AM
|
This forum is dedicated to Elegant Grid for .NET but you are asking a question about the CExtPropertyGridCtrl class from Prof-UIS.
The property grid control does not support disabled rows, but any grid cell in the property value rows can be read-only. To make a grid cell read only, you should apply the __EGCS_READ_ONLY style to it.
Generally you should override the CExtPropertyGridCtrl::OnPgcInputComplete() virtual method to get notified about the end of editing in the combo box cell, make read-only active cells of other property values and invoke the CExtPropertyGridCtrl::PropertyStoreSynchronize() method to update the property grid.
|
|
John Wong
|
Jun 29, 2007 - 9:53 PM
|
Hi,
Can a databound grid show the row number on the left side of the grid similar to the way Excel shows the row number on the left side of the spreadsheet? Thanks!
John
|
|
Technical Support
|
Jul 2, 2007 - 11:18 AM
|
Unfortunately this feature is not supported. We can only regard your message as a feature request.
|
|
John Wong
|
Jun 23, 2007 - 9:39 PM
|
Hi,
I tried using this example from the elegant grid documentation, but it doesn’t seem to work. I get a blank grid, but I’m not too sure why. I know the dataset is being populated because when I read out the dataset columns, they come out correctly.
[C#] using System.Data; using System.Data.OleDb; using Elegant.Grid;
OleDbConnection oleDbConnection = new OleDbConnection("...connection string..."); OleDbCommand oleDbSelectCommand = new OleDbCommand("SELECT * FROM Contact", oleDbConnection);
OleDbDataAdapter dataAdapter = new OleDbDataAdapter(); dataAdapter.SelectCommand = oleDbSelectCommand;
DataSet dataSet = new DataSet("Contact");
private void Form1_Load(object sender, System.EventArgs e) { boundGridControl1.DataSource = dataSet ; boundGridControl1.DataMember = "Contact"; dataAdapter.Fill(dataSet); }
|
|
John Wong
|
Jun 26, 2007 - 7:31 PM
|
Hi,
How do I send the project to you? Thanks!
|
|
Technical Support
|
Jun 27, 2007 - 12:07 PM
|
|
|
Technical Support
|
Jun 25, 2007 - 3:43 AM
|
Your code looks OK. Please send us your test project so we can check it.
|
|
John Wong
|
Jun 23, 2007 - 6:08 PM
|
Hi,
I’m new to elegant grid and I’m evaluating its functionality at the moment. I was wondering, does elegant grid have any of these three features for a databound grid?
1. freeze column (or split scroll) 2. card view that can be created dynamically at run-time 3. can handle column names and column headers that contain spaces in the name
Thanks!
|
|
John Wong
|
Jun 26, 2007 - 7:30 PM
|
Hi,
Thx for the responses. =-)
Do you guys have plans to incorporate the freeze column (or split scroll) or card view features in the future? Thanks!
|
|
Technical Support
|
Jun 27, 2007 - 12:08 PM
|
We added your feature requests to our to-do list. Thank you.
|
|
John Wong
|
Jun 29, 2007 - 8:38 PM
|
Hi,
When is v1.4 going to be released? Will the freeze column feature be included? If it is released soon, I will design my entire project around it. But for now, I may reluctantly have to either go with Sybase’s DataWindow (which is hard to program) or Syncfusion’s Essential Grid (the scrolling is slow). Your grid is the best, as long as you add the freeze column or split scroll feature.
John
|
|
Technical Support
|
Jul 2, 2007 - 11:24 AM
|
Thank you for the kind words, John. The features you requested are not in our immediate plans. These features may only be implemented not earlier than this fall. We are sorry.
|
|
Technical Support
|
Jun 25, 2007 - 3:49 AM
|
Thank you for your interest in Elegant Grid. Features #1 and #2 are not supported. As for feature #3, there is no problem with spaces in the names of column headers, e.g. "Column 1", where a space comes before 1. Of course, the corresponding variable in the code cannot contain spaces, e.g. "col1".
|
|
Bahrudin Hrnjica
|
Jun 13, 2007 - 2:26 PM
|
Try to resize grid column in Designer mode, and press F5 in Visual studio net but not moving mouse cursor from grid area, VSplit cursor appear instead of Default cursor.
|
|
Technical Support
|
Jun 14, 2007 - 4:10 AM
|
Thank you for reporting the bug. We will fix it in the next release.
|
|
me isme
|
May 23, 2007 - 10:21 PM
|
Currently, I have XD++ MFC Diagram Kit from ucancode software ( http://www.ucancode.net ), I hope I am also need a modern GUI Kit, so I found Prof - UIS, I think it maybe one of a good choice, but I cann’t make sure if it works with XD++ MFC Diagram Kit or not? Please give us some help on this, thanks!
|
|
Technical Support
|
May 24, 2007 - 11:50 AM
|
There should be no problem using Prof-UIS with XD++ MFC Diagram Kit.
|
|
Nachiket Mehta
|
May 22, 2007 - 3:49 PM
|
I am currently evaluating ElegantGrid. I want to know if it is possible not to show the GroupByBox and set the grouping in my code. Also, can I hide the columns that I am setting GroupBy for? It is taking unnecessary space by displaying a column whose value is displayed by the grouping node on top and repeating the same value for each row. Thanks.
|
|
Technical Support
|
May 23, 2007 - 8:28 AM
|
You can show or hide the Group By Box using the GroupByBoxVisible property. You can hide a column by setting Column.Visible to true. Here is how the grouping and sorting works. There is a SortRules collection that specifies the columns by which the grid can be grouped and sorted. There is a SortGroupCount property that tells the grid by how many columns from the SortRules collection the grid should be sorted. For instance, you have two columns in this collection and you set SortGroupCount to 1. This means the grid will be grouped by one column (the first column in the collection). You can play with all these properties in the Visual Studio designer. So all features you are asking about requested work.
|
|
Nachiket Mehta
|
May 23, 2007 - 10:59 AM
|
Thanks for a quick response. I went through most of the properties of ElegantGrid and everything is self explanatory. I just have 2 more questions for you.
1. AllowDraggingOffColumns property allows whether the end-user can hide columns by dragging header cells out of the header. How can they make them visible again?
2. How can rows auto-size to fit content in height? This is shown in your sample demos project in the Search section. However, how does this grid auto-size the row height to fit the content? I have ColumnAutoSizeMode set to Fill. Anything else I am missing?
Thanks for all the help.
|
|
Technical Support
|
May 24, 2007 - 4:46 AM
|
You can make the columns visible again by setting the Column.Visible property to true.
As for your second question, cells measure their height by content automatically. Still if you want to make the cell height fixed, please use the CellStyle.FixedHeight property. In the Search demo, we did this by using a custom cell content viewer.
|
|
Nachiket Mehta
|
May 24, 2007 - 10:02 AM
|
So if I understood you correctly, If I have a Text column with width defined as 50 and have text that goes beyond the defined width, the height of that row will adjust automatically to fit content of this cell? I cannot replicate this behavior. Do I have to implement customer cell content viewer to achieve this? VS Datagridview has a property called AutoSizeRowMode and when you set it to AllCells all rows change their heights automatically depending on the content. Thanks.
|
|
David Ferreira
|
May 1, 2007 - 2:36 PM
|
Follow-up to my previous question:
I have a button sitting in an empty column in a grouped grid. I do not want to display the GUID’s since they are meaningless to the end user, so the button is all by itself in the grid, and the GUID column is hidden. When the user selects the button, I can determine which row was selected through the row index property, but with grouping active I can’t equate that to a row in the data table.
At the moment, I do not see any way in any exposed object or collection to determine an adjacent cell’s value. I am looking for something like the row/column selection you can do in a data table (myDataTable.Rows[0][3].ToString() or something similar). Failing that, I would like to find a way to get at the actual row index that equates to the data source. Either method works for me, but at the moment I can’t see any way to do either.
-Dave Ferreira
|
|
Technical Support
|
May 3, 2007 - 6:39 AM
|
Please try BoundGridControl.GetDataSourceItemByRowIndex() , which returns the data row instance by row index. If you mean something else, let us know.
|
|
David Ferreira
|
May 1, 2007 - 1:58 PM
|
I am currently evaluating ElegantGrid for use in one of my client’s projects.
I have a bound data grid loaded and grouped as desired, but so far I have been unable to figure out how to expand and collapse all groups through code. I have the groups by default collapsed, but I want to have buttons on the form which will expand and collapse all for the user.
Is this possible, and if so how?
-Dave Ferreira
|
|
Technical Support
|
May 3, 2007 - 7:04 AM
|
In fact, there is no such API in the bound grid that allows you to expand and collapse grouped rows. In other words, a group row , which has a plus or minus sign, is not bound to some row in the data source and you cannot edit its label and expand or collapse the grouped rows below. In fact, a group row is an auxiliary visual element that makes working with tabular data more convenient and when the grid is grouped by a column, it is actually sorted.
If you need to control all the grid elements manually, the unbound grid control can be a good choice. This would allow you to work with rows and cells directly.
|
|
Vrinda Savargaonkar
|
Apr 18, 2007 - 8:01 AM
|
Dear Sir/Madam
I am using CExtGridWnd class. Using this class i derive a class .I then inserted some column . In one of the column i am inserting some names using
CExtGridCellString * pCellString0 =STATIC_DOWNCAST(CExtGridCellString, GridCellGet( 0, iLoop )); pCellString0->TextSet( _T(szFullName) );
I am using style .BseModifyStyle( __EGWS_BSE_SORT_COLUMNS,0,FALSE);
After inserting data when i click on column header having text data not sorted properly i.e. not in alphabetical order either ascending or descending. When arrow on column header shown upword the sorting order is like this Ganesh Rai Hitesh Kiran Ramesh Vasant arm enov
etc... Why not names like , arm then enov & then Ganesh like this are sorted when ascending order or when arrow upword.
where is problem. Please suggest quickly some solution . Thanks.
|
|
Krustys Donuts
|
Jul 8, 2007 - 8:59 PM
|
Sometimes, we need to make a CExtGridWnd gray to show that it cann’t be selected or manipulated. I have changed the style of the grids in the window to __EGCS_READ_ONLY,but it doesn’t work.
|
|
Technical Support
|
Jul 9, 2007 - 9:20 AM
|
__EGCS_READ_ONLY is a cell style. You can disable the whole grid window using this:
wndGrid.EnableWindow( FALSE );
|
|
Technical Support
|
Apr 18, 2007 - 9:25 AM
|
This forum is dedicated to Elegant Grid component written in C# for .NET. Your question relates to Prof-UIS written in C++. Here is a sequence of character codes that grows: 0...9...A...Z...a...z
The CExtGridWnd class compares grid cells while sorting using CExtGridCell::Compare() virtual method invocations. All the string cells compare themselves with others using the case sensitive string comparison. If you need the case insensitive comparison, then you should implement and use a custom CExtGridCellString -derived class which should have the Compare() virtual method.
|
|
Burak Petekkaya
|
Apr 16, 2007 - 1:20 AM
|
Hi,
I have an Visual Studio C++ Mfc Project with prof-UIS.
When I run application ,I open a dialog.There is my custom grid in opened dialog.Then I change Theme,but I can’t repaint my custom grid color when page opened.But if I open window again ,I can see changing.Because colors loaded initializing.
I must repaint my custom grid color. How can I understand opened window? How can I do? Please help me!
|
|
Technical Support
|
Apr 16, 2007 - 11:29 AM
|
|
|
Andrew Hafer
|
Feb 8, 2007 - 9:06 PM
|
Does elegant grid offer an autocomplete feature? Particularly, can it automatically match the typing into a comboboxcell to the list of values and offer completion suggestions? If not, how can I set the text (and selection) that is being edited so I can implement my own autocomplete?
Thanks.
|
|
Technical Support
|
Feb 9, 2007 - 8:58 AM
|
We have just implemented autocompete as a response to your request. It is available in the updated dll mentioned in the previous post. There are three new members added to ComboBoxCellStyle : AutoCompleteMode , AutoCompleteSource and AutoCompleteCustomSource . They have the same meaning as those in theSystem.Windows.Forms.ComboBox class. Here is the code snippet that illustrates this technique. Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim grdColumn As Column
Dim dr As DataRow
Dim tCell As TextCell
With UnboundGridControl1
.AllowRowSelection = False
grdColumn = New Column
.Columns.Add(grdColumn)
dr = .NewDataRow
tCell = dr.AddNewCell(GetType(ComboBoxCell), .Columns(0))
tCell.DataValue = ""
Dim style As ComboBoxCellStyle
style = tCell.Style
style.AutoCompleteMode = AutoCompleteMode.SuggestAppend
style.AutoCompleteSource = AutoCompleteSource.CustomSource
style.AutoCompleteCustomSource = New AutoCompleteStringCollection()
style.AutoCompleteCustomSource.AddRange(New String() {"One", "Two", "Three"})
.Rows.Add(dr)
End With
End Sub
End Class
|