NineRays
Total Posts:0
Joined:12/26/2024
[quote="lidds"]I have a flygrid with two columns 1) attribute 2) value what I want to be able to do is at runtime add a row that has the word "date" in column1 and a datetimepicker control in column2 (column 2 however will not always contain datetime, could be text, dropdown etc.)
1) How would I do this in vb.net?
See the Grid Stylizing VB.Net sample - you can use for these purposes DateTimeColumn. This type of column supports datetimepicker as dropdown. Also you can set FormatString property to format date/time values for displaying.
[quote="lidds"]
2) How can I add a value to that cell i.e. 12/08/2005?
C#:
datetimeColumn.SetValue(someNode, new DateTime(2005, 08, 12));
or
flyGrid.Rows.Items.Add(new Node(new object[]{"Current Date", new DateTime(2005, 08, 12)}));
or
NodeBase node = flyGrid.Rows.Items[10];
object[] value = node.Value as object[];
value[1] = DateTime(2005, 08, 12);
[quote="lidds"]
3) Is it possible to have the cell in this format 12/08/2005 rather than 12/08/2005 15:35:01 ?
Also in this version of flygrid are you able to have nothing in this datetime cell, if I remember the earlier version would always put something like -00/00/0000 00:00:00?
I have looked at your vertical grid example but still could not figure it out.