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
Hi,
Thanks for your answers
I have gone trough your links and I really do need further assistance. I need a solution with expandable rows and I really do like this "TemplateColumnLayout" solution. From this link () it looks like rows ARE expandable, can you confirm this Konstantin?
BUT on this link I can't see how do one loads data into the template? I can't see CS code nor hole XAML page nor SQL query that gets data from DB. If you would be kind enough to make and post me some small sample project Konstantin I would be very grateful.
My scenario is: I load grid with email titles (subjects) RowHeight 15px and when I double click some row it expands and shows template (email body text in it) which CAN vary in height depending on the amount of the text in it (100px ÷ 300px). And then if I want to I can collapse that row again. Further on I need that template to display some kind of conversation like:
me: bla bla bla
you: blah blah blah
me: aj aj aj
you: my my my
.. so template it self should have rows which are colored differently ("me" background color yellow, "you" background color blue or whatever..). Is this doable with "TemplateColumnLayout" and how? From that link I can't see much.
Thanks again, best regards
Hello,
I have been looking into your answer the template contains a TextBox control that has its Text property bound and that is how the data is being loaded inside the template. In case you want to put some multiple textboxes, you can place them in the different grid rows. In order to illustrate this behavior I have created a sample project.
Please let me know if you have future concerns regarding the discussed matter.
Hi
Thanks for that sample project EkStaneva very much but I am having a problem running it. These four references cannot be found:
-InfragisticsWPF4.Controls.Grids.XamGrid.v11.2
-InfragisticsWPF4.Controls.Menus.XamMenu.v11.2
-InfragisticsWPF4.DataManager.v11.2
-InfragisticsWPF4.v11.2
and therefore I cannot see in design mode because <ig:XamGrid is not recognized
I don't have these assemblies on my machine and I cannot run this sample project.
My project is actually containing web project which is hosting silverlight project. It is like silverlight web project
and this sample project you sent is WPF project as far as I can tell.
It would be a great help if you'd convert this sample project into silverlight web project so that I can run it successfully without errors.
Awaiting your reply,
Thanks
No need to do that, I have managed to import your code into my project and to run new page without errors. I will write if I stubble again.
I wonder how did they made that fancy template in example link in previous posts with that shiny rectangle
I will now try to put two textblock controls instead of those three text boxes
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,
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.