Showing posts with label Home. Show all posts
Showing posts with label Home. Show all posts

Inserting values from TextBox ComboBox NumericUpDown and DateTimePicker to database C#.Net

Inserting values from TextBox ComboBox NumericUpDown and DateTimePicker to database C#.Net: This article explains you that how to save the data from the multiple controls to the database.In dot net we have different data entry controls.We can use them depending upon the data we have to enter.Here i have mentioned some controls how they will insert to database. TextBox control data always will be in string format, so it will take Text value.ComboBox willalso works like a TextBox.ComboBox is a editable DropDown box.NumericUpDown will take the integer value

How to save data from Dynamic DataTble object to database c#.Net

    Dynamic DataTable to SQL Server c#.Net:
   This article will resolve you how to save the data from dynamic datatable to the database.First thing is the datatable will have the datarows. So you have to save the values from that data rows to the database. The datatable will have multiple rows so you have to run a loop to save all the rows data to SQL database. If you want to see the data of the dataTable object bind the DataTable object to the DataGridView control.

Digital LCD Boombox Metal Watch

 Digital LCD Boombox Metal Wristwatch:
             This article is about Boomtastic wristwatch to wear stylishly around your wrist, now it came with a new look.The Cost of the Boombox Metal Wristwatch is $89.99. Boombox Metal Wristwatch comes with an LCD digital time display.It appears very nice to your wrist. Its takes you to a different look.You can enjoy the FM music with high audio definition.This is the world's most FM watch.


Creating dynamic dataTable object and columns in C#.Net

Creating dynamic DataTable and Columns
    DataTable is a good control for storing data from any control or source. With it we take objects from memory and display the results in controls such as DataGridView textbox and what ever it may be, we can show the data from the data table to those controls.We have two ways to create the datatable in c#. One is Creating object dynamically. Another one is darag drop the DataTable control from visual studio toolbox to the form. Creating the dynamic datable using code is easiest way. The code to create the datatable dynamically is like bellow. By write this code you will get a dynamic datatable. Now you can use the datatable to save the data and to display it in any control as we discussed above.

Adding textbox values to all the datagridview rows c# code

DataGridView control in Windows forms:
             DataGridView control is the windows forms tool as like  GridView in the ASP web designing.To add the values from the textbox to datagridview first you have to add the datagridview columns statically.For the go to properties at the bottom of the propertie window you will see Edit columns property. By clicking that property you will get a window. there you can add , remove and set the special properties of those columns. The DataGridView control makes it easy to define the appearance of cells and the display formatting of cell . The cell is the fundamental  unit of interaction for the DataGridView. We can add the different types of controls in each cell as combobox, link, image etc. All cells derive

Populating DataGridView from database c#

Datagridview control:

DataGridView displays data from SQL databases. Here my code will show how to display a specific table from a database and display it on a DataGridView. For implementing this method we have to use one dataAdapter, which will save the data from the database and this data will fill up to the dataTable or dataSet.If we take the dataSet to fill the table from database the we have to bind the ds.Tables[int Index] to the datagridview datasource. To do that In Visual Studio, select the File menu and then New Project, and select a Windows Forms application. Next, in the designer, drag the DataGridView icon into the

Set errorprovider to the textBox C#

ErrorProvider Control:
             This article will explain the use of the error provider control in Win Forms application development.The error provider control is most useful to display errors associated with data entry tasks on a Windows form. The error provider control is typically used to show errors related to data entry.For example, successful entries could be shown with a green checkmark as easily as failed entries could be shown with the standard red ball exclamation mark.  When user enters invalid value to the textbox then the errorprovider will be set or the user enters the currect value then errorprovider will be clear.You can use one errorprovider to display more error to different controls.

Adding Values to ComboBox dropdown list from database CSharp(C#)

ComboBox Control in C Sharp

Combobox is a editable DropDownBox.DropDownBox is a ASP.Net controler but here in the C#
combobox will works as a dropdownbox.Adding values to the ComboBox dropdown list from the database is a simple process.Basically ComboBox will have three dropDown styles.Those styles will make the ComboBox three different styles. Those are Simple,DropDown and DropDownList.If you select the Simple DropDownStyle the combobox will appear as a textbox.Another one is DropDown, in this DropDownStyle the combobox will able to take the text from the user and the shows the drodown of perticulars those contain in DataBase.And the DropDown list property will not allow the user to enter the

Autocomplete mode for textbox in C# .net

AutoComplete Mode for TextBox control in C#

               Textbox control have the AutocComplete mode in C Sharp language.When one perticular field will be with related data that time we can set the autocomplete mode to the textbox.This feature does not there in the VB.Net language.When using the vb.net code user must enter the entair field.Autocomplete mode is very usefull feature to the user. Autocomplete mode will work like Google search engine. While user entering the data, the word completion will come as a dropdown to the textbox from a perticular field from database.For that you have to write the select statement from that perticular database.

Inserting values from DataGridView to database C#

Inserting datGridView all rows to database:

We know to inserting values from textboxes and other data entry controls to database
but the values enter from dataGridView to database is little different than those ways
because here we have to insert all the rows which contains in dataGridView to database.
Click here for inserting values from textboxes to the datagridview control.So for the we
have to run a loop to to collect all the data from the all the rows from the database.

Add values from textBox to dataGridView C#

DataGridView Control:
            Datagridview is the one of the efficient control in C#.The DataGridView displays the contents of a data source. It is a control in Windows Forms that uses a grid format. Inserting the values from textbox to datagridview control is easiest way. For that first you have to add one windows form.Add atagridview control,five textboxes and one button to the form or webpage.Add five columns to the datagridview control statically and namethe columns as name,class,city,phone and zipcode. Click here for more information about datagridview control.

TextBox validation for currency (adding" .00 " at the end )

Adding ".00" automatically at last 
        This code will validates currency value, means it will add " .00 " value automatically at the end of the value entred by the user. Validation for textbox will be validate in two ways, one is validate on user interface. This validation will be done at the user interface only,there is no need of database connection. And another validation type is validate with the database connection. Checking duplication is one of the such validation type. For the when user clicks the save  button, the data will be from database and shows a error message to the use.This code will validate on user interface only.

TextBox Validation for Email address format

TextBox Control :
Represents a control that can be used to display or edit unformatted text. This control has additional functionality that is not found in the standard Windowstext box control, including multiline editing and password character masking.
TextBox Validation for Email address format :
Email address will be in a perticular format. Every email id will have @ symbol, that is the rule

Code for TextBox validations in .Net


TextBox Control :
This control is able to enter the data by the user and send from the textbos to anywhere like saving to database, send to another textbox, insert to datagridview cells etc. 
TextBox validation for restrict Lettres :
This code will not allow the lettres from A to Z . Except those remaining charecters, symbols and special charecters will be allowed.