or
private void lvMain_DoubleClick(object sender, EventArgs e) { if (lvMain.SelectedItem.GetType() == typeof(ListViewDataItem)) { if (lvMain.SelectedItem.Group == lvMain.Groups[0]) { lvMain.SelectedItem.Group = lvMain.Groups[1]; } else { lvMain.SelectedItem.Group = lvMain.Groups[0]; } } } 
private void radButtonSubmitOrder_Click(object sender, EventArgs e) { SqlConnection conn = new SqlConnection(); dataModel dbstring = new dataModel(); conn.ConnectionString = dbstring.getDBConnString(); conn.Open(); string _insertData = "insert into Items(FormID,Item,Description,UnitsOrdered,UnitCost) values (@FormID,@Item,@Description,@UnitsOrdered,@UnitCost)"; try { SqlCommand cmd = new SqlCommand(_insertData, conn); cmd.Parameters.Add("@FormID", SqlDbType.Int); cmd.Parameters.Add("@Item", SqlDbType.Text); cmd.Parameters.Add("@Description", SqlDbType.Text); cmd.Parameters.Add("@UnitsOrdered", SqlDbType.Int); cmd.Parameters.Add("@Unitcost", SqlDbType.Money); cmd.Parameters["@FormID"].Value = "567891"; cmd.Parameters["@Item"].Value = this.radGridView1.CurrentRow.Cells[0].Value; cmd.Parameters["@Description"].Value = this.radGridView1.CurrentRow.Cells[1].Value; cmd.Parameters["@UnitCost"].Value = this.radGridView1.CurrentRow.Cells[2].Value; cmd.Parameters["@UnitsOrdered"].Value = this.radGridView1.CurrentRow.Cells[3].Value; cmd.ExecuteNonQuery(); } catch (System.Data.SqlClient.SqlException sqlException) { // Write error to Debug output stream System.Diagnostics.Debug.Write(sqlException.Message); } finally { conn.Close(); } }| Appointment Property | Data Type | Length | Example Data | Notes |
| Start | datetime | 01/1/2013 12:00:00 | ||
| End | datetime | 01/1/2013 13:00:00 | ||
| Duration | time | 7 | 01:00:00 | Can this be set to a datetime in older databases? |
| Summary | nvarchar | 255 | Lunch with Steve | Corresponds to Subject |
| Description | ntext | On the corner of 5th and Main | Corresponds to the large textbox without a label (i.e. details, etc.) | |
| Location | nvarchar | 255 | Tony Roma's | |
| Visible | bit/boolean | 1/True | ||
| AllDay | bit/boolean | 0/False | I would expect this to be associated with the All Day checkbox but it's always null in the database | |
| AllowDelete | bit/boolean | 1/True | ||
| AllowEdit | bit/boolean | 1/True | ||
| UniqueID | int/uniqueidentifier | 5 / 6706202d-ca29-40bc-81ab-b2a405c9e929 | I'm not sure what this field is for. Maybe if you don't have Auto-Increment or Row GUID set to true it creates a default value for you. I know that if you do have Auto-Increment set you don't want this property pointing to that field. | |
| BackgroundID | int | 1 | Corresponds to Background color (i.e. category) | |
| StatusID | int | 2 | Corresponds to the "Show time as" drop down | |
| RecurrenceRule | nvarchar | 1024 | FREQ=WEEKLY;BYDAY=MO,TU,WE;WKST=SU | |
| MasterEventID | int/uniqueidentifier | 5 / 6706202d-ca29-40bc-81ab-b2a405c9e929 | This will contain the record id of the parent appointment if an indvidual appointment in a recurrence set has changed. | |
| ResourceID | int/uniqueidentifier | 6 / 1367f9f9-e4af-4036-9821-477fd86b81bf | This not on the appointments table but rather on the table that connects appointments to resources. | |
| RecurrenceId | datetime | 01/1/2013 12:00:00 | Not sure what the point of this field is. It appears to be the Start date/time for an appointment that is an exception of a recurrence. | |
| Resources | This is not a field on the database but rather the name of the relationship between the Appointments table and the AppointmentsResources table. | |||
| Exceptions | This is not a field on the database but rather the name of the relationship between child appointment (i.e. exception) and the parent appointment (master event). |

I'm trying to bind a single row to a Telerik RadGridView in WinForms. Since this list only ever contains one item, it seems inefficient to bind to a "List", even though I know that List only has one item. However, when I try to just bind to a single item in my list, nothing happens. Nothing shows up on my grid, but I don't get an error in the debugger.
This works. GetObjects is a Dal method that returns a List.
List<MyObject> myObjects = MyDal.GetObjects(myID);
this.myGridView.DataSource = myObjects;
The following code does NOT work. GetObject is a Dal method that only returns the first element from a List.
MyObject myObject = MyDal.GetObject(myID);
this.myGridView.DataSource = myObject;
I posted a similar question here .
