Subject |
Author |
Date |
|
Alex Pag
|
Jan 18, 2010 - 12:29 PM
|
How i can use per-cell data mapping to display available values in my combo box cell?
|
|
Alex Pag
|
Feb 15, 2010 - 8:04 AM
|
Hi. You can show one sample how i can use per-cell data mapping to display values in combo box cell in unbound grid control?
|
|
Technical Support
|
Feb 18, 2010 - 4:08 AM
|
|
|
Technical Support
|
Jan 20, 2010 - 1:33 PM
|
Unfortunately you cannot define per cell mapping in bound mode. We will consider adding this functionality in later versions.
|
|
Alex Pag
|
Jan 20, 2010 - 5:00 AM
|
IN BOUDGRID ELEMENT I NEED THIS FUNCTIONALITY...
|
|
Alex Pag
|
Jan 20, 2010 - 4:59 AM
|
OK. THANKS. BUT I NEED LOAD IN COMBO BOX FOR EACH ROW DIFFERENT DATA. I SAW HIM IN ’SIMPLE ELEGANT GRID DEMOS’ WHEN I CHOICE ENUMS LINE.
|
|
Technical Support
|
Jan 19, 2010 - 1:20 PM
|
|
|
Alex Pag
|
Jan 14, 2010 - 7:21 AM
|
how i can catch event when i press some key in my edited cell?
|
|
Technical Support
|
Jan 15, 2010 - 8:50 AM
|
At this moment there are no events that would allow you to analyze which key was pressed. As a workaround you can use the Application::AddMessageFilter() method:
http://msdn.microsoft.com/en-us/library/system.windows.forms.application.addmessagefilter.aspx
It allows you to register your message filter interface which pre-translates and filters window messages. WM_KEY*** messages are always sent to the focused window only. Your message filter can determine if the parent window of the focused window is the elegant grid control.
|
|
Alexander Kaay
|
Jan 10, 2010 - 11:52 PM
|
Greetings -
Is there a way to enable multiline text in cells, particularly for the header. I can see how that can be implemented with a custom viewer, but then there the issue with matching to skins, etc., so I am hoping there a built-in method. Under the hood it’s just a flag to string draw function. You have similar functionality in Prof-UIs with __EGCS_EX_WRAP_TEXT attribute... Thanks! -A
|
|
Alexander Kaay
|
Jan 11, 2010 - 2:26 PM
|
Yes, I have tried both \r\n and \n and it does not seem to work. This particular project is in VB.NET so the following code:
cols(i) = New Elegant.Grid.Column
dvgData.Columns.Add(cols(i))
cols(i).Width = 40
cols(i).HeaderText = "123" & vbLf & "456" makes 456 disappear, but does not make it multiline nonetheless. Furthermore, it would be my preference to have automatic word wrapping rather than having to specify explicit line breaks, especially given the fact that Graphics.DrawString method can draw wrapped text into a rectangle when StringFormat.FormatFlags.NoWrap is not set. I am presuming that the grid uses that method to draw text at some point or another... Any other suggestions? -A
|
|
Technical Support
|
Jan 12, 2010 - 8:00 AM
|
You should increase the header’s height. 456 is not visible partially because the text is wrapped by the text area rather than not by the header cell area. The text area is smaller than header cell area.Here is how to set a 90 pixel height for header row at top:
aGridControl.RowHeaderColumn.CellStyles[typeof(Elegant.Grid.ColumnHeaderRowHeaderCellStyle)].MinimalHeight = 90;
Here is how to set a 90 pixel height for outer row header cells on left and, as a result make each grid row having at least a 90 pixels height: aGridControl.RowHeaderColumn.CellStyles[typeof(Elegant.Grid.RowHeaderCellStyle)].MinimalHeight = 90;
Text wrapping is not supported at the moment, we plan to implement it in future releases.
|
|
Technical Support
|
Jan 11, 2010 - 6:53 AM
|
Did you try "\n" to make the text multiline?
aGridControl.Columns[0].HeaderText = "123\n456";
|
|
Alexander Kaay
|
Jan 1, 2010 - 9:25 PM
|
Hi - I am probably missing something obvious, but I am unable to get to the Cell instances [that are inside the grid]. I am using the control in unbound mode for performance reasons. Neither row nor column classes have anything like .Cells property. There are CellStyles and everything else imaginable, but no cells. There is no Cell constructor that will take row and column that I can find.... How do I get a cell reference in a populated unbound grid so that I can modify its contents? Thank you. -A
|
|
Alexander Kaay
|
Jan 5, 2010 - 10:44 PM
|
Thank you - I was missing the difference between Row and Datarow. Everything is working properly now.
|
|
Technical Support
|
Jan 4, 2010 - 9:07 AM
|
You can learn how to work with a grid in unbound mode from this article:
Unbound Grid
There is a Simple Demos sample that comes with Elegant Grid, which can be helpful. It contains a number of grids including those in unbound mode (e.g. Click Counter).
Here is an example of how you can get the value of a cell at position [0,0]:
// Get row 0
DataRow dataRow = ClickCountGridControl.Rows[0] as DataRow;
// Get text cell at [0,0]
TextCell textCell = dataRow.Cells[ ClickCountGridControl.Columns[0] ] as TextCell;
MessageBox.Show( textCell.DisplayValue.ToString() );
|
|
Fernand Theisen
|
Dec 28, 2009 - 7:17 AM
|
How to create a custom cell editor based on a nullabledatetimepicker with weeknumbers indication
|
|
Technical Support
|
Dec 28, 2009 - 1:05 PM
|
What do you mean by "nullabledatetimepicker"? Which version of grid are you using?
|
|
Alex Pag
|
Dec 22, 2009 - 11:58 PM
|
that I can cancel the selection all characters the moment where I enter in the cell for editing? if i write this code mygrid.FocusedCell.StartEdit(); then automatically are selected all words<qtlend></qtlend>. Τhat i cancel selection? <qtlbar style="padding: 0pt; display: inline; text-align: left; line-height: 100%; background-color: rgb(236, 236, 236); -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -moz-border-radius-bottomright: 3px; -moz-border-radius-bottomleft: 3px; cursor: pointer; z-index: 999; left: 486px; top: 57px; opacity: 0.9;" dir="ltr" id="qtlbar">![Copy selction](http://www.qtl.co.il/img/copy.png) ![](http://www.google.com/favicon.ico) <iframe style="border: 1px solid rgb(236, 236, 236); display: none; background-color: white;" src="" id="qtlframe"></iframe></qtlbar>
|
|
Alex Pag
|
Dec 24, 2009 - 5:43 AM
|
i can do it programmatically?
|
|
Technical Support
|
Dec 24, 2009 - 7:48 AM
|
Unfortunately you cannot do this at the moment, because there is no public access to the editor. The next version will fix this.
|
|
Alex Pag
|
Dec 24, 2009 - 5:42 AM
|
|
|
Technical Support
|
Dec 24, 2009 - 5:35 AM
|
Do you mean reseting the text selection inside the editor at the moment you start editing?
|
|
Alex Pag
|
Dec 1, 2009 - 3:10 AM
|
How i can select cell programmatically or set focused row or cell programmatically?
|
|
Technical Support
|
Dec 1, 2009 - 9:09 AM
|
You can use the grid’s FocusedCell property. You can also use the FocusedCellColumn property together with the FocusedRowIndex property.
|
|
Alex Pag
|
Nov 30, 2009 - 8:54 AM
|
i can embed some icon in my column header in ribbon grid?
|
|
Alex Pag
|
Dec 24, 2009 - 5:45 AM
|
i want only have an icon with text in column header
|
|
Technical Support
|
Dec 24, 2009 - 7:48 AM
|
We prepared and emailed you a sample illustrating what you want to achieve. If you have any questions with this, just let us know.
|
|
Technical Support
|
Dec 24, 2009 - 5:36 AM
|
Could you clarify whether you want to draw just an icon or you want to have an icon with text?
|
|
Alex Pag
|
Nov 27, 2009 - 4:55 AM
|
that I can disable focus cell when I am in the last one in the first column grid,
that I can not change the line when I step arrows when I am in the last one in the first column grid.
|
|
Alex Pag
|
Nov 30, 2009 - 12:32 AM
|
i set for my ribbon grid:
1 - AllowRowSelection = true
2 - FullRowSelect = false
3 - ShowFocusRectangle = true i need when I press the arrow buttons left, right move the focused cell (focused rectangle) in line and is not changed the line until that I would press the arrow buttons up or down. as it is now when focused cell is the first column or last column with press arrow buttons left or right changes automatically the line...
|
|
Technical Support
|
Nov 27, 2009 - 10:32 AM
|
Sorry, we don’t completely understand what you want to convey. Could you let us know what you actually mean?
|
|
Alex Pag
|
Nov 23, 2009 - 4:08 AM
|
How i can catch event mouse double click when i edit some cell?
|
|
Technical Support
|
Dec 24, 2009 - 5:36 AM
|
Currently you cannot handle events from a cell editor. We will add this opportunity in the next release.
|
|
Alex Pag
|
Nov 24, 2009 - 2:26 AM
|
i need open some form after mouse double click in cell when i edit this cell. (like MS outlook -> contacts)
|
|
Technical Support
|
Nov 23, 2009 - 10:25 AM
|
It is impossible to do generally for all types of the editor. What exactly would you like to achieve?
|
|
Alex Pag
|
Nov 23, 2009 - 4:04 AM
|
I change backgroud color for some rows like this... private void lvwContacts_ModifyCellStyle(object sender, ModifyCellStyleEventArgs e)
{
if (e.Cell.Row != null)
{
if (e.Cell.Row.Index % 2 == 0)
{
e.Style.BackgroundColor = Color.Red;
}
else
{
e.Style.BackgroundColor = Color.White;
}
}
} How i can disable change backgroud color for current cell when i move mouse in my grid or how i can change default color when i move mouse?
|
|
Alex Pag
|
Nov 30, 2009 - 12:59 AM
|
I have table with lines with different colors. when I move the mouse I want it does not change the cell color that you find the mouse. Who event i can use to I make him. MouseMove event already has changed the color background.
|
|
Alex Pag
|
Nov 25, 2009 - 1:06 AM
|
how I occupy in who cell it is cursor when i move the mouse
|
|
Technical Support
|
Nov 25, 2009 - 5:56 AM
|
You should use the grid’s method GetRenderableFromPoint() . This method returns an object of the Renderable type which you should check whether it is a cell or not.
|
|
Technical Support
|
Nov 23, 2009 - 10:16 AM
|
You can use the CellStyle.HoveredBackgroundColor property in the same way as you use the BackgroundColor property.
|
|
Alex Pag
|
Nov 17, 2009 - 2:02 AM
|
I have a last column as calendar in my grid. The VerticalBar it is painted on him and does not appear button I open calendar.what I make in order to it is presented doubly his? The columns property "ColumnsAutoSizeMode" i set "Fill". BoundGrid.ColumnsAutoSizeMode = ColumnAutoSizeMode.Fill;
|
|
Alex Pag
|
Nov 17, 2009 - 7:20 AM
|
|
|
Technical Support
|
Nov 17, 2009 - 6:40 AM
|
We are sorry but it is not completely clear what the problem is. Could you send us a test project illustrating the issue?
|
|
Alex Pag
|
Nov 13, 2009 - 7:07 AM
|
Hi. I need show and hide some columns when programm run. This is my code... Mobile and Store is at Columns. Mobile.Visible = true;
Store.Visible = false; But my grid repaint very slowly. What can i do for show and hide quickly?
|
|
Alex Pag
|
Nov 17, 2009 - 1:49 AM
|
i find what happend... this is my column Mobile.CellStyles.AddRange(new Elegant.Ui.Grid.CellStyle[] { txtCellStyleNotEdit });
Mobile.DataPropertyName = "Mobile";
Mobile.HeaderText = " Mobile "; boundGridControl1.DataSource = myTable; if "Mobile" column name it does not exist in myTable then the grid does not function fast when i want show or hide this column. I have resolved the problem.
|
|
Technical Support
|
Nov 16, 2009 - 1:12 PM
|
Try to enclose your code into the BeginInit() and EndInit() methods like as follows: boundGridControl1.BeginInit();
Mobile.Visible = false;
Store.Visible = false;
boundGridControl1.EndInit();
|
|
Alex Pag
|
Nov 11, 2009 - 1:55 AM
|
Hi. You can show me one sample how i can set and load one column(cell) in BoundGridControl as combobox element.
|
|
Alex Pag
|
Nov 13, 2009 - 12:35 AM
|
Hi. Thanks for sample...I found problem.... if i add columns in InitializeComponent() procedure then combo box cells load data , but if i try add columns some other procedure or function then combo box cells not load data... DataTable Group = new DataTable(); Group= DataBaseServer.GetTable("tblGroup"); this.lvwContacts.Columns.AddRange(new Elegant.Ui.Grid.Column[] { Group});
|
|
Technical Support
|
Nov 16, 2009 - 1:12 PM
|
Thank you. We will look into this problem and fix it in the next version.
|
|
Alex Pag
|
Nov 12, 2009 - 12:06 AM
|
DataTable Stores = new DataTable(); the grid control not show me in column ’Store’ all stores if i press button for drop down list. Show me only one store name from ’myCustomersTable’ table... What can i do ?
|
|
Technical Support
|
Nov 12, 2009 - 7:13 AM
|
We prepared a sample project that illustrates the usage of combo-box cells. Please download it from this website. Here is the correct link.
GridComboBoxCellTest
|
|
Alex Pag
|
Nov 11, 2009 - 11:58 PM
|
Hi. i show you my code... 1 - this is my column Stores = DataBaseServer.GetTable("tblStores", "StoreName", "", ""); Store.CellStyles.AddRange(new Elegant.Ui.Grid.CellStyle[] { comboboxCellStyle });
Store.DataPropertyName = "StoreName";
Store.FillWeight = 100.8155F;
Store.HeaderText = "Store";
Store.MappingDataSource = myStores;
Store.MappingDisplayDataMember = "StoreName";
Store.MappingValueDataMember = "StoreID";
Store.CellType = typeof(ComboBoxCell); 2 - this is my grid control lvwContacts.Columns.AddRange(new Elegant.Ui.Grid.Column[] {
Store}); 3 - DataTable myCustomersTable = new DataTable() myCustomersTable = DataBaseServer.GetTable("Customers");
lvwContacts.DataSource = myCustomersTable;
|
|
Technical Support
|
Nov 11, 2009 - 8:05 PM
|
To make all the cells in the specified column of a combo-box type set a Column.CellType property like as follows:
column1.CellType = typeof(ComboBoxCell);
|
|
Francois Bronsard
|
Oct 27, 2009 - 9:02 PM
|
Hi, I would like to display some custom text as a tooltip when the user hover over some special cells in a BoundGridControl. Is that possible? Francois
|
|
Technical Support
|
Oct 28, 2009 - 9:27 AM
|
Currently you cannot change the content of the tool-tip above a cell because it is intended only to show the cell’s textual data that cannot fit the cell rectangle. But you can easily show a custom tooltip manually by using System.Windows.Forms.Tooltip.Show method. If you experience any problems with this, just let us know.
|
|
Francois Bronsard
|
Oct 23, 2009 - 11:14 AM
|
Hello,
I’m using the BoundGridControl. I noticed something strange. If I have a row in a group with the focus, that is, the row is highlighted. Now, if I close the group (by clicking on the "-" button in the header row), then the focus will move to whatever row will physically appear where the old row was.
For example, if I have
- Group 1 Line 1 Line 2 - Group 2 Row 3 Row 4
and the focus is on "Line 2". If I close the Group 1, so I have
+ Group 1 - Group 2 Row 3 Row 4
Then suddenly, the focus will be on Row 3!
Similarly, if the focus was initially on Line 1, then it is the row "Group 2" which now has the focus and is highlighted (And this makes it unreadable btw). Any suggestion?
|
|
Technical Support
|
Oct 28, 2009 - 9:42 AM
|
Yes, we confirm that it would be better to move selection onto the category of the previously selected item rather than onto some next row. Thank you for this feedback. We are preparing a new release of Elegant Grid (which is coming soon) so this will be fixed in it.
|
|
Pavel Murashov
|
Oct 15, 2009 - 6:56 AM
|
I’m installed trial ElegantGrid on a machine running Windows Vista Business and Visual Studio 2008 Professional. But grid elements (NavigationGridControl for example) isn’t visible on Toolbox panel in Visual Studio...
|
|
Technical Support
|
Oct 16, 2009 - 7:57 AM
|
Actually we don’t have a NavigationGridControl in the distribution package. The only components that should appear in the toolbox are BoundGridControl, UnboundGridControls and VirtualGridControl.
|
|
Francois Bronsard
|
Oct 11, 2009 - 7:16 PM
|
Hello, I would like to use a custom sorting algorithm for the data in some columns but for the other columns I want to rely on the default sorting algorithm. How can I do that? Using the "CompareRows" property I can attach a custom comparison operator but then I can’t find how to revert to the default comparison method if the current sort rule doesn’t include the columns for which I want to use my custom comparison. Thanks in advance, Francois
|
|
Francois Bronsard
|
Oct 16, 2009 - 8:32 AM
|
Let me give a more detailed example then.
Suppose I have a grid, call it grid1, with 3 colums: Name, Phone, Address. If I sort the grid using the address column, I can to use a custom comparison, say conmpare_addresses, (for example, to handle zip code in a special way), but for the other columns, I want to use the default comparison operation. How do I do that? I can see how to invoke my comparison operator:
... grid1.CompareRows += new Elegant.Grid.CompareObjectsEventHandler(my_CompareRows); ...
public void my_CompareRows(object sender, Elegant.Grid.CompareObjectsEventArgs e) { System.Data.DataRowView X1 = (System.Data.DataRowView)e.X; System.Data.DataRowView Y1 = (System.Data.DataRowView)e.Y;
if (grid1.SortRules[0].Column.DataPropertyName == "address") { e.result = compare_addresses(X1.Row["address"], Y1.Row["address"]); } else { // Invoke the default comparison operation ???? <<<<<<<< How to do this? }
Thanks in advance, Francois
|
|
Technical Support
|
Oct 16, 2009 - 7:58 AM
|
Could you provide more details on the problem or even send us a sample project so we can change the code to make the sample work as it should?
|
|
Tom Brophy
|
Sep 30, 2009 - 11:22 AM
|
I need to filter a bound data grid and everything that I have tried is not working. I have a form with a bound data grid connected to a dataset and one of the tables. Also on the form are some drop down controls for the user to select the field to filter, the operation (=) and a place for the text box. So the filter statement might be something like: State=’TX’. However, everything from this point forward isn’t setting or applying the filter correctly. Can someone help please? Thanks, Tom
|
|
Technical Support
|
Oct 1, 2009 - 6:26 AM
|
We cannot see your code but if you want your grid to display data from a database table, you can pull the filtered data from the table and call the grid’s DataBind() each time the filter changes.
|
|
Francois Bronsard
|
Sep 18, 2009 - 10:20 AM
|
Hi, When grouping rows, I would like to add to the HeaderCell an indication of the number of rows in that group. Is that possible for bound or unbound grids and how? What I would like to have is something like: Name | Address | tel - John (3) John | 1 road | 555 John | 2 road | 666 John | 3 road | 777 - Tom (1) Tom | 1 str | 888 My question is how to add the "(3)" and "(1)" in the header cell. Francois Bronsard
|
|
Technical Support
|
Oct 19, 2009 - 8:24 AM
|
We are sorry but you cannot obtain this count right now not using internal properties, i.e. reflection. We’ll fix this issue in the next release which we plan for November.
As a workaround, you can use the following code: int itemsCount = 0;
GroupRow gr = cell.Row as GroupRow;
if (gr != null)
{
PropertyInfo pi = gr.GetType().GetProperty(
"MarkupTreeNode",
BindingFlags.GetProperty | BindingFlags.NonPublic | BindingFlags.Instance);
SortGroupMarkupTreeNode node = pi.GetValue(cell.Row, null) as SortGroupMarkupTreeNode;
if(node != null)
itemsCount = node.DataItemCount;
}
|
|
Technical Support
|
Oct 16, 2009 - 7:56 AM
|
In order to display a custom content in the group row, you should implement a custom content viewer. Add a class to your project like as follows: public class GroupRowViewer : ICellContentViewer
{
#region ICellContentViewer Members
public System.Drawing.Size Measure(Cell cell, System.Drawing.Graphics g)
{
return Size.Empty;
}
public void Paint(Cell cell, System.Drawing.Graphics g)
{
using (StringFormat sf = new StringFormat())
{
sf.LineAlignment = StringAlignment.Center;
sf.Alignment = StringAlignment.Center;
g.DrawString("This is custom text for group cell \"" + cell.DisplayValue + "\"",
cell.GridControl.Font, SystemBrushes.ControlText, cell.ContentRectangle);
}
}
#endregion
} Then add the following line after InitializeComponent() method : boundGridControl1.CellStyles[typeof(GroupRowCellStyle)].CustomContentViewerType = typeof(GroupRowViewer);
|
|
Francois Bronsard
|
Oct 16, 2009 - 2:40 PM
|
Very good! Thanks.
I have one more question though: How can I get the count of children rows? The data members "Rows" and "Children" associated with the group row are both null. If I use the debugger, I can see that there seem to be some internal private data member with the information I need (specifically, I can see that cell.Row.DataProvider.DataItemCount does countain the info I want but I don’t seem to be allowed to access that member.
Is there any other way to get that information, short of accessing the datatable and recalculating how many row match the display value of the cell?
Thanks
|
|
Francois Bronsard
|
Oct 12, 2009 - 7:11 AM
|
Thanks but this is not quite what I meant: I want to change the text of the "row header" not the column header. More precisely, suppose I have the table: Name | Address | tel John | 1 road | 555
John | 2 road | 666
John | 3 road | 777
Tom | 1 str | 888 and I group the table using the Name column. So I end up with: Address | tel
- John
1 road | 555
2 road | 666
3 road | 777
- Tom
1 str | 888 My question is: how could I change the text in the rowheaders "John" and "Tom" to indicate the number of children. That is, I would like to have: Address | tel
- John (3)
1 road | 555
2 road | 666
3 road | 777
- Tom (1)
1 str | 888 Is it possible? If it is only possible with an unbound grid, is there a simple way to populate an unboundgridcontrol with a datatable?
|
|
Technical Support
|
Oct 1, 2009 - 6:27 AM
|
You can use the Column.HeaderText property to control the text displayed in the header cell.
|