Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

Search the Tips

Controls - Page 4

61-80 of 335     Previous     Next
Creating DataGrid's hyperlink columns with multiple parameters in the Url
by Marco Bellinaso
The DataGrid's HyperLinkColumn column is great to have a column with an hyperlink that points to an Url with a parameter whose value is taken from the data source, but what if you need to build the target Url with more than one parameter taken from the data source? In this case you can use a ...
Relative Urls in user controls
by Marco Bellinaso
Urls that you set in user-control's child controls are relative to the user control's directory, not to the host page's directory. Say for example that you have an user-control located under the /UserControls directory, and the host page under the / root directory. The user-control exposes a ...
Accessing user controls from the code-behind
by Marco Bellinaso
When you add a user control to an ASP.NET page, Visual Studio .NET does not add a control declaration as it does when you add standard ASP.NET web controls. The result is that you can't directly access the user control from the code-behind and programmatically change its properties and call its ...
Take advantage the Slider control's Select Range mode
by Francesco Balena
The Slider control has a capability that you might ignore: you can assign its SelectRange property to True to enter Select Range mode, during which the user can use the Slider to select a range instead of a single value. When in Select Range mode, however, it's up to you to manage the ...
IsClientScriptEnabled - Checking if the client script support is requested and possible
by Francesco Balena
If you develop a custom control and want to give the option to output client-side javascript code, you'll likely have a EnableClientScript that allows the developer to specify whether the js code will be generated or not. However, before generating and outputting the js, you should also check ...
FindControlRecursive - Find a control in a hierarchy of controls
by Francesco Balena
Find a control in a hierarchy of controls Example: Dim txtCtl As Control = FindControlRecursive(DataGrid1, "FirstNameTextBox")
GetIndexFromText - Return the index in a ListControl given a text
by Marco Bellinaso
Return the index in a ListControl given a text Example: Dim i As Integer = GetIndexFromText(ListBox1, "hello")
GetIndexFromValue - Return the index in a ListControl given a value
by Marco Bellinaso
Return the index in a ListControl given a value Example: Dim i As Integer = GetIndexFromText(ListBox1, "hellovalue")
SelectItemFromText - Select the ListControl element with a given text
by Marco Bellinaso
Select the ListControl element with a given text Example: SelectItemFromText(ListBox1, "hello")
SelectItemFromValue - Select the ListControl element with a given value
by Marco Bellinaso
Select the ListControl element with a given value Example: SelectItemFromValue(ListBox1, "hellovalue")
Using multiple fields as value for the DropDownList control's items
by Audrey Peters
Being an avid Access Programmer I have been frustrated with the limitation of VB DropDownLists to using only 1 field as the value. I found a way to simulate/work around this behavior with concatenation of several database fields at the query level to be my columns(i.e. Select KeyId1 + '~' + ...
Trapping DHTML events from the WebBrowser control
by Francesco Balena
You can host the WebBroweser in a Windows Forms application, similarly to what you can do with any other ActiveX control. You just need to right-click on the control toolbox, select the Customize Toolbox menu command, select the Microsoft Web Browser control from the list of available controls, ...
EnsureNodeIsVisible - Select a TreeView node and ensure it is visible
by Francesco Balena
select a treevide node and ensure it is visible by expanding all its parent nodes and bringing the node in the visible portion of the control
Moving the focus on a control when the page loads
by Francesco Balena
ASP.NET doesn't provide a built-in method for giving a control the input focus when the page loads. In fact, you can assign the TabIndex properties to controls on a page, but you can't use this property to set the initial focus on a control of your choice. The following procedure provides ...
CenterCaptionInAdodc - Center a caption on an ADODC Data control
by Bill O'Neil
Center caption in Adodc control Input: frmForm - Form Adodc contol in on datAdodc - Adodc control sCaption - Caption text Output: Padded Caption text
Map an enumerated value to a set of OptionButton controls
by Francesco Balena
In VB6 and previous version, displaying an enumerated value in a group of option buttons is quite simple, provided that the option buttons be grouped in a control array. VB.NET doesn't support control arrays, so you can't reuse the same simple coding techniques. However, you can prepare a ...
GetSelectedOption - Get the selected element in an OptionButton control array
by Wim De Smet
Determine which element of an option button control array was selected Returns -1 if no control has been selected Use : OptSelected = GetSelectedOption(Option1)
Ensuring that a style is supported by a font family
by Marco Bellinaso
Not all fonts support the same styles. This function takes in input a font family and a font style, and returns a font style which is safe for that particular font family, by removing the styles that are not supported Example: GetSafeStyleForFontFamily(richTextBox1.SelectionFont.
Hiding pages of a TabControl
by Marco Bellinaso
Sometimes you may need to hide or show some pages of a TabControl according to the information you want to show, basing on the currently logged-in user for example (users with low privileges won't be able to get all the information or to change records). To do this, you may attempt to add or ...
Setting the width of the last column of a ListView when the control is resized
by Marco Bellinaso
When you resize a ListView control (this happens automatically if the ListView is docked to the form, and the user resizes the form), it's nice to have the last column to be resized accordingly to cover the available space. To do this, handle the ListView's Resize control (in .NET any control ...
61-80 of 335     Previous     Next
Thanks for your registration, follow us on our social networks to keep up-to-date