Subject |
Author |
Date |
|
Andrew Hafer
|
Feb 8, 2007 - 8:34 PM
|
Hello.
I created a form with a single control - the Elegant Grid - and set up the grid in the Form_Load event handler as shown below. When I run the program and follow the following steps:
1. Click in the first cell to activate it. 2. Press right arrow key.
the grid then gives an out-of-bounds error. This does not happen when AllowRowSelection is set to True.
Please advise.
Thanks!
Andrew
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 grd .AllowRowSelection = False
grdColumn = New Column .Columns.Add(grdColumn)
dr = .NewDataRow tCell = dr.AddNewCell(GetType(TextCell), .Columns(0)) tCell.DataValue = "" .Rows.Add(dr)
dr = .NewDataRow tCell = dr.AddNewCell(GetType(TextCell), .Columns(0)) tCell.DataValue = "" .Rows.Add(dr) End With End Sub End Class
|
|
Technical Support
|
Feb 9, 2007 - 8:47 AM
|
Thank you for reporting the bug. We fixed it and you can download the updated dll from our web site.
|
|
Andrew Hafer
|
Feb 3, 2007 - 6:08 PM
|
Right now, the only way I can find for a user to edit a cell is for them to put the focus on that cell (either through moving there with the keyboard or clicking on it) and then clicking on the cell to put it into edit mode. In Excel, if a cell has the focus it automatically enters edit mode when you start typing. Is there any way to reproduce that functionality in Elegant Grid?
Thanks!
|
|
Technical Support
|
Feb 4, 2007 - 10:35 AM
|
We will add built-in support for this feature in the next version. At the moment you can easily achieve the requested behavior by putting the following code into the GridControl.KeyPress event handler: [C#]
private void boundGridControl1_KeyPress( object sender, KeyPressEventArgs e)
{
if(boundGridControl1.FocusedCell != null &&
(char.IsLetter(e.KeyChar) || char .IsNumber(e.KeyChar)))
{
boundGridControl1.EditFocusedCell();
if (boundGridControl1.FocusedCell.Editing)
SendKeys.Send(e.KeyChar.ToString());
}
}
[VB.NET]
Private Sub boundGridControl1_KeyPress( ByVal sender As Object, ByVal e As KeyPressEventArgs)
If Not boundGridControl1.FocusedCell Is Nothing _
AndAlso (Char .IsLetter(e.KeyChar) OrElse Char.IsNumber(e.KeyChar)) Then
boundGridControl1.EditFocusedCell()
If boundGridControl1.FocusedCell.Editing Then
SendKeys.Send(e.KeyChar.ToString())
End If
End If
End Sub
|
|
Andrew Hafer
|
Feb 4, 2007 - 10:26 PM
|
|
|
Andrew Hafer
|
Feb 3, 2007 - 5:36 PM
|
Hello.
I need to create a date cell that can also be blank in cases where the date isn’t known. Can I accomplish this with the DateTime cell?
Thanks.
|
|
Paddy
|
Dec 30, 2010 - 7:48 PM
|
When I try to use this code in my application, I am getting an error on line: cellStyle.TextColor = cellStyle.BackgroundColor The error is:
Argument Exception
Color cannot be set to Color [Empty]
|
|
Technical Support
|
Jan 5, 2011 - 9:53 AM
|
Sorry, but we do not fully understand in which context your code is used and what are you trying to achieve. Could you send us a more detailed description of the problem?
|
|
Technical Support
|
Feb 5, 2007 - 8:09 AM
|
The DateTime type does not support the "empty" value internally and there is no way to assign it to null except for using nullable types. We can regard your feature as a feature request.
You could however use its Minimum Value property to mark it as being empty.
|
|
Andrew Hafer
|
Feb 5, 2007 - 10:45 PM
|
Thank for your answer. Could you please expand upon both a) assigning it to null using nullable types and b) using Minimum Value
Thanks!
|
|
Technical Support
|
Feb 6, 2007 - 6:49 AM
|
We are sorry for being vague. Here are the details.
a) You cannot use nullable types at the moment because this is not supported in the cell classes. The date/time cell is using the DateTime type, not Nullable<DateTime> . We mentioned this just to show the possible way we are going to resolve this issue.
b) You can just use a small date value (any date that will be used as a stand-in for null) as a replacement for <empty> . You can also adjust the grid so this stand-in value will be hidden in cells (so such a cell will look like a blank cell) and act as being empty until the user changes the value. For example, you could use the following code:
[C#]
private readonly DateTime _EmptyDateTime = new DateTime(1900, 1, 1); // Fill your "empty" data with this value.
private void boundGridControl1_ModifyCellStyle(object sender, ModifyCellStyleEventArgs e)
{
if(e.Cell.Column != MyDateTimeColumn)
return;
// Make "empty" values invisible in cells.
if (e.Cell.DataValue != null && ((DateTime)e.Cell.DataValue) == _EmptyDateTime)
{
DateTimeCellStyle cellStyle = (DateTimeCellStyle)e.Style;
cellStyle.TextColor = cellStyle.BackgroundColor;
cellStyle.SelectedTextColor = cellStyle.SelectedBackgroundColor;
cellStyle.HoveredTextColor = cellStyle.HoveredBackgroundColor;
cellStyle.SelectedHoveredTextColor = cellStyle.SelectedHoveredBackgroundColor;
}
}
[VB.NET]
Private ReadOnly _EmptyDateTime As DateTime = New DateTime(1900, 1, 1) ’ Fill your "empty" data with this value.
Private Sub boundGridControl1_ModifyCellStyle(ByVal sender As Object, ByVal e As ModifyCellStyleEventArgs)
If e.Cell.Column <> MyDateTimeColumn Then
Return
End If
’ Make "empty" values invisible in cells.
If Not e.Cell.DataValue Is Nothing AndAlso (CDate(e.Cell.DataValue)) = _EmptyDateTime Then
Dim cellStyle As DateTimeCellStyle = CType(e.Style, DateTimeCellStyle)
cellStyle.TextColor = cellStyle.BackgroundColor
cellStyle.SelectedTextColor = cellStyle.SelectedBackgroundColor
cellStyle.HoveredTextColor = cellStyle.HoveredBackgroundColor
cellStyle.SelectedHoveredTextColor = cellStyle.SelectedHoveredBackgroundColor
End If
End Sub
|
|
Omar Shraim
|
Dec 27, 2006 - 12:04 AM
|
I am considering Elegant Grid for my .NET development but the grid seems to be lacking Right-To-Left support necessary for languages like Arabic and Hebrew. 1- Are there any plans to add such support? 2- Do you supply samples in VB.NET?
Thank you
|
|
anwar basha
|
Dec 9, 2006 - 12:33 AM
|
hello,
can you please tell me how can i add a row, and delete a row from the databound datagrid.
regards anwar
|
|
Technical Support
|
Dec 9, 2006 - 10:19 AM
|
You can add/remove a row from the data bound grid by adding/removing the corresponding data object from your data source list. This mechanism works only if you are using an ADO.NET container as the data source or if your custom data source collection implements the standard IBindingList interface.
|
|
anwar basha
|
Dec 9, 2006 - 12:01 AM
|
hello i downloaded elegant grid, and put a databoundgrid control on my form, now i have the data as an object collection. i set the boundgridcontrol.datasource = mycollection
but there is no data displayed in the grid.
can you please advise.
regards Anwar
|
|
Technical Support
|
Dec 9, 2006 - 10:17 AM
|
|
|
Oleg Shomonko
|
Nov 16, 2006 - 10:35 AM
|
Is it possibly to show rtf or html text inside a cell?
|
|
Technical Support
|
Nov 17, 2006 - 7:51 AM
|
The RTF cell is not yet supported but it is scheduled for the next release. So stay tuned.
|
|
Dennis Mwape
|
Oct 11, 2006 - 7:36 AM
|
Thanx for the help on using the comboboxcell I have managed to find ways on how to use an it is working perfectly for me.I seem to have another hitch.One of the column in the unbound grid is a date time data type I want it assistant on how to use this cell in the unbound grid.
|
|
Technical Support
|
Oct 12, 2006 - 6:11 AM
|
Using DateTime cells in the unbound grid is pretty easy and similar to using other cell types. Just do like this: Dim dataRow As DataRow = UnboundGridControl1.NewDataRow()
UnboundGridControl1.Rows.Add(dataRow)
Dim dateTimeCell As DateTimeCell = CType(dataRow.AddNewCell(GetType(DateTimeCell), DateTimeColumn1), DateTimeCell)
dateTimeCell.DataValue = DateTime.Now
|
|
Dennis Mwape
|
Oct 11, 2006 - 3:32 AM
|
Thanks for your quick response.However i tried your suggestion concerning cell editing and combobox binding however it does not seem to work.Here is the code snippet of the object I am trying to bind to the elegant grid and the code I have also included code in the form_load event Please assist
Imports System.Threading <Serializable()> _ Public Class Tax Inherits BusinessBase Private mPDCode As String = " " Private mName As String = " " Private mDebitAccountCode As String = " " Private mCreditAccountCode As String = " " Private mType As String = " " Private mTaxBands As TaxBands = _ TaxBands.NewTaxBands #Region " Utility Lists " Private Shared mAccountCodes As AccountCodeList
Shared Sub New() mAccountCodes = AccountCodeList.GetList End Sub
Public Shared ReadOnly Property AccountCodes() As AccountCodeList Get Return mAccountCodes End Get End Property #End Region
#Region " Business Properties and Methods " Public ReadOnly Property PDCode() As String Get Return mPDCode End Get End Property Public Property Name() As String Get Return mName End Get Set(ByVal Value As String) If mName <> Value Then If Not Thread.CurrentPrincipal.IsInRole("Administrator") Then Throw New System.Security.SecurityException( _ "User not allowed to change/add payment and deduction codes") Else mName = Value MarkDirty() End If End If
End Set End Property Public Property DebitAccountCode() As String Get Return AccountCodes.Item(mDebitAccountCode) End Get Set(ByVal Value As String) If DebitAccountCode <> Value Then If Not Thread.CurrentPrincipal.IsInRole("Administrator") Then Throw New System.Security.SecurityException( _ "User not allowed to change/add payment and deduction codes") Else mDebitAccountCode = AccountCodes.Key(Value) MarkDirty() End If End If
End Set End Property Public Property CreditAccountCode() As String Get Return AccountCodes.Item(mCreditAccountCode) End Get Set(ByVal Value As String) If CreditAccountCode <> Value Then If Not Thread.CurrentPrincipal.IsInRole("Administrator") Then Throw New System.Security.SecurityException( _ "User not allowed to change/add payment and deduction codes") Else mCreditAccountCode = AccountCodes.Key(Value) MarkDirty() End If End If
End Set End Property Public ReadOnly Property Type() As String Get Return mType End Get End Property
Public ReadOnly Property TaxBands() As TaxBands Get Return mTaxBands End Get End Property Public Overrides ReadOnly Property IsValid() As Boolean Get Return MyBase.IsValid AndAlso mTaxBands.IsValid
End Get End Property Public Overrides ReadOnly Property IsDirty() As Boolean Get Return MyBase.IsDirty OrElse mTaxBands.IsDirty
End Get End Property #End Region
#Region "Shared functions " Public Shared Function GetTax() As Tax If Not Thread.CurrentPrincipal.IsInRole("Administrator") Then Throw New System.Security.SecurityException( _ "User not allowed to update tax tables") Else Return CType(DataPortal.Fetch(New Criteria), Tax) End If End Function #End Region
#Region " Constructors " Private Sub New()
End Sub #End Region
#Region "Criteria " <Serializable()> _ Public Class Criteria
End Class #End Region
#Region " Data Access " Protected Overrides Sub Dataportal_Fetch(ByVal Criteria As Object) Dim cn As New SqlConnection(DB("NuDB")) Dim cm As New SqlCommand
cn.Open()
Try With cm .Connection = cn .CommandType = CommandType.StoredProcedure .CommandText = "getTax"
Dim dr As New SafedataReader(.ExecuteReader) Try dr.Read() With dr mPDCode = .GetString(0) mName = .GetString(1) mDebitAccountCode = .GetString(2) mCreditAccountCode = .GetString(3) mType = .GetString(4)
.NextResult() mTaxBands = TaxBands.GetTaxBands(dr) End With Finally dr.Close() End Try End With MarkOld() Finally cn.Close() End Try End Sub Protected Overrides Sub Dataportal_Update() Dim cn As New SqlConnection(DB("NuDB")) Dim cm As New SqlCommand
cn.Open()
Try With cm .Connection = cn .CommandType = CommandType.StoredProcedure .CommandText = "updateTax" .Parameters.Add("@PDCode", mPDCode) .Parameters.Add("@Name", mName) .Parameters.Add("@DAcc", mDebitAccountCode) .Parameters.Add("@CAcc", mCreditAccountCode)
.ExecuteNonQuery() markold()
End With
Finally cn.Close() End Try mTaxBands.Update(Me) End Sub
#End Region
End Class
Imports System.Data.SqlClient <Serializable()> _ Public Class TaxBands Inherits BusinessCollectionBase Protected Shadows allownew As Boolean = True Protected Shadows AllowEdit As Boolean = True Protected Shadows AllowRemove As Boolean = True
#Region " Business properties and methods "
Default Public ReadOnly Property Item(ByVal ID As Integer) As TaxBand Get Dim Child As TaxBand For Each Child In list If Child.ID = ID Then Return Child End If Next Return Nothing End Get End Property Public Sub Remove(ByVal TaxBand As TaxBand) list.Remove(TaxBand) End Sub Public Sub Remove(ByVal ID As Integer) Dim T As TaxBand For Each T In list If T.ID = ID Then Remove(T) Exit For End If Next End Sub Private Sub AddTaxBand(ByVal TaxBand As TaxBand) If Not Contains(TaxBand) Then list.Add(TaxBand) Else Throw New Exception("This tax band has already been exists") End If End Sub ’ Public Sub NewTaxBand(ByVal LowerBand As Double, ByVal HigherBand As Double, ByVal TaxRate As Double) ’ AddTaxBand(TaxBand.NewTaxBand(LowerBand, HigherBand, TaxRate)) ’End Sub Public Sub NewTaxBand(ByVal TaxBand As TaxBand) AddTaxBand(TaxBand) End Sub Protected Overrides Function OnAddNew() As Object Return TaxBand.NewTaxBand End Function
#End Region
#Region " Contains "
Public Overloads Function Contains(ByVal Item As TaxBand) As Boolean
Dim Child As TaxBand
For Each Child In List If Child.Equals(Item) Then Return True End If Next Return False End Function
#End Region
#Region " Shared factory Methods "
Friend Shared Function NewTaxBands() As TaxBands
Return New TaxBands
End Function
Friend Shared Function GetTaxBands(ByVal dr As SafedataReader) As TaxBands
Dim col As New TaxBands col.fetch(dr) Return col
End Function #End Region
#Region " Constructors "
Private Sub New() MarkAsChild() End Sub
#End Region
#Region " Data Access "
Private Sub fetch(ByVal dr As SafedataReader) While dr.Read() List.Add(TaxBand.GetTaxBand(dr)) End While End Sub Friend Sub Update(ByVal Parent As Tax) Dim Child As TaxBand For Each Child In deletedlist Child.Update(Parent) Next deletedlist.Clear() For Each Child In list Child.Update(Parent) Next
End Sub
#End Region
End Class
Imports System.Data.SqlClient Imports System.Threading <Serializable()> _ Public Class TaxBand Inherits BusinessBase Private mID As Integer = 0 Private mLowerBand As Double = 0 Private mHigherBand As Double = 0 Private mTaxRate As Double = 0 Private mIsTrue As Boolean = True
#Region "Business properties and methods " Public ReadOnly Property ID() As Integer Get Return mID End Get End Property Public Property LowerBand() As String Get Return Format(mLowerBand, "#,##0.00") End Get Set(ByVal Value As String) If mLowerBand <> CDbl(Value) Then ’ If Not Thread.CurrentPrincipal.IsInRole("Administrator") Then ’ Throw New System.Security.SecurityException( _ ’ "User not allowed to update/add tax bands") Else mLowerBand = CDbl(Value) markdirty() End If ’ End If End Set End Property Public Property HigherBand() As String Get Return Format(mHigherBand, "#,##0.00") End Get Set(ByVal Value As String) If mHigherBand <> CDbl(Value) Then ’ If Not Thread.CurrentPrincipal.IsInRole("Administrator") Then ’ Throw New System.Security.SecurityException( _ ’ "User not allowed to update/add tax bands") Else mHigherBand = CDbl(Value) markdirty() End If ’ End If End Set End Property Public Property TaxRate() As String Get Return Format(mTaxRate, "0.00") End Get Set(ByVal Value As String) If mTaxRate <> CDbl(Value) Then ’ If Not Thread.CurrentPrincipal.IsInRole("Administrator") Then ’Thr’ow New System.Security.SecurityException( _ ’ "User not allowed to update/add tax bands") Else mTaxRate = CDbl(Value) markdirty() End If ’End If End Set End Property Public ReadOnly Property IsTrue() As Boolean Get Return mIsTrue End Get End Property #End Region
#Region " System.Object Overrides"
Public Overrides Function ToString() As String Return mID.ToString End Function
Public Overloads Function Equals(ByVal Item As TaxBand) As Boolean Return mID.Equals(Item.ID) End Function
Public Overloads Function GetHasCode() As Integer Return mID.GetHashCode End Function
#End Region
#Region " Shared Methods " ’ Friend Shared Function NewTaxBand(ByVal LowerBand As Double, _ ’ ByVal HigherBand As Double, _ ’ ByVal TaxRate As Double) As TaxBand ’ Return New TaxBand(LowerBand, HigherBand, TaxRate) ’ End Function
Friend Shared Function NewTaxBand() As TaxBand Return New TaxBand End Function Friend Shared Function GetTaxBand( _ ByVal dr As SafedataReader) As TaxBand Dim Obj As New TaxBand Obj.fetch(dr) Return Obj End Function #End Region
#Region " Constructors "
Private Sub New() MarkAsChild() End Sub Private Sub New(ByVal LowerBand As Double, _ ByVal HigherBand As Double, _ ByVal TaxRate As Double) mLowerBand = LowerBand mHigherBand = HigherBand mTaxRate = TaxRate End Sub
#End Region
#Region " Data Access "
Private Sub fetch(ByVal dr As SafedataReader) With dr mID = .GetInt32(0) mLowerBand = .GetDecimal(1) mHigherBand = .GetDecimal(2) mTaxRate = .GetDouble(3) End With MarkOld() End Sub Friend Sub Update(ByVal Parent As Tax)
Dim cn As New SqlConnection(DB("NuDB")) Dim cm As New SqlCommand
cn.Open()
Try With cm .Connection = cn .CommandType = CommandType.StoredProcedure If Me.IsDeleted Then If Not Me.IsNew Then .CommandText = "deleteTaxBand" .Parameters.Add("@ID", mID)
.ExecuteNonQuery() End If MarkNew() Else If Me.IsNew Then .CommandText = "addTaxTable" .Parameters.Add("@LBand", mLowerBand) .Parameters.Add("@HBand", mHigherBand) .Parameters.Add("@TaxRate", mTaxRate)
.ExecuteNonQuery() markold()
Else .CommandText = "updateTaxBand" .Parameters.Add("@ID", mID) .Parameters.Add("@LBand", mLowerBand) .Parameters.Add("@HBand", mHigherBand) .Parameters.Add("@TaxRate", mTaxRate)
.ExecuteNonQuery() markold()
End If
End If
End With
Finally cn.Close() End Try
End Sub #End Region
End Class
Private Sub frmLab12_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load mTax = Tax.GetTax Dim mLoans As LoanCategories = _ LoanCategories.GetLoanCategories
With UGrid Dim C As New Column C.HeaderText = "Lower Band" Dim C1 As New Column C1.HeaderText = "Higher Band" Dim C2 As New Column C2.HeaderText = "Tax rate" .Columns.AddRange(New Column() { _ C, C1, C2}) UGrid.Columns(0).CellType = GetType(TextCell) UGrid.Columns(1).CellType = GetType(ComboBoxCell) UGrid.Columns(2).CellType = GetType(CheckBoxCell) .Columns.Item(0).DataPropertyName = "LowerBand" .Columns.Item(1).MappingDataSource = mLoans .Columns.Item(1).MappingDisplayDataMember = "LoanName" .Columns.Item(1).MappingValueDataMember = "ID" .Columns.Item(2).DataPropertyName = "IsTrue" .DataSource = mTax.TaxBands .FocusedCellColumn = .Columns.Item(0) .EnsureVisibleVertically(.FocusedRowIndex) .FocusedCell.StartEdit()
End With
End Sub
|
|
Technical Support
|
Oct 12, 2006 - 6:09 AM
|
You did not say what actually does not work. Please provide more details about the exception or error. We can only guess that you cannot start cell editing because you may have missed one line in the form_load routine. .DataSource = mTax.TaxBands
’insert this line to set focus on desired row
.FocusedDataSourceItem = mTax.TaxBands(0);
.FocusedCellColumn = .Columns.Item(0)
.EnsureVisibleVertically(.FocusedRowIndex)
.FocusedCell.StartEdit() If this doesn’t help, please let us know more about the problem.
|
|
Dennis Mwape
|
Oct 11, 2006 - 1:10 AM
|
What I meant by child objects,is that I am using the Rockford Lhotka CSLA .NET framework I am sure you have heard of it.I have a class called Tax object this contains a child collection object called tax bands which in turn contains tax bands.I have managed to bind these child object (Tax band) to the elegant grid.My concern is that I would want to be able to edit these objects in the grid when say the lower tax band,higher tax band or the the tax rate changes,there instances where a new tax band is removed i would like to be able to delete that tax band or if the new tax band is added i want to be able to add to the the elegant grid.I am serious considering to procure the grid,please assist me.
|
|
Technical Support
|
Oct 12, 2006 - 6:02 AM
|
If you want to display a list of objects in the grid, just bind the grid to the list and that’s it. If you want the business object to be added to the grid, just add a new object to the bound list. If the list supports changes feedback (as ADO.NET containers do), the corresponding grid row will be added to the grid automatically. If you meant something different, or you have other questions, do not hesitate to ask.
|
|
Dennis Mwape
|
Oct 10, 2006 - 7:46 AM
|
I yesterday downloaded the elegant grid,to say the least am actually impressed.I am building a human resource application and on the first use i managed to bind my custom business collection objects to the elegant grid.However i want to enable the edititng of the objects properties in the grid.First i am failing to get the cell object for which you are saying has the startedit method.Please assist me on how to enable editing secondly I would want to add child object on the grid.your grid seems to limit the number of rows to the number of child objects.Third is on the use of the combobox cellstyle.I would want to bind certain data from which the user can select.Are they any ariticles I can access?
|
|
Technical Support
|
Oct 10, 2006 - 10:32 AM
|
Thanks for the kind words.
If using the bound grid control, you should keep in mind that this control is mainly data-driven and cell instances are created only for visible cells. If you want to control cells manually and work with the grid in terms of cells and rows, you should consider using the unbound grid control.
To start editing a cell in the bound grid control, first make it visible in the view: // Set desired data source item
boundGridControl1.FocusedDataSourceItem = dataset11.Table1[3];
// Set desired grid column
boundGridControl1.FocusedCellColumn = Column2Column;
boundGridControl1.EnsureVisibleVertically(boundGridControl1.FocusedRowIndex);
boundGridControl1.FocusedCell.StartEdit(); We are aware that this approach may be a little obscure and that is why the next release (which is scheduled for the middle of September) will introduce a new task-oriented method StartCellEditByDataSourceItem . The question about adding child objects is not completely clear. Would you provide more details? The combo box cell content is controlled by the following proerties: MappingDataSource , MappingValueDataMember and MappingDisplayDataMember . You can set these properties at the column level and at the cell level. Here is a piece of code illustrating this: public class MyClass
{
public string MyProperty
{
get
{
//..
}
}
}
//..
private MyClass[] MyComboChoices;
//..
myComboColumn1.MappingDataSource = MyComboChoices;
myComboColumn1.MappingDisplayDataMember = "MyProperty";
myComboColumn1.MappingValueDataMember = "MyProperty"; In the above code, MyComboChoices is a container with combo box item objects. The two strings are names of display and value property names of objects in this container. If this container is a list of strings, integers or other simple types, you can use the special [-1] value for both property names. At the moment you can set these values at the cell level only for the unbound grid, but we will provide this feature for the bound grid control in the upcoming release.
|
|
anwar basha
|
Oct 3, 2006 - 12:37 AM
|
Hello,
I have a vb.net datagrid , below which i have added elegantgrid, no i have a dataset which is loaded from a webservice, this dataset example ds bids to the vb.net datagid with the following statement DataGridView1.DataSource = ds.Tables(0)
now i have added a statement to bind to elegant grid Me.BoundGridControl1.DataSource = ds.Tables(0)
please note the table name in the dataset is account_COA, when i run the application with just the vb.net datagrid it works fine an the datagrid gets populated, but when i run the app with boundgridcontrol it throws an exception ---------------------------------------------------------------------- Additional information: Child list for field 0 cannot be created. ---------------------------------------------------------------------- can you please tell me what i am doing wrong here.
regards Anwar
|
|
Technical Support
|
Oct 3, 2006 - 2:31 AM
|
The exception you provided may or may not be generated by the Elegant Grid. Having only one string, it’s hardly possible to find out what’s wrong. Would you send us (at support@prof-uis.com) the VS project that demonstrates the problem or at least the complete exception information including the stack trace, line numbers, assembly names, inner exceptions, and etc.?
|
|
Johnny Lizardo
|
Sep 27, 2006 - 8:23 PM
|
Hi Everyone
I have a issue than take me a lot of time to find out how can I configure my BoundgridControl1 in the group cell header to set always "Collapse". the only parameters the group type in CellStyles is only Expand whatever. I don’t wanna see all expanded. I wanna use only when I needed. (Doing click into +). Please help me on that.
Thanks
Johnny
|
|
Technical Support
|
Sep 28, 2006 - 11:33 AM
|
This is not supported in the current version. We will implement this feature in the next version (it’s actually easy). If you need it right now, we can provide new binaries on your request.
|
|
Johnny Lizardo
|
Sep 28, 2006 - 5:08 PM
|
Please. How can I get this binaries.? I bought this component about 2 week ago. I really need that as soon as possible. my project count on that. Thanks.
|
|
Johnny Lizardo
|
Sep 28, 2006 - 5:23 PM
|
|
|
Johnny Lizardo
|
Sep 28, 2006 - 5:24 PM
|
Sorry again. VB.NET / VS.NET 2003
|
|
Technical Support
|
Sep 29, 2006 - 11:29 AM
|
We sent you the updated binaries by e-mail. To achieve the desired behavior, just set the BoundGridControl.ExpandGroupRowsAfterGrouping property to false .
|
|
Oleg Shomonko
|
Sep 19, 2006 - 7:55 AM
|
Is it possible to show tooltip with full text for every cell which does not enough size to show full text?
|
|
Technical Support
|
Sep 19, 2006 - 10:46 AM
|
This feature is not supported in the current version. We will implement it in the next version, which is scheduled for October.
|
|
Fossware fan and idmirer Archtct
|
Sep 14, 2006 - 5:07 AM
|
You have done excellent job with your Prof-UIS lib up to far, so I like your company !
Are you goinig to provide Vista WPF (.Net 3.0) seamlessly compatible versions of your Grid and Ribbon .Net controls as others, say Infragistics, are going to do soon ?
The answer is very interesting because
1) capabilities of new Vista WPF\.Net3.0 are so incredibly bigger than before that most of developers, including us, will most probably move within the NEAREST MONTHS after its release from MFC + your excellent ProfUIS to WPF. Actually if you compare Vista\WPF API + MS Expression with ProfUIS possibilities then you hardly can find any reason to use ProfUIS as most of the job can be done by standard WPF classes and technology like styles etc. So not many will want ProfUIS.
2) the WPF 3rd party libs field, as it is clean and not crowded yet, could be a good way for your company .
BR
|
|
Technical Support
|
Sep 16, 2006 - 9:26 AM
|
Thank you for your posting. We are currently analyzing and testing the WPF Technology, but so far we have no concrete ideas about control authoring for this platform.
|
|
Sachin Gupta
|
Sep 6, 2006 - 11:03 AM
|
We use ProfUIS toolbars in our ActiveX control. The ActiveX control is used within Internet Explorer.
The toolbar has a "Print" button. On click of this "Print" button, we show a "Confirm Print Dialog" to the user. Sometimes, this "Confirm Print Dialog" overlaps the toolbar. When the user dismisses the "Confirm Print Dialog" the toolbar doesn’t get repainted again and parts of the toolbar remain in white color.
By moving the mouse over the toolbar the toolbar repaints again. Also if the user minimizes and maximizes the Internet Explorer window again the toolbar repaints.
Please suggest us a way to repaint the toolbar when another window overlaps its.
Thanks,
|
|
Technical Support
|
Sep 7, 2006 - 12:03 PM
|
Please try the following: 1) Initialize some timer when the control’s window is created: SetTimer( 345, 100, NULL ); 2) Handle this timer: CWinThread * pWinThread = ::AfxGetThread();
ASSERT_VALID( pWinThread );
pWinThread->OnIdle( 0 ); This code will emulate the standard MFC idle time processing and all the windows should become updated correctly. PS Your question relates to Prof-UIS.
|
|
Jake G.
|
Jul 25, 2006 - 1:49 PM
|
Hi,
Can somebody show me how to use the ValidateEditingCellData event? Is it the right tool for validating user input e.g in a text edit cell?
|
|
Technical Support
|
Jul 26, 2006 - 6:40 AM
|
Here is a simple C# project that illustrates the issue. Please build and run the application. You will see that if you type a space in any cell in the Name column, the value will not be committed to the bound data. This is achieved because the ValidateEditingCellData event is handled in this way: private void boundGridControl1_ValidateEditingCellData(object sender,
Elegant.Grid.ValidateCellDataEventArgs e)
{
if(e.Cell.Column != NameColumn)
return;
if(e.ValidationReason == DataValidationReason.BeforeCommit &&
e.DataValue.ToString().IndexOf(’ ’) != -1)
{
e.InvalidDataBehavior = CellInvalidDataBehavior.None;
e.Valid = false;
MessageBox.Show("The name cannot contain spaces.");
}
} If you mean something else, just contact us and we will help you find the most appropriate solution.
|
|
Jake G.
|
Jul 26, 2006 - 11:35 AM
|
Many thanks. Works like a dream!
|
|
Classified Classified
|
Jul 8, 2006 - 2:26 PM
|
No columns appear only empty white lines, why?
|
|
Technical Support
|
Jul 9, 2006 - 6:51 AM
|
Probably you have not added any grid columns to the grid. The easiest way to solve this problem is to generate grid columns from the data table you have bound the grid to. To do this, please click Retrieve columns from the data source at the bottom of VS properties pane when the grid is selected. The generated grid columns will appear immediately. Besides you can always control grid columns manually by using the Columns property of the grid. If you have any other questions, please do not hesitate to contact us.
|
|
Bahrudin Hrnjica
|
May 20, 2006 - 12:10 PM
|
When you drag BoundGridControl from toolbox in to form designr and want to get popup menu by clicking right mouse button, nothing hepend.For unbound control it works.
|
|
Technical Support
|
May 22, 2006 - 7:38 AM
|
Thank you for reporting the bug. It is already fixed in the final version, which will be released in a few days.
|
|
Alex Plisandro
|
May 17, 2006 - 7:41 AM
|
Elegant Grid Beta looks fine and some your samples are just fascinating! I am looking forward to the release with documentation. When do you plan to release it?
|
|
Technical Support
|
May 20, 2006 - 11:22 AM
|
Than you for the kind words. The documentation is ready (contact us by e-mail, if you need it right now). The final version of the Elegant Grid will be released in a few days.
|