How to change the row height according to the value in the cell for a dynamically designed cardview.
Yea thats what iam searching for, too!
my Text is cutten from the grid.
its a long text but all I can see from him is the first row. Mouseover shows me the rest of the text. :-(
All the hints from the other users are not useable caus this is cardview and theirs not :-(
PLLLEASE help us ;-)
greetings marc
Not sure if this is what you are looking for. I've used the below to autofit the column to see the entire text.
Grid.DisplayLayout.Bands[0].CardSettings.AutoFit = true
Ada
Hi Ada,
thanks for your fast reply!
But... no it istn it :-(
Iam so frustrated! the syntax of your hint sounds very well! but the functionality is not so well :-)
All these fantastic sollutions for problems on "non-cardview" dont fit in cardview :-( And I cant understand why these commands like yours dont fit here Oo.
Maybe Iam so stupid or noone wants to heare soemthing from the cardview-settings :-(
Iam will try it again and will post here my sollutions (if there someone -.-)
greetings Marc
sry for my bad english ;-)
Hi,
I don't think CardView supports mulitline cells in the normal view. You probably have to use RowLayouts for that.
Hi Mike,
thanks for your reply but if I try your hints nothing happens :-(
Do you have some codesnippets for me? would be very nice!
Hi Marc,
Maybe I don't understand what you are trying to do, then. You can adjust the height of a cell if you are using RowLayouts. But the cell will still be the same size in every card. You can't vary the size on each card. Is that what you meant?
Hi mike,
I tried to post here an screenshot of my problem but at this position I dont have any access to an FTP.
my problem is that what you understoud at first.
I have many cards and one cell of this cards (every the same) should show a long text.
now it only shows a part of this text and if I mouse-over it will show the rest of the text like windows do.
The problem I cant change the hight of this Cells :-( tried it 2 weaks!
Adam,
thank you for that workaround!
Mike,
I use .NET 2007 Rel. 3 and the above mentioned workaround works fine. Is this problem solved in a newer version of the grid control?
Thanks for your reply!
Marc - I had a similar requirement and this is what I did - the result is a dynamic multiline Cell in a cardview when the Text is multiline...
1. Set the CellMultiLine to true for the CardView:
Grid.DisplayLayout.Bands[0].Override.CellMultiLine = DefaultableBoolean.True;
2. In the InitializeRow Event :
foreach (UltraGridCell cell in e.Row.Cells)
{
if (cell.Text.Contains(Environment.NewLine) && !cell.Column.Header.Caption.Contains(Environment.NewLine))
cell.Column.Header.Caption = cell.Column.Header.Caption + Environment.NewLine + Environment.NewLine + Environment.NewLine + Environment.NewLine;
}
Adam
There are a few properties for this.
Check out e.Layout.Override and look at the properties of the Override object that start with the word Allow. Like AllowRowLayoutColMoving, AllowRowLayoutResize, etc.
:-) Sorry but I have one more and last question ^^
what is the command in the "initialze layout" to make the grid so that the User in runtime can change _everything_I want to have this option(s) active that I can change the grid like it should be then bin a button to save the layout and in the release version it should be like this:the button is deletet, no options are in the "initialize layout" and in form load I will load the saved layout from file(that one who I changed earlier).
:-) It sounds good I think and it has to be sucessfull ^^
Hey Mike,
Whole the day I tried this way but its very very much to configure and erverything interact with some other options.Manualy adding the Band and Columns and format them in the right style or layout is very complicated :-(As like you said to save the layout and load it at runtime is a good hint I thought it to do in the morning, too.But my chief is not for this way (Iam not, too). Because I cant control what the designer is doing there.
I'll look at the "layout-save"-way and the other and will decide in the future.
Now I want to thank you very much again! You helped me extremely!At now on I dont want to use your time longer. I think you have otherthings to do that are more important :-)
Thanks again very much!greetings Marc