Hi I am Marko,
What I want to do is to fill xamGrid with email titles and then to have an option to expand each row so that I can see email body (text that is) . And that text can be very big or very small and there fore height of the expanded row can vary (be very high or very low). I saw on this site that xamGrid has an option to make rows expandable. How do I achieve all this? Because when I load email text in the grid the row height is always the same and its the height that I specified in properties of the grid for example 23px. This way I can not see hole of the text - I can see only part of the email text - part that fits into that columns width. I want to see hole of the text no matter how big it is (multiple rows text and not in one line). When I set column width to "Auto" width of the column goes wide as far as header text of that column -and this is behavior that i wand but also I want the height of the row to grow according to the size of the email body text. I don't now how to do this.
Please help.
Best regards,
Marko.
Anybody ?? Please help.
I saw example here http://samples.infragistics.com/sllob/RunSamples.aspx?cn=grid#/grid/handling-hierarchical-data-sets but from sample code on this page I couldn't figure it out how do I load Data into these subrows/subgrids (<ig:ColumnLayout)
Hello torbaman ,
I am just checking if you still need further assistance after the above solution has being provided for you.
Sincerely,
Ekaterina
Developer Support Engineer
Infragistics, Inc.
www.infragistics.com/support
I will now try to put two textblock controls instead of those three text boxes
.. and load data from database
Hello,
Thank you for your answer.
Both the TextBox and the TextBlock controls will automatically resize according to the FontSize of their text, so you just have to remove the height declaration and let the control handles it for you. In case you explicitly give some height value it will be taken with a propriety and the automatic resize would not fire at all.
Please in case of future Infragistics related topics feel free to contact us.
Hi,
I have tried what you said but with no luck. My text block doesn't expand, here is the code:
<TextBlock Name="labOpisProblemaVal" Text="Đoković je u finalu pobedio Britanca Endija Marija sa 6:1, 7:6, a posle meča proveo je zanimljivih sat vremena pre nego što je napustio kompleks u Ki Biskejnu. Srpski teniser je prvo proslavio trijumf u svlačionici, a potom nije propustio priliku da se zahvali svima koji imali svoju ulogu na turniru, da bi pri kraju i zapevao sa popom. Kako je sve izgledalo, možete da se uverite i sami…" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="0 10 0 0" FontFamily="Arial" FontSize="11" Width="300" Padding="1 1 1 1" Canvas.ZIndex="999" />
.. It doesn't expand I can see only one line with width=300px.
Please help
I have not resolved this issue yet.
I have been looking into your question and in order to show multiline TextBlock or TextBox you can set their TextWrapping property to "Wrap".
Please feel free to ask any questions related to the discussed topic.
Ok, I have opened a new topic for this xamGrid and ColumnLayout columns stuff.
Didn't read your post yet, I will read it when I go home tonight,
thanks for response, my next post will be under new topic xamGrid and ColumnLayout columns
Best regards
Marko
Hello Marko,
Would you please if possible open new forum threads for the issues that are not directly related to the currently discussed topic. That way, we would be able to perform separate investigations and keep a better track on every different issue that we are assisting you with.
Thank you in advance.
I have been looking into the sample provided and compared to your scenario the two implementations does basically the same, but the Infragistics sample performs the action via binding from the xaml.
To be more specific, you set the xamGrid’s ItemsSource in the code behind. I am not sure what e.Result is, but I assume that this is the output from the service that provides the data. You mentioned that you have collection of Users that are loaded with data retrieved from the db. Let say that you have a Name property in this User class and you have filled it with a data. In case you have a textBox, like in the Infragistics sample, that you wish to fill with this name, you can do this in two different ways:
From the code behind:
myText.Text = User.Name;
or bind it from the xaml:
xmlns:local="clr-namespace:MySamle" //reference to the codehind
.
<Grid.Resources>
<local:User x:Key="UsrData"/> // we get the class
</Grid.Resources>
<Text="{Binding Source={StaticResource UsrData } , Path= Name }" // and bind to the needed property
What happens in the sample is pretty much the same and it is possible to Grid’s ItemsSource from the xaml. Notice that you probably should implement the INotifyPropertyChanged interface, in order to have your TextBox updated according to its corresponding data source. For more information on the mentioned interface, please visit:
http://msdn.microsoft.com/en-us/library/ms743695.aspx
Please do not hesitate to ask any question regarding the original discussed topic.
I am having a problem understanding how this works:
http://samples.infragistics.com/sllob/RunSamples.aspx?cn=grid#/grid/handling-hierarchical-data-sets
Can someone please put here some sample project with Access database (I am using SQL 2008) so that I can see how do I get data from the database into the class objects and the into grid. I am asking this cause I can't understand this part with binding data to the columns:
Text="{Binding Source={StaticResource Strings} , Path=XWG_OrderDetails_Discount}"
This is how I load data into grid from database: I make new class "Users" and make method in service "GetUsers" that executes sql query and gets data from db onto list of objects of "Users" class and returns that list. When execution of the service method is completed I do this xamGrid1.ItemsSource = e.Result; and grid displays data.
How is this "http://samples.infragistics.com/sllob/RunSamples.aspx?cn=grid#/grid/handling-hierarchical-data-sets" different ? comparing to the my method described above??
Please help,