Hi,
With the last version of Infragistics; 2009 vol 3, when I add a new row in a grid without change the datasource with properties set like below, this update automatically the height of the row but with the last version, 2010 vol. 1, this stop working.
This is what I set in the InitializeLayout of my grid:
Dim column As Infragistics.Win.UltraWinGrid.UltraGridColumn column = grdDetail.Columns("Description") column.Layout.Override.RowSizing = Infragistics.Win.UltraWinGrid.RowSizing.AutoFree column.CellMultiLine = Infragistics.Win.DefaultableBoolean.True column.CellDisplayStyle = Infragistics.Win.UltraWinGrid.CellDisplayStyle.FormattedText column.CellMultiLine = Infragistics.Win.DefaultableBoolean.True
After that, with the version 2009, vol.3, when I want to add a new row in my grid with text that contain carriage return, I must call the update of the new row : (grid.ActiveRow.Update) and this update automatically the height of the row.
With the last version of Infragistics, this stop working; the row is not refreshing with a new height. Now, I must refresh all the datasource of the grid with all the overhead that come with.
Please, could you tell me if this is a bogue or if you have changed the behavior and if this is the case, what is the method that I must call.
Thank you
It's hard to say without more information. How are you adding the row? Are you using the TemplateAddRow? Are you adding the row in code? Are you adding the new row to the grid or to the grid's DataSource?
Can you create a small sample project demonstrating what you are doing so I can test it out?
I create a simple DataSet with single table.
I put the dataSet into the grid like this: grid.DataSource = dataset
After that, when the InitializeLayout is raise, I set the column to be multiline and It's work perfectly for all rows.
I add new row directly in the dataset that update automatically my grid. The problem is here; the new row add in the dataset and show in the grid is not automatically updated to have the good height. Don't forget that the problem occur only with row that contain value with carriage return.
With the version 2009 vol.3 of Infragistics, I only have to call the method Update of each new row in the grid and these rows automatically autogrow to the right size.
But, since the version 2010 vol.1, the method Update don't work and is not acceptable for me to reassign a new dataset to the grid because the overhead.
There is no such thing as 2009 Vol. 3. There never was a volume 3, there were only volumes 1 and 2. I tried this out with 2009 Volume 2 and when you use the FormattedText style, the rows do not honor a return character in the text at all. It does not work for existing rows or new rows. But I am testing with the latest service release. So maybe it was working for you in a previous build of v2009 Vol. 2 without the service release.
So do you know exactly what version of the assemblies you were using?
If this was working and now it's not, then it's clearly a bug, but it would help to track it down if I knew what version you were using originally.
In any case, I'm going to forward this thread over to Infragistics Developer Support so they can check it out.
Please ignore everything above. I was failing to take into account that you have to use a BR tag to get line breaks when using FormattedText.
I have now tested this out using both v9.2 and v10.1 and it works fine for me in both versions. I'm attaching my sample here so you can try it out. If my sample works for you and your real applicaiton does not, then it means your app is doing something differently and we will need to determine what that is.
If my application does not work for you, then you probably just need to get the latest service release.
First, thank you for the more elaborated example.
Unfortunately, the text rendering in the grid is text entered from a textbox where each line is separated with CarriageReturn; vbCrLf; System.Environnement.NewLine.
I have not hmtl in the text show in the column.
Like I said, in v9.2, if I put a text separated with carriageReturn like in a multiline textbox and I put in on a grid with a DataSet as DataSource, the grid render correctly and row who have carriageReturn in the content autogrow to the right size. After that, like you write in your example, I put another row but without changing the datasource; adding some rows directly to the dataset and with v9.2, the row don't grow automatically but I find that if you call the method Update of the sibbling rows, this work perfectly.
The problem is that I have downloaded the new version without changing a single line of code and now, when user add row, the new rows with carriagereturn (And not <BR>) is not growing; I must fill another dataset and reassign to the grid.
Please, give me an answer a fast as you can if this bug have a workaround. I know this is a bug because I have not changing a single code and the behavior have changing. If this is a bug, I will mention it to my client and we will try another solution for displaying row.
It's work perfectly.
Thank you very much.
neosynergix said: in v9.2, if I put a text separated with carriageReturn like in a multiline textbox and I put in on a grid with a DataSet as DataSource, the grid render correctly and row who have carriageReturn in the content autogrow to the right size.
These are not the results I get. If I used a CR, instead of the BR tag, then the text does not appear on multiple lines in a column whose Style is FormattedText.If you change the BR tag in my sample to a \n, then the text all appears on a single line, both for existing rows and for the new rows I added. Are you saying that that is not the behavior you are getting?
You could try calling PerformAutoSize on the row immediately after you add it, as a workaround. But I don't see how it could be working without the BR tag.