How can 'enable selection' in a gridview be activated programatically in vb? - visual-studio-2010

I'm using visualStudio 2010 vb
When using Gridview, you can extend the cotextual menu and select 'enable selection' and this will create a select link (which can be changed to button) in each row, which this this allow to select the row and triger, for example, a drill down of the information contained in the row.
Can this 'enable selection' be activated programatically?
I tried the following without any result:
GridView1.AutoGenerateSelectButton = True
Thanks
c

I found that I was missing the databind. The following works
GridView1.AutoGenerateSelectButton = True
GridView1.DataBind()

Related

Where can I modify discourageImplicitMeasures?

I have a model deployed, with
"discourageImplicitMeasures": true
set to true:
But I do not see it in the properties in VS:
So, how can I change it?
I have no idea where this is in the UI, but this method will work. Go to the Solution Explorer pane and right click Model.bim and select View Code. You can then edit the JSON version of the model. When you are done, right click Model.bim and select View Designer to switch back.

Can I change the width of the Solution Configuration combobox in the IDE?

Can I increase the width of the Solution Configuration combobox of MS Visual Studio IDE? I want to see the full name, for example Debug (Local) or Debug (Remote). Also tooltip writes the Solution Configuration text instead of combobox' current value.
Yes you can. you must enter in "add or remove buttons -> customize". Inside the commands tab select the button you want to customize and click "modify selection" you change the width value there. Take a look here
http://visualstudioextensions.vlasovstudio.com/2014/08/14/adjusting-the-width-of-solution-configurations-drop-down-list-in-the-visual-studio-toolbar/
Same same but different in VS 2019:
Go to 'Tools --> Customize'.
In the 'Commands' tab, select 'Toolbar: Standard'.
Select 'Solution Configurations' and click 'Modify Selection'. You can adjust the width there.

Skip A Dialog In Visual Studio Setup Project

I've created a Visual Studio Setup Project (VS 2010) in which one dialog (4 textboxes) is optional. It depends upon a checkbox selection by user in previous dialog. Is there any way I can skip the optional dialog ?
There are no capabilities in Visual Studio setups to do this. VS setups are going away anyway after VS 2010, so you should choose an MSI-building tool that has this capability.
You could in principle use Orca to manually change the MSI tables, such as the ControlEvent table, but it will be virtually impossible unless you already know how the MSI internals work.
I haven't found out a way to skip a dialog depending upon a control(e.g. checkbox or radiobuttongroup) selection by user in previous dialog;
but you can create a custom dialog(ref link1, ref link2) with all required control(s), and then toggle the visibility of the control(s) with "Show/Hide" Action with proper condition statement(e.g. then checkbox or radio buttongroup selection by user in previous dialog), then you can still make it just like skipping a dialog.
Here is my example:
The previous dialog control selected value(already set to be either "Foo" or "Bar") is passed through "SELTYPE".
When SELTYPE="Foo", I will show controls named "CustomControlFoo" and "RadioButtonGroup", and also hide the control named "BodyText";
When SELTYPE="Bar", I will hide controls named "CustomControlFoo" and "RadioButtonGroup", and also show the control named "BodyText".
For more information, please read this Micorosoft's official reference:
ControlCondition Table
The action that is to be taken on the control. The possible actions are shown in the following table.
Table 2
Value Meaning
Default Set control as the default.
Disable Disable the control.
Enable Enable the control.
Hide Hide the control.
Show Display the control.

Creating a toolbar button that runs a Macro in VS2010

I've created a MACRO in visual studio 2010 that builds my project and attaches it to several processes. Unfortunately, unlike in vs2008, I can't add it to a toolbar so I can run it with a press of a button; after looking it up I found out the guys at Microsoft left the option of adding a macro button out of vs2010:
http://social.msdn.microsoft.com/Forums/en-CA/vsx/thread/87455de6-2a7d-42dd-b51f-ddd442c3e3fd
Am I wrong and there is a way/workaround that can solve this?
It's possible. Tools + Customize, Commands tab, Toolbar radio button. Use the combo to select the toolbar you want to change. Add Command button, Categories = Macros, select the macro in the Command list. Modify Selection to alter the button properties.
What you can't do is select an image for the new button. That's indeed stunningly lame, looks like they just didn't have time to get it done. You can add your vote to this feedback article. But surely on the todo list for the next version already.

Visual Studio 2008 - Toolbar missing 'Release' / 'Debug' dropdown build configuration

how to enable the dropdown that shows build mode 'release/debug' ?
I have set the 'show advanced build configuration' option. I added the 'configuration manager' to the build toolbar but in previous versions we could do this by using the drop-down control.
TIA
The easiest way to fix this is to reset your settings to the General or C# profile.
Tools -> Import / Export Settings
The VB profile will hide this toolbar by default
Add the Solution Configurations option to the build toolbar, that should give you the dropdown.
To add the Solution Configuration onto your Toolbar, try the following:
View|Toolbars|Customize,
then select the Commands tab,
select the Build category and
drag the Solution Configuration and drop it onto your toolbar
Before going to next steps, try the tip from the first response below. This should solve the problem in most cases. If not, continue with the following steps.
Go to menu Tools - Customize… (or right-click on any toolbar and Customize…)
Switch to Commands tab.
Select Build under Categories.
Select Solution Configurations under Commands.
Drag and drop it on the toolbar where you wish this drop down list to appear.
Hope Sure this will helps you.
I too was facing this issue but I've found a solution:
Tools->Import/Export settings -> select the C# setting and General settings.
I am able to see the Debug/Release drop-down.
To add the Solution Configuration onto your Toolbar, try the following:
View|Toolbars|Customize, then select the Commands tab, select the Build category and drag the Solution Configuration and drop it onto your toolbar
It's in Tools\Options\Projects and Solutions. Select the Show advanced build configurations checkbox and click OK.
Turn on the Expert Settings (Tools->Settings->Expert Settings) if using VS2010.
I'm currently programming in C++ with VS 2008 and had the problem of not being able to find the Configuration selection drop-down. The solution given by JayV worked for me. Cheers.
This can happen when you start a new web site by going to File > New > New Web Site. When what you really want is File > New Project > Then in new window click ASP.Net website.

Resources