the 2 examples provided does not extract individual textbox property from edit form. I've built my entire grid through code behind. But I can not extract the new value thats being changed in the edit mode.
| protected void CreateGrids(RadPageView PageView) |
| { |
| Control Control = new Control(); |
| RadGrid temp = new RadGrid(); |
| temp.ID = "RadGrid_" + PageView.ID; |
| temp.Skin = "Hay"; |
| temp.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top; |
| temp.AutoGenerateColumns = false; |
| temp.Width = 500; |
| //temp.ItemDataBound += RadGrid1_ItemDataBound; |
| temp.AllowAutomaticInserts = false; |
| temp.AllowAutomaticUpdates = false; |
| temp.AllowAutomaticDeletes = false; |
| temp.InsertCommand += new GridCommandEventHandler(RadGrid_Insert); |
| temp.UpdateCommand += new GridCommandEventHandler(RadGrid_Update); |
| temp.DeleteCommand += new GridCommandEventHandler(RadGrid_Delete); |
| //temp.ItemCommand +=new GridCommandEventHandler(RadGrid_Commands); |
| temp.EnableViewState = false; |
| temp.MasterTableView.EditMode = GridEditMode.EditForms; |
| if (PageView.ID == "Address") |
| { |
| //temp.NeedDataSource += new GridNeedDataSourceEventHandler(this.tem temp_NeedDataSource); |
| GridEditCommandColumn EditColumn = new GridEditCommandColumn(); |
| temp.MasterTableView.Columns.Add(EditColumn); |
| GridBoundColumn AddressColumn = new GridBoundColumn(); |
| temp.MasterTableView.Columns.Add(AddressColumn); |
| AddressColumn.DataField = "Address"; |
| AddressColumn.HeaderText = "Address"; |
| AddressColumn.UniqueName = "Address"; |
| GridBoundColumn AddressColumn2 = new GridBoundColumn(); |
| temp.MasterTableView.Columns.Add(AddressColumn2); |
| AddressColumn2.DataField = "Address2"; |
| AddressColumn2.HeaderText = "Address2"; |
| AddressColumn2.UniqueName = "Address2"; |
| GridBoundColumn CityColumn = new GridBoundColumn(); |
| temp.MasterTableView.Columns.Add(CityColumn); |
| CityColumn.DataField = "City"; |
| CityColumn.HeaderText = "City"; |
| CityColumn.UniqueName = "City"; |
| GridBoundColumn StateColumn = new GridBoundColumn(); |
| temp.MasterTableView.Columns.Add(StateColumn); |
| StateColumn.DataField = "StateOrRegion"; |
| StateColumn.HeaderText = "State"; |
| StateColumn.UniqueName = "State"; |
| GridBoundColumn ZipColumn = new GridBoundColumn(); |
| temp.MasterTableView.Columns.Add(ZipColumn); |
| ZipColumn.DataField = "PostalCode"; |
| ZipColumn.HeaderText = "Zip Code"; |
| ZipColumn.UniqueName = "PostalCode"; |
| GridButtonColumn DeleteColumn = new GridButtonColumn(); |
| temp.MasterTableView.Columns.Add(DeleteColumn); |
| DeleteColumn.CommandName = "Delete"; |
| DeleteColumn.Text = "Delete"; |
| DeleteColumn.ButtonType = GridButtonColumnType.ImageButton; |
| temp.DataSource = SynergieEMR.GetAddress(new Guid("992740df-ebac-4409-854a-0a16637c8b00")); |
| } |
| else if (PageView.ID == "Phone") |
| { |
| GridBoundColumn TypeColumn = new GridBoundColumn(); |
| temp.MasterTableView.Columns.Add(TypeColumn); |
| TypeColumn.DataField = "Type"; |
| TypeColumn.HeaderText = "Type"; |
| TypeColumn.UniqueName = "Type"; |
| GridBoundColumn ContactNumberColumn = new GridBoundColumn(); |
| temp.MasterTableView.Columns.Add(ContactNumberColumn); |
| ContactNumberColumn.DataField = "ContactNumber"; |
| ContactNumberColumn.HeaderText = "Contact Number"; |
| ContactNumberColumn.UniqueName = "ContactNumber"; |
| GridBoundColumn NotesColumn = new GridBoundColumn(); |
| temp.MasterTableView.Columns.Add(NotesColumn); |
| NotesColumn.DataField = "SpecialInstructions"; |
| NotesColumn.HeaderText = "Notes"; |
| NotesColumn.UniqueName = "Notes"; |
| GridButtonColumn DeleteColumn = new GridButtonColumn(); |
| DeleteColumn.CommandName = "Delete"; |
| DeleteColumn.Text = "Delete"; |
| DeleteColumn.ButtonType = GridButtonColumnType.ImageButton; |
| temp.MasterTableView.Columns.Add(DeleteColumn); |
| temp.DataSource = SynergieEMR.GetTeleCommunications(new Guid("992740df-ebac-4409-854a-0a16637c8b00")); |
| } |
| else if (PageView.ID == "Email") |
| { |
| GridBoundColumn TypeColumn = new GridBoundColumn(); |
| temp.MasterTableView.Columns.Add(TypeColumn); |
| TypeColumn.DataField = "Type"; |
| TypeColumn.HeaderText = "Type"; |
| TypeColumn.UniqueName = "Type"; |
| GridBoundColumn ContactNumberColumn = new GridBoundColumn(); |
| temp.MasterTableView.Columns.Add(ContactNumberColumn); |
| ContactNumberColumn.DataField = "ContactAddress"; |
| ContactNumberColumn.HeaderText = "Email Address"; |
| ContactNumberColumn.UniqueName = "ContactAddress"; |
| GridBoundColumn NotesColumn = new GridBoundColumn(); |
| temp.MasterTableView.Columns.Add(NotesColumn); |
| NotesColumn.DataField = "SpecialInstructions"; |
| NotesColumn.HeaderText = "Notes"; |
| NotesColumn.UniqueName = "Notes"; |
| GridButtonColumn DeleteColumn = new GridButtonColumn(); |
| DeleteColumn.CommandName = "Delete"; |
| DeleteColumn.Text = "Delete"; |
| DeleteColumn.ButtonType = GridButtonColumnType.ImageButton; |
| temp.MasterTableView.Columns.Add(DeleteColumn); |
| temp.DataSource = SynergieEMR.GetECommunication(new Guid("992740df-ebac-4409-854a-0a16637c8b00")); |
| } |
| //temp.DataBind(); |
| Control.Controls.Add(temp); |
| PageView.Controls.Add(Control); |
| } |