Windows Develop Bookmark and Share   
 index > Windows Forms General > have any component look like the ISA time planning for c#?
 

have any component look like the ISA time planning for c#?

please look the picture as below,i would like to do like that asISA time planning

http://img519.imageshack.us/img519/6673/timeiw5.jpg

any component can do that or how can create that

thanks

lyredlee  Wednesday, August 13, 2008 7:37 AM

Hi lyredlee,

As far as I can understand, the problem is “how to create a control like ISA time planning?�

We can use DataGridView to accomplish this goal. The following is the steps you will try:

1. Drag a DataGridView from the ToolBox.

2. Add Columns as many as you need.

3. Set the width of the column to 10pix or a value that can make it more like the time interval in the ISA time planning control.

4. Set AllowUserToAddRows property of DataGridView to false. So that you will not see ��in the last row.

5. Set the RowHeaderText by using DataGridViewRow.headCell.Value=�***� * represents text what you want to put.

By using DataGridView, you can take advantage of the powerful functionalities provide by it.

If you have further problems, please don’t hesitate to let me know.

Best Regards,

Bruce Zhou

Windows Forms General FAQs
Windows Forms Data Controls and Databinding FAQs

Bruce.Zhou  Monday, August 18, 2008 6:33 AM

Hi lyredlee,

We can change the background colorof the selected cells.

Assume there is button which makes the current selected cells active. Click this button will change the background of the selected to blue. Please try the following code:

Code Snippet

foreach (DataGridViewCell cell in this.dataGridView1.SelectedCells)

{

cell.Style.BackColor = Color.Red;

}

If you want to makes the current selected cells inactive, you can change the background to white again using the same way.

Best Regards,

Bruce Zhou

Windows Forms General FAQs
Windows Forms Data Controls and Databinding FAQs

Bruce.Zhou  Tuesday, August 19, 2008 1:37 AM

Hi lyredlee,

As far as I can understand, the problem is “how to create a control like ISA time planning?�

We can use DataGridView to accomplish this goal. The following is the steps you will try:

1. Drag a DataGridView from the ToolBox.

2. Add Columns as many as you need.

3. Set the width of the column to 10pix or a value that can make it more like the time interval in the ISA time planning control.

4. Set AllowUserToAddRows property of DataGridView to false. So that you will not see ��in the last row.

5. Set the RowHeaderText by using DataGridViewRow.headCell.Value=�***� * represents text what you want to put.

By using DataGridView, you can take advantage of the powerful functionalities provide by it.

If you have further problems, please don’t hesitate to let me know.

Best Regards,

Bruce Zhou

Windows Forms General FAQs
Windows Forms Data Controls and Databinding FAQs

Bruce.Zhou  Monday, August 18, 2008 6:33 AM

Thanks Bruce

but i want to have the function of calendar,which when i selected the dateand i set the day to active,that i want the selected cell will print blue for that,and when i set it to inactive,the day will be appear blank for this

lyredlee  Monday, August 18, 2008 3:42 PM

Hi lyredlee,

We can change the background colorof the selected cells.

Assume there is button which makes the current selected cells active. Click this button will change the background of the selected to blue. Please try the following code:

Code Snippet

foreach (DataGridViewCell cell in this.dataGridView1.SelectedCells)

{

cell.Style.BackColor = Color.Red;

}

If you want to makes the current selected cells inactive, you can change the background to white again using the same way.

Best Regards,

Bruce Zhou

Windows Forms General FAQs
Windows Forms Data Controls and Databinding FAQs

Bruce.Zhou  Tuesday, August 19, 2008 1:37 AM

You can use google to search for other answers

Custom Search

More Threads

• Reading values from Grid
• Can not fire ItemCommand event of in datagrid
• Controlling number of lines in datagridview column headers
• 2D grid
• Open *.msg file in contro in form
• Owner Draw ContextMenu
• Threading & Events Causing Cross Thread Problems
• printing labels from Windows Forms..
• menu event question
• System.Web.Mail