Skip to main content

Posts

c# - How to add multiple columns at once to a DataTable

Add multiple columns to a DataTable at once The DataTable class represents one table of in-memory data. The DataTable objects are conditionally case-sensitive. To create a DataTable programmatically the asp.net developers must first define its schema by adding DataColumn objects to the DataColumnCollection. To add rows to a DataTable, the developers must first use the NewRow() method to return a new DataRow object. The DataTable also contains a collection of Constraint objects that can be used to ensure the integrity of the data. The following asp.net c# tutorial code demonstrates how we can add multiple columns to a DataTable at once. So we have to insert multiple DataColumn objects into a DataTable instance at the same time. Here we used the DataTable class Columns property to get its columns collection as a DataColumnCollection object. Then we used DataColumnCollection’s AddRange() method to insert multiple columns into the DataTable insta...

c# - How to add an expression column to a DataTable

Add an expression column to a DataTable The DataTable class represents one table of in-memory data. The DataTable objects are conditionally case-sensitive. To create a DataTable programmatically the asp.net developers must first define its schema by adding DataColumn objects to the DataColumnCollection. To add rows to a DataTable, the developers must first use the NewRow() method to return a new DataRow object. The DataTable also contains a collection of Constraint objects that can be used to ensure the integrity of the data. The following asp.net c# tutorial code demonstrates how we can add a calculated/expression column to a DataTable. Here we will add a DataColumn to the DataTable whose column value is the sum of two columns. Here we used the DataTable class Columns property to get its columns collection as a DataColumnCollection object. Then we used DataColumnCollection’s Add() method to add an expression DataColumn to the DataTable. ...

c# - How to create a DataTable

Create a DataTable A DataTable represents one table of in-memory relational data. The .NET developers can create a DataTable object by the following DataTable constructors DataTable(), DataTable(String), DataTable(SerializationInfo, StreamingContext), and DataTable(String, String). DataTable() constructor initializes a new instance of the DataTable class with no arguments. The DataTable(String) constructor initializes a new DataTable class with a specified table name. DataTable(SerializationInfo, StreamingContext) constructor initializes a new DataTable class with SerializationInfo and StreamingContext. DataTable(String, String) constructor initializes a new DataTable class with a specified table name and namespace. .NET developers can also create DataTable objects by using the DataAdapter object's Fill or FillSchema methods within a DataSet. They also can create DataTable objects by ReadXml, ReadXmlSchema, or InferXmlSchema methods of DataS...

CFMAP - Generate an earth type google map in ColdFusion

CFmap - earth type Google map cfmaptypeearth.cfm <!DOCTYPE html"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>cfmap tag - how to generate earth type google map in coldfusion</title> </head> <body style="margin:5px 5px 5px 15px;"> <h2 style="color:IndianRed; font-style:italic"> cfmap tag - how to generate earth <br /> type google map in coldfusion </h2> <hr width="525" align="left" color="Pink" /> <br /> <!--- Generate a Google map api key for this domain http://localhost:8500/ ---------------- Use your own google map api key to test this example ---> <cfajaximport params="#{googlemapkey='please use your own google map api key here'}#"> <cfmap centeraddress="Nebraska" heigh...

CFMAP - How to change google map marker color in ColdFusion

CFmap - Marker color in Google map cfmapmarkercolor.cfm <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>cfmap tag - how to change marker color in google map in coldfusion</title> </head> <body style="margin:5px 5px 5px 15px;"> <h2 style="color:DarkBlue; font-style:italic"> cfmap tag - how to change marker color <br /> in google map in coldfusion </h2> <hr width="525" align="left" color="DarkBlue" /> <br /> <!--- Generate a Google map api key for this domain http://localhost:8500/ ---------------- Use your own google map api key to test this example ---> <cfajaximport params="#{googlemapkey='please use your own google map api key here'}#"> <table> <tr> <td> ...

Generate a google map with specific latitude and longitude in ColdFusion

cfmap - generate google map with specific latitude and longitude as map center address cfmaplatitudelongitude.cfm <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>How to generate google map with specific latitude and longitude as map center address</title> </head> <body style="margin:5px 5px 5px 15px;"> <h2 style="color:DarkBlue; font-style:italic"> How to generate google map with specific <br /> latitude and longitude as map center address </h2> <hr width="525" align="left" color="DarkBlue" /> <br /> <!--- Generate a Google map api key for this domain http://localhost:8500/ ---------------- Use your own google map api key to test this example ---> <cfajaximport params="#{googlemapkey='please use you...

CFAJAXIMPORT to specify Google map API Key in ColdFusion

CFajaximport - params attribute to specify Google map API Key cfajaximportparams.cfm <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>How to use cfajaximport params attribute to specify Google map API Key in coldfusion</title> </head> <body style="margin:5px 5px 5px 15px;"> <h2 style="color:DarkBlue; font-style:italic"> How to use cfajaximport params attribute <br /> to specify Google map API Key in coldfusion </h2> <hr width="400" align="left" color="PowderBlue" /> <br /> <!--- Generate a Google map api key for this domain http://localhost:8500/ ---------------- Use your own google map api key to test this example ---> <cfajaximport params="#{googlemapkey='please use your own Google map API Key here...