TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Arun Kurmi
NA
104
103.5k
TreeView Control in C#
Mar 8 2013 2:33 AM
hi friends,
(1) In below code how to add day node.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Globalization;
namespace msg
{
public partial class TreeViewControl : Form
{
public TreeViewControl()
{
InitializeComponent();
}
private void TreeViewControl_Load(object sender, EventArgs e)
{
//System.Globalization.DateTimeFormatInfo d = new System.Globalization.DateTimeFormatInfo();
DateTimeFormatInfo d = new DateTimeFormatInfo();
for (int yearnum = 1989; yearnum <= 2013; yearnum++)
{
TreeNode yearnode = new TreeNode();
yearnode.Text = yearnum.ToString();
treeView1.Nodes.Add(yearnode);
for (int monthnum = 0; monthnum < 12; monthnum++)
{
TreeNode monthnode = new TreeNode();
//monthnode.Text = monthnum.ToString();
//monthnode.Text=DateTimeFormatInfo.CurrentInfo.MonthNames[monthnum].ToString();
monthnode.Text =d.MonthNames[monthnum].ToString();
yearnode.Nodes.Add(monthnode);
}
}
}
}
}
(2) where i found complete hierarchy of namespace their class and their methods and properties because sometimes i faced problem "You are missing directive or an assembly reference ".
Reply
Answers (
2
)
SQL Server Restore Database From Backup File with C#
Can I assign either integer or char value to a variable?