.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

.NET Column: Array Types in .NET

Posted By:      Posted Date: August 21, 2010    Points: 0   Category :ASP.Net

More Related Resource Links

What lists and what column types allow for setting "column default value settings"

There is a new setting for lists in 2010 called "Column default value settings". What lists does this setting apply to (I think just lists with a base template of Document Library)? And for what column types is it available? It was available on a "Single line of text" column but not a lookup column. Thanks in advance!

New column to existing content types

HI, How can I add a new column to existing content type. The field shoule be reflected to new lists created using the content type as well to old lists created using the content type. None of functionalities associated with old lists should get affected. Thanks,kesari suresh

supported column types that can be used as additional fields with a Lookup column?

Can anyone tell me which types of columns can be used as additional fields for a Lookup column? Are they the same as the column types that can be used to create Lookup columns? Choice columns are currently not available (known issue) but I think they are officially supported. What about Managed Metadata columns? Thanks

Array in gridview column

Working with Visual Studio 2010 in VB - and sorry, I'm a noob !Can't find the answer to this anywhere, and I'm getting nowhere...I have a SQLDataSource filling a Gridview.  One of the columns is "Priority", SQL offers 1, 2, 3 or 4.  This is displayed in the Priority column.I want to translate 1, 2, 3 & 4 into Low, Medium, High and Extreme.I figure I need to do this with an array - there is lots of info on how to create an array, and I've done this in the code behind like this:-Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load        Dim arrPriority(3) As String        arrPriority(0) = "Low"        arrPriority(1) = "Medium"        arrPriority(2) = "High"        arrPriority(3) = "Extreme"    End SubIn my gridview, I have changed the "Priority" column to a Templatefield, which looks like this:-<asp:TemplateField HeaderText="Priority" SortExpression="job_priority"> <EditItemTemplate> <asp:TextBox ID="TextBox1" runat="server" Text='<%# Eval("arrPriority") %>

Content Types: Title Column Rename Issue


Hi All

i have created Custom Content Type.
Name: TestCP
Desc: Testcp
Select parent Content type from: List Content Types
Parent Content Type: Task
existing Group; Custom Centent Types.
Clicked Ok

-- Custom Content type successfully created. Now i clicked on Title column name and renamed To Action Title.
Radio button was seledted(Required(must Contain information))
Radio button was seledted(Update all content types inheriting from this type? Yes)

Clicked Ok.

it has remaned all the title columns of site collection.

Now when iam trying to rename it back its giving an error "The column name that you entered is already in use or reserved. Choose another name"

Please help me out to get it back.

thanks in Advance.

Column Name - cannot convert between unicode & nonunicode string data types



Im using the OLEDB Source to connect the source columns. But its throwing an error msg Column Name - cannot convert between unicode & nonunicode string data types. Could you please provide me the oracle code so that I can use with the select statement. For some of the schemas I have chaged the data types using the derived column before the OLEDB destination.

Actually, one of my team member suggested me to use the Oracle char(2) in the select statement. Can any one help me with the code so that I can use it for the rest of the columns.

Eg source(External Column) - CreatedBYID - DT_wstr(18)

Source - Output cloumn - CreatedById - DTStr(18)



Deserializing a JSON array of mixed types



I'm having trouble deserializing a JSON array of mixed types using the DataContractJsonSerializer class. I've spent a bunch of time looking for a solution to no avail, so I thought I'd go ahead and ask here.

Basically, I am getting a JSON string like the one below. I'd like to get the array to deserialize into an List where position 0 has an Int32, position 1 has a String, and position 2 has an instance of my custom class.

"Mr. Smith",
"name":"main street",

VB.NET Linq - Multiple column Group By using Anonymous types does not work properly


I am attemping to do a multiple column group by in linq using VB.  I've followed a code sample i obtained at the following url:


the sample code is:

GroupBy - Multiple Columns

This sample uses Group By to group products by CategoryID and SupplierID.

Public Sub LinqToSqlGroupBy09()
    Dim categories = From p In db.Products _
                     Group By Key = New With {p.CategoryID, p.SupplierID} Into Group _
                     Select Key, Group

    ObjectDumper.Write(categories, 1)
End Sub

My code result though is not correct, as i am getting duplicates.   The first query is using the data which is stored in a datatable.  The second table pulls the data from a list of objects which i manually built in an effort to get closer to the Example provided above.

Dim listNamesWithSeverity = From myrow As DataRow In dt.Rows _

Changing existing column types


Is there a proper way to change an OOTB column's data type?

Microsoft have created columns using nearly all the common column names but several of them are not the right type for our organisation. It will bequite a nuisence if we have to create new ones prefixed with something to make them unique.

Trying to understand Array being reference types


Below I'm pasting a simple application to roll 5 die 10 times and display each roll on screen.  the problem I'm having is that the output will look like this


3  4  6  3  1
3  4  6  3  1
3  4  6  3  1

but when i step through I different values for each roll

Here's the code


namespace DiceRoller
    class DiceManager
        private int numOfDice;
        private int[] diceRoll;

        public DiceManager(int numOfDice)
            NumOfDice = numOfDice;

        public int NumOfDice
            get { return numOfDice; }
            set { numOfDice = value; }

        public int[] DiceRoll
            get { return diceRoll; }
        // Roll dice and sets the diceRoll Array to values between 1 and 6.
        private void RollDice()
            diceRoll = new int[NumOfDice];
            Random rand = new Random();
            for (int i = 0; i < diceRoll.Length; i++)
                diceRoll[i] = rand.Next(1, 6);

        public void DisplayResults()
            foreach( int dieValue in diceRoll )
                Console.Write("{0}\t", dieValue);

SharePoint Tutorial - Content Types

SharePoint content types provide users with a way to manage and organize content in a more meaningful way. It's a reusable of settings you want to apply to a particular type of document in a library or item in a list.

UML Diagram Types

UML provides a number of diagram types as a mechanism for entering model elements into the model and showing overlapping sets of models elements and their relationships. UML does not specify what diagrams should be created or what they should contain, only what they can contain and the rules for connecting the elements. The diagram types include:

UML Diagram Types - 2

Further diagram types include:

Activity Diagrams - a generic flow chart used much in business modelling and sometimes in use case modelling to indicate the overall flow of the use case. This diagram type replaces the need for dataflow diagrams but is not a main diagram type for the purposes of analysis and design.

Tooltip for GridView Column Headers (ASP.Net)

I just wanted to add auto tooltips for my GridView headers. There are couple of ways but I don't want to use javascript and wanted to use simple 'title' attribute. It took couple of hours to get the working code supporting sortable columns. I thought it will be very useful for others. Here's the code and logic behind it.

Ready made List Types provided by SharePoint

SharePoint provides some out of the box List Types. Some of the most used ready made list types that SharePoint provides currently are listed below:

Tuples, Anonymous Types, and Concrete Types

Tuples can save you a great deal of repetitive tasks. They can also lead to completely unreadable code in a language like C#. Tuples are data values that contain N items. The .NET framework supports tuples containing 1 to 8 members. To use tuples with more than 8 members, you use another tuple for the member of an octtuple
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend