Add checkbox on List and Details Screen to select the different relationship tables
-
Friday, April 13, 2012 10:15 AM
I have a list and details screen that shows a Table(one) to many to many other tables. 1 client can be added to many Articles, blogs, etc..
I would like to show how many Articles a client has, as well as blogs. I would like to be able to show this by selecting via a checkbox, so if I only want to show Articles I would click on the Article checkbox, same with blog. Then if I want to show both Articles and blogs, I will check both Boxes. is there an blog or post with simple steps to follow to accomplish this or anyone here on the forum that can help. Here is a screenshot below, the red circle is the one I want to use checkboxes instead of tab and the results below. thanks.
All Replies
-
Friday, April 13, 2012 2:51 PM
This sounds similar to an article Michal Washington wrote about WCf RIA services in LightSwitch
Maybe you should look at his article to see if it can help solve your problem?
Jan D'Hondt - Database and .NET development
-
Friday, April 13, 2012 6:37 PMQuestion I have is "how" would you like to display the Article / Blog / Press Release data? Together in one grid or separately just without the tabs or show and hide the tabs based on the selection of the check box?
Derek
-
Friday, April 13, 2012 10:00 PMat Spursoft, I wouldnt want tabs but either 1 grid showing the data for all 3 tables or 3 grids but only displaying if the checkbox is checked on the right side. Whichever is easier to code and do. Thanks
-
Friday, April 13, 2012 10:21 PM
Is the data coming from one table for all three grids? If so combine them and filter based on the state of the checkbox, if not then you would have to go with multiple grids, change the Tabs Layout to a Rows Layout and place 3 boolean properties on the screen in another group. On the PropertyChanged event of each of the properties set the IsVisible property of grid controls set = to the boolean value of the property.
Derek
- Proposed As Answer by Justin AndersonMicrosoft Employee, Moderator Friday, April 13, 2012 11:31 PM
-
Monday, April 16, 2012 5:21 PMDerek, Thanks for the tip, I am just having an issue with the code. One of my properties is called SelectArticles. I go to
SelectArticles_Changed() code. I tried to find grid.isvisable or articles.isvisable but I cannot get the code right. Do you mind showing me what the code will look like? Thanks
-
Monday, April 16, 2012 10:54 PM
this.FindControl("grid").IsVisible = SelectedArticles.Value;Derek
- Marked As Answer by Dbdmora Tuesday, April 17, 2012 3:07 AM
-
Tuesday, April 17, 2012 3:08 AMThanks for your help Derek
-
Tuesday, April 17, 2012 5:32 PM
Glad I could help.
Derek

