protected override void Page_Load(object sender, EventArgs e) { base.Page_Load(sender, e); if (!this.IsPostBack) { List<ClsBindGridColumn_Telerik> List_Gct = new List<ClsBindGridColumn_Telerik>(); ClsBindGridColumn_Telerik RedirectColumn = new ClsBindGridColumn_Telerik("", "", 50, "", Constants.eSystem_Lookup_FieldType.FieldType_Button); RedirectColumn.mCommandName = "Select"; RedirectColumn.mFieldText = ">>"; List_Gct.Add(RedirectColumn); List_Gct.Add(new ClsBindGridColumn_Telerik("RecruitmentTestQuestionsID", "Question ID", 120)); List_Gct.Add(new ClsBindGridColumn_Telerik("Question", "Question Description", 400)); List_Gct.Add(new ClsBindGridColumn_Telerik("Status_Desc", "Status", 120)); List_Gct.Add(new ClsBindGridColumn_Telerik("UserName_CreatedBy", "Created By", 120)); List_Gct.Add(new ClsBindGridColumn_Telerik("UserName_ApprovedBy", "Approved By", 120)); ClsBindGridColumn_Telerik DeleteColumn = new ClsBindGridColumn_Telerik("", "", 100, "", Constants.eSystem_Lookup_FieldType.FieldType_Button); DeleteColumn.mCommandName = "Delete"; DeleteColumn.mFieldText = "Delete"; List_Gct.Add(DeleteColumn); this.Grid.Setup_WithRequery(this.Master.pCurrentUser, new Layer02_Objects.Modules_Objects.ClsQuestion(), List_Gct); /* List_Gct = new List<ClsBindGridColumn_Telerik>(); List_Gct.Add(new ClsBindGridColumn_Telerik("Name", "Name", 100)); RedirectColumn = new ClsBindGridColumn_Telerik("", "", 50, "", Constants.eSystem_Lookup_FieldType.FieldType_Button); RedirectColumn.mCommandName = "Select"; RedirectColumn.mFieldText = ">>"; List_Gct.Insert(0, RedirectColumn); DeleteColumn = new ClsBindGridColumn_Telerik("", "", 100, "", Constants.eSystem_Lookup_FieldType.FieldType_Button); DeleteColumn.mCommandName = "Delete"; DeleteColumn.mFieldText = "Delete"; List_Gct.Insert(2, DeleteColumn); this.Grid2.Setup(this.Master.pCurrentUser, new Layer02_Objects.Modules_Objects.ClsUser(), List_Gct); */ } }
void BindGrid() { ClsQuestion Obj = (ClsQuestion)this.mObj_Base; List<ClsBindGridColumn_Telerik> List_Gc = new List<ClsBindGridColumn_Telerik>(); List_Gc.Add(new ClsBindGridColumn_Telerik("Lkp_RecruitmentTestAnswersID_Desc", "Answer", 200)); List_Gc.Add(new ClsBindGridColumn_Telerik("IsAnswer", "Is Correct Answer?", 80, "", Constants.eSystem_Lookup_FieldType.FieldType_Checkbox, true, false)); if (!this.mIsReadOnly) { ClsBindGridColumn_Telerik Gc_Button = new ClsBindGridColumn_Telerik("", "Edit", 100, "", Constants.eSystem_Lookup_FieldType.FieldType_Button); Gc_Button.mCommandName = "Edit"; Gc_Button.mFieldText = "Edit"; Gc_Button.mColumnName = "Edit"; Gc_Button.mButtonType = ButtonColumnType.LinkButton; List_Gc.Add(Gc_Button); Gc_Button = new ClsBindGridColumn_Telerik("", "Delete", 100, "", Constants.eSystem_Lookup_FieldType.FieldType_Button); Gc_Button.mCommandName = "Delete"; Gc_Button.mFieldText = "Delete"; Gc_Button.mColumnName = "Delete"; Gc_Button.mButtonType = ButtonColumnType.LinkButton; List_Gc.Add(Gc_Button); } this.RadGrid1.ClientSettings.ClientEvents.OnCommand = "Grid_Command"; Methods_Web_Telerik.BindTelerikGrid(ref this.RadGrid1, Obj.pDt_QuestionAnswer, List_Gc, "TmpKey"); }