protected override void Page_Load(object sender, EventArgs e) { base.Page_Load(sender, e); this.Selection.Setup(this.pCurrentUser); ClsBindDefinition BindDef = new ClsBindDefinition(); BindDef.DataSourceName = "RecruitmentTestQuestions"; BindDef.KeyName = "RecruitmentTestQuestionsID"; List<ClsBindGridColumn_Web_Telerik> List_Gc = new List<ClsBindGridColumn_Web_Telerik>(); List_Gc.Add(new ClsBindGridColumn_Web_Telerik("Question", "Question", 200)); BindDef.List_Gc = new List<ClsBindGridColumn>(List_Gc); this.Selection.Setup_AddHandlers(this.Btn_Select, this.RadAjaxPanel1, BindDef, true, "", 600, 600); }
protected override void Page_Init(object sender, EventArgs e) { base.Page_Init(sender, e); ClsBindDefinition BindDef = new ClsBindDefinition(); BindDef.List_Gc = new List<ClsBindGridColumn>(); BindDef.List_Gc.Add(new ClsBindGridColumn_Web_Telerik("Name", "Name", new Unit("90%"))); BindDef.KeyName = "RecruitmentTestUserID"; BindDef.AllowPaging = true; BindDef.AllowSort = true; BindDef.IsPersistent = true; this.Setup( Layer02_Objects._System.Layer02_Constants.eSystem_Modules.User , new ClsUser(this.pCurrentUser) , BindDef , true , true); }
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;"); }