I'd like to know if the two dates are further than 3 days apart. How do I do this comparison? Is there a more efficient way than this?
var date = datePickerFrom.GetDate();
date.setDate(date.getDate() + 3);
var toDate = datePickerTo.GetDate();
if( toDate <= date )
.....
Thanks for your help.
| private void Form1_Load(object sender, EventArgs e) |
| { |
| DataTable dt = new DataTable(); |
| dt.Columns.Add("From", typeof(bool)); |
| dt.Columns.Add("To", typeof(bool)); |
| dt.Columns.Add("Description", typeof(string)); |
| dt.Rows.Add(false, false, "hi1"); |
| dt.Rows.Add(false, false, "hi2"); |
| dt.Rows.Add(false, false, "hi3"); |
| dt.Rows.Add(false, false, "hi4"); |
| dt.Rows.Add(false, false, "hi5"); |
| dt.Rows.Add(false, false, "hi5"); |
| dt.Rows.Add(false, false, "hi6"); |
| radGridView1.MasterGridViewTemplate.AutoGenerateColumns = false; |
| radGridView1.Columns.Add(new GridViewBooleanColumn("From")); |
| radGridView1.Columns[0].IsPinned = true; |
| radGridView1.Columns.Add(new GridViewBooleanColumn("To")); |
| radGridView1.Columns[1].IsPinned = true; |
| radGridView1.Columns.Add(new GridViewTextBoxColumn("Description")); |
| radGridView1.Columns[2].ReadOnly = true; |
| radGridView1.SelectionMode = GridViewSelectionMode.CellSelect; |
| radGridView1.DataSource = dt; |
| } |
Hi all,
this is my question,
if I press Ctrl+Tab, I can browse through the opened documents/panels.
I can disable this feature by "dockingManager.UseQuickNavigator = false" property); I would like to assign this shortcut key (Ctrl+tab) to a custom function written by me, but I'm not able to catch this event (Ctrl+tab does not reach the keydown event).
How can I assign the Ctrl+tab shortcut to a function written by me?
Thanks in advance for the answer.
Stefano
| private void Form1_Load(object sender, EventArgs e) | |
| { | |
| DataTable dt = new DataTable(); | |
| dt.Columns.Add("From", typeof(bool)); | |
| dt.Columns.Add("To", typeof(bool)); | |
| dt.Columns.Add("Description", typeof(string)); | |
| dt.Rows.Add(false, false, "hi1"); | |
| dt.Rows.Add(false, false, "hi2"); | |
| dt.Rows.Add(false, false, "hi3"); | |
| dt.Rows.Add(false, false, "hi4"); | |
| dt.Rows.Add(false, false, "hi5"); | |
| dt.Rows.Add(false, false, "hi5"); | |
| dt.Rows.Add(false, false, "hi6"); | |
| radGridView1.MasterGridViewTemplate.AutoGenerateColumns = false; | |
| radGridView1.Columns.Add(new GridViewBooleanColumn("From")); | |
| radGridView1.Columns[0].IsPinned = true; | |
| radGridView1.Columns.Add(new GridViewBooleanColumn("To")); | |
| radGridView1.Columns[1].IsPinned = true; | |
| radGridView1.Columns.Add(new GridViewTextBoxColumn("Description")); | |
| radGridView1.Columns[2].ReadOnly = true; | |
| radGridView1.Columns[2].Width = 1000; | |
| //ConditionalFormattingObject item = new ConditionalFormattingObject("ruleName", | |
| // ConditionTypes.LessOrEqual, "aa", string.Empty, true); | |
| //item.CellBackColor = Color.White; | |
| //item.RowBackColor = Color.White; | |
| //radGridView1.Columns[0].ConditionalFormattingObjectList.Add(item); | |
| //item = new ConditionalFormattingObject("ruleName", | |
| // ConditionTypes.LessOrEqual, "aa", string.Empty, true); | |
| //item.CellBackColor = Color.White; | |
| //item.RowBackColor = Color.White; | |
| //radGridView1.Columns[1].ConditionalFormattingObjectList.Add(item); | |
| radGridView1.SelectionMode = GridViewSelectionMode.FullRowSelect; | |
| radGridView1.DataSource = dt; | |
| } |
how can i mimic the office2007 ColorMenu?
the image
http://picasaweb.google.com/chaco.zhao/Question/photo#5155168280711845058
thank you
ps: I implement ColorMenu in the way of RadGralleryElement, but fail.