473,395 Members | 1,578 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

default value to a datagrid column

Is there any way to add a default value to a datagrid column(for the whole column - eg : system date) . I'm using vs2003 and datagrid and using dataadapter to update the grid.


Thanks in advance
Dec 2 '09 #1
3 3128
sanjib65
102 100+
Default value to a Datagrid column usually stands for any empty, either numeric or DatTime, null/nothing value.
Dec 2 '09 #2
Thanks,

can we set a default value of a column to the tablestyle
Dec 3 '09 #3
sanjib65
102 100+
Default value of DataColumn means you have created DataColumn without specifying a value for a property.
Following is the list:

Datatype= string
Maxlength=-1, (no maximum length check is performed)
Unique=False, it allows duplicate values
AllowDBNull=true, (DataColumn does not need to have any value)
Caption=the DatColumn object which is ColumnName property value.
Dec 3 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Programmer | last post by:
Hi All Here is my problem I'm using a SQLDataAdapter and DataSet I use the method FillSchema(myDataset, SchemaType.Source) The problem is that when i Check the default Values of the Dataset...
0
by: Lalit Bhatia | last post by:
Hi, In Datagrid, while setting width of column through GridColumnStyles collection. width does not set to exact width that I am setting in my code. If I set width to 13, it is changed to 130 or...
0
by: Amber | last post by:
There are times when you will need to highlight or otherwise modify the contents of a particular DataGrid row-column value based upon the value in the column. In this example we will select the...
9
by: Paul | last post by:
Hi I have a data grid with a hyperlink column. the colum has numbers like 00001,000002, ect. Just wondering how to get the text value of the cell as tempstring =...
5
by: Lars Netzel | last post by:
Is it possible to asign a default value to a cell in a DataGrid column when using TableStyle as well? I have an ID column with a width= 0 that has to have a default ID value when the user adds...
7
by: Aaron Smith | last post by:
How do I set field default values at runtime? Say I want a check box that is bound to a boolean field to default to false for a certain set of criteria, and then true for others? I also need to do...
0
by: Rani | last post by:
Hi, I'm new to .net and started a project recently. I'm trying to populate a datagrid's first column with default values. The datagrid is of 3 rows and 3 columns. I need to populate the first...
2
by: Billy | last post by:
Change DataGrid EditControl On Data Value Hi, I have a datagrid, and on editing, I want to change the control in the third colunm based on the value of the first column. The value in the...
3
by: triumph | last post by:
Hi, I'm using datagrid where i have some fields generated from sql. I have to include some other fields which have been set as default columns given below. Dim dttad As New DataTable Dim dr...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.