{"id":4274,"date":"2008-08-11T18:03:00","date_gmt":"2008-08-11T18:03:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/webdev\/2008\/08\/11\/multiple-control-selection-tipstricksworkarounds\/"},"modified":"2008-08-11T18:03:00","modified_gmt":"2008-08-11T18:03:00","slug":"multiple-control-selection-tipstricksworkarounds","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/multiple-control-selection-tipstricksworkarounds\/","title":{"rendered":"Multiple control selection tips\/tricks\/workarounds"},"content":{"rendered":"<p><P>In an earlier <A href=\"http:\/\/blogs.msdn.com\/webdevtools\/archive\/2008\/06\/12\/multiple-control-selection-in-visual-studio-2008-sp1-rtm.aspx\">blog<\/A>, we mentioned that multiple control selection was returning with VS2008 SP1. We also mentioned that it isn\u2019t a functionally complete feature yet due to time constraints. Rather than waiting till the next release of Visual Studio, we decided to deliver the core functionality in SP1. The plan is to deliver a completed multiple selection feature for the next version of Visual Studio. Until then, we hope that the current implementation will satisfy the core functionality that you require.<\/P>\n<P>In order to help you use the feature, we\u2019ve compiled a list of tips, tricks, and workarounds for multiple control selection:<\/P>\n<H5>Selection<\/H5>\n<P>\u00b7 When selecting controls, make sure your mouse isn\u2019t moving between the time you click your mouse and release the button or else the designer will think you are trying to perform a drag on the control and will drop your selection. <B><\/B><\/P>\n<P>\u00b7 Clicking on the resize controls (circled in red) also causes selection to be lost.<\/P>\n<P><A href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/clip_image002_2.jpg\"><IMG height=\"294\" alt=\"clip_image002\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/clip_image002_thumb.jpg\" width=\"644\" border=\"0\"><\/A><\/P>\n<P>\u00b7 When selecting a container control, you need to make sure you\u2019re selecting the control and not the contents inside. The easiest way to do this is to select in the container and then hit &lt;ESC&gt; so that the container is actually selected (the entire container should become highlighted as shown below). This only applies if the first control you are selecting is a container control.<\/P>\n<P><A href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/clip_image004_2.jpg\"><IMG height=\"296\" alt=\"clip_image004\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/clip_image004_thumb.jpg\" width=\"644\" border=\"0\"><\/A><\/P>\n<P>\u00b7 When trying to multi-select a container control or an entire HTML table, click along the border when you see the four way arrow icon.&nbsp; <A href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/clip_image006_2.jpg\"><IMG height=\"39\" alt=\"clip_image006\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/clip_image006_thumb.jpg\" width=\"41\" border=\"0\"><\/A><\/P>\n<P>\u00b7 When dealing with data view controls that have selectable cells (detailsview and gridview), you might have to enable paging and select the control from the paging row in order to multi-select it. <\/P>\n<P><A href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/clip_image008_2.jpg\"><IMG height=\"294\" alt=\"clip_image008\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/clip_image008_thumb.jpg\" width=\"644\" border=\"0\"><\/A><\/P>\n<P>\u00b7 If you don\u2019t have anything selected, are holding down control and try to select an html control, then it won\u2019t work. The workaround is to not hold &lt;CTRL&gt; when selecting the primary control if it is an html control.<\/P>\n<P>\u00b7 Multi-selecting html controls inside an html table doesn\u2019t work currently. ASP.net controls inside html tables can be multi-selected.<\/P>\n<H5><B>Resizing\/Alignment<\/B><\/H5>\n<P>\u00b7 Alignment only works when using absolute positioning.<\/P>\n<P>\u00b7 You can\u2019t drag multiple controls but you can drag one and align the rest of the controls to that control.<\/P>\n<P>\u00b7 Similarly with resizing controls, you can resize one control and make the rest the same size. <\/P>\n<P>\u00b7 If all you are dragging a single control and notice all your controls are moving then check if the controls are using the same CSS property (and thus when you drag, the CSS style is being changed and all controls are following the style.) To fix this, create a separate style for the control you want to drag around.<\/P>\n<H5>Source View<\/H5>\n<P>\u00b7 Multiple control selection isn\u2019t supported by selection controls through the source editor; it is only enabled for the designer.<\/P>\n<P>\u00b7 If you make a contiguous selection of controls then all those controls will be highlighted in the source view.<\/P>\n<P><A href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/clip_image010_2.jpg\"><IMG height=\"484\" alt=\"clip_image010\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/clip_image010_thumb.jpg\" width=\"500\" border=\"0\"><\/A><\/P>\n<P>\u00b7 If there\u2019s anything in between the controls (even white space or line breaks) then it will only highlight the primary control in source view.<\/P>\n<P><A href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/clip_image012_2.jpg\"><IMG height=\"484\" alt=\"clip_image012\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/clip_image012_thumb.jpg\" width=\"504\" border=\"0\"><\/A><\/P>\n<P>\u00b7 If all the controls being highlighted are inside a container and contiguous then the entire container gets highlighted.<\/P>\n<H5>Misc<\/H5>\n<P>\u00b7 If you invoke the &lt;New Data Source\u2026&gt; option from the property grid on multiple controls then you will get a dialog for each control.<\/P>\n<P>\u00b7 The property grid shows a blank component name when multiple controls are selected but there will be properties shown unless there are no common properties for the selected controls.<\/P>\n<P><A href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/clip_image014_2.jpg\"><IMG height=\"244\" alt=\"clip_image014\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/clip_image014_thumb.jpg\" width=\"160\" border=\"0\"><\/A><\/P>\n<P>\u00b7 The property grid might take a few seconds to update after selecting a control so if a change isn\u2019t working, make sure the property grid is updated.<\/P><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In an earlier blog, we mentioned that multiple control selection was returning with VS2008 SP1. We also mentioned that it isn\u2019t a functionally complete feature yet due to time constraints. Rather than waiting till the next release of Visual Studio, we decided to deliver the core functionality in SP1. The plan is to deliver a [&hellip;]<\/p>\n","protected":false},"author":404,"featured_media":58792,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[197],"tags":[31,7293,7303,7272,7302,7267],"class_list":["post-4274","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aspnet","tag-asp-net","tag-customer","tag-sp1","tag-tips-and-tricks","tag-visual-studio-2008","tag-vwd"],"acf":[],"blog_post_summary":"<p>In an earlier blog, we mentioned that multiple control selection was returning with VS2008 SP1. We also mentioned that it isn\u2019t a functionally complete feature yet due to time constraints. Rather than waiting till the next release of Visual Studio, we decided to deliver the core functionality in SP1. The plan is to deliver a [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/4274","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/404"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=4274"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/4274\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/58792"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=4274"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=4274"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=4274"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}