void SamplingResultDataEditor_Ok(object sender, EventArgs e) { if (SamplingResultDataEditor.IsNew) { } else { var editedSamplingResult = from samplingResult in SampleInformation.SamplingResults where samplingResult.Id == ((SamplingResultInfo)SamplingResultDataEditor.DataSource).Id select samplingResult; if (editedSamplingResult.Count() > 0) { editedSamplingResult.ElementAt(0).Copy((SamplingResultInfo)SamplingResultDataEditor.DataSource); SamplerGridViewer.DataBind(); } } SamplingResultDataEditorContainer.Attributes["class"] = "HidePopupEditor"; }
protected void Page_Load(object sender, EventArgs e) { SamplerGridViewer.DataSource = SampleInformation.Samplers; SamplerGridViewer.DataBind(); var sampleGridCommands = from command in SamplerGridViewer.Driver.Columns where command.IsCommand select command.AttachedRenderer; foreach (LinkGINColumnRenderer linkCommand in sampleGridCommands) { linkCommand.Command += new CommandEventHandler(linkCommand_Command); } if (!IsPostBack) { SampleDataEditor.DataSource = SampleInformation; } }