public void Setup_AddHandlers( WebControl Wc , RadAjaxPanel RadAjaxPanel_Target , ClsBindDefinition BindDefinition , bool IsMultipleSelect = false , string Window_Title = "" , double Window_Height = 450 , double Window_Width = 500) { Control_Selection_DataSource So = new Control_Selection_DataSource(); So.Source_ControlID = Wc.ID; So.RadAjaxPanel_TargetID = RadAjaxPanel_Target.ClientID; So.BindDefinition = BindDefinition; So.IsMultipleSelect = IsMultipleSelect; So.Window_Title = Window_Title == "" ? "Selection" : Window_Title; So.Window_Height = Window_Height < 450 ? 450 : Window_Height; So.Window_Width = Window_Width; this.mProperties.List_DataSource.Add(So); Wc.Attributes.Add(@"onclick", @"ShowSelection('" + Wc.ID + "','" + RadAjaxPanel_Target.ClientID + "', '" + So.Window_Title + "', " + So.Window_Height + ", " + So.Window_Width + "); return false;"); }
Int64 Process_SelectedSingle(Control_Selection_DataSource DataSource) { Int64 SelectedID = 0; if (this.Grid_Selection.pGrid.SelectedItems.Count > 0) { SelectedID = Do_Methods.Convert_Int64((this.Grid_Selection.pGrid.SelectedItems[0] as GridDataItem).GetDataKeyValue(DataSource.BindDefinition.KeyName)); } return SelectedID; }
List<Int64> Process_SelectedMultple(Control_Selection_DataSource DataSource) { List<Int64> Selected = new List<Int64>(); foreach (GridItem Gi in this.Grid_Selection.pGrid.SelectedItems) { Selected.Add((Int64)(Gi as GridDataItem).GetDataKeyValue(DataSource.BindDefinition.KeyName)); } return Selected; }