public CellEntry this[uint row, uint column] { get { // let's find the cell foreach (CellEntry entry in this.Entries) { CellEntry.CellElement cell = entry.Cell; if (cell.Row == row && cell.Column == column) { return(entry); } } // if we are here, we need to get the entry from the service string url = CellUri(row, column); CellQuery query = new CellQuery(url); CellFeed feed = this.Service.Query(query) as CellFeed; CellEntry newEntry = feed.Entries[0] as CellEntry; this.Entries.Add(newEntry); // we don't want this one to show up in the batch feed on it's own newEntry.Dirty = false; return(newEntry); } }
private void DoCellInsert() { // If there is data to insert then do so CellEntry entry = new CellEntry(); CellEntry.CellElement cell = new CellEntry.CellElement(); cell.InputValue = this.cellUpdateDataTextBox.Text; cell.Row = UInt32.Parse(this.cellUpdateRowTextBox.Text); cell.Column = UInt32.Parse(this.cellUpdateColumnTextBox.Text); entry.Cell = cell; service.Insert(new Uri(this.worksheetListView.SelectedItems[0].SubItems[1].Text), entry); }