Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
Search the Tips
Tip Bank > Web Development > Web Controls

Web Controls - Page 4

61-80 of 349     Previous     Next
Don
by Marco Bellinaso
Have you ever tried to change the BorderStyle, HideSelection, MultiLine, ScrollBars, WordWrap and TextAlign properties of a TextBox, or the ComboBox
Skipping columns when tabbing on a DataGrid
by Marco Bellinaso
It happens quite often that you have a DataGrid with hidden columns (with width = 0), because you need their values but don't want to show them to the user. However, when you tab through the DataGrid's columns, these "hidden" columns are still taken into account in the tab order. This means ...
Associating a custom bitmap to a web or Windows custom control
by Marco Bellinaso
When you create a custom Windows or Web control, compile it and add it to the Visual Studio .NET's Toolbox, the control is added to the toolbox with a default bitmap representing a gear. This might be fine if you're developing the controls for your own use, but it surely isn't what you want if ...
Creating a scrollable DataGrid
by Marco Bellinaso
When you create a DataGrid, it would be often good to specify its height, and have the DataGrid show a scrollbar if the content is longer than the given height. This would allow to make up a fixed layout that doesn't get messed up if there are a few or a lot of lines/records to show. The ...
GetAllControls - Retrieving all the controls inside a container and its sub-containers
by Marco Bellinaso
Returns an array with all the controls in the specified container control and its child containers Example: print the name of all the controls on the form and its child container controls Dim ctl As Control For Each ctl In GetAllControls(Me) Debug.WriteLine(ctl.Name) Next
GetValidationSummary - Builds a validation summary for all the controls inside a container
by Marco Bellinaso
Return a validation summary string with all the error messages, if any, of the controls inside the specified container, associated to an ErrorProvider control Example: Dim summary As String = "" display the validation summary for all the controls on the form summary = GetValid
Add Controls to a Project Quickly
by Darin Higgins
GetControlsByType - Retrieving an array of controls of the specified type
by Marco Bellinaso
Returns an array of controls of the specified type, found within the specified parent control (or the form itself). Note: the search is optionally done recursively, by checking also controls' child controls Example: get an array with the form's textboxes Dim textboxes() As TextBox = ...
ResetControls - Reset the value for the input array of controls
by Marco Bellinaso
Resets the value for the input array of controls, and thier child controls Example: - reset all the controls on the form: ResetControls(Me) - reset specific controls: ResetControls(TextBox1, CheckBox1, GroupBox1)
CountCheckedNodes - Retrieving the number of checked nodes in a treeview
by Marco Bellinaso
Return the number of checked nodes in the specified tree
Adding a confirmation popup for delete buttons defined within templates
by Marco Bellinaso
The DataList and DataGrid controls easily allow to add a "Delete" button/hyperlink in your template. When clicked, this button/link raises a DeleteCommand event that you can handle to delete the data item of the parent DataList's/DataGrid's row. Here's an example that shows how to ...
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 ...
Hiding controls defined within templates to some users
by Marco Bellinaso
It happens frequently that you want to hide some input controls or links if the current user is not logged in (it runs with the anonymous account), or if the logged user is not a member of a specific group. For example, you may want to hide the Edit/Delete buttons to users that are not ...
Implementing a two-way sorting for the DataGrid control
by Marco Bellinaso
DataGrid's sorting functionality is not automatic, the control takes care of "just" rendering the column headers as hyperlinks, and gives you the ability to handle the click on those links, by means of the SortCommand event. Then you manually sort the records (by means of a new DataView ...
Showing a graphical checkmark on DataGrid's boolean columns
by Marco Bellinaso
While working with template-based controls such as the Repeater, DataList or DataGrid, it often happens that you don't want to show just plain text as it is retrieved from the data source, but want to interpret the data and represent it in other ways. For example, you may want to show 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")
61-80 of 349     Previous     Next
Sitemap