Hello
I have a complex grid with a GridButtonColumn where I want to set some parameters in codebehind. I'm using RadGrid1_PreRender for this.
Strangely, it only works after I used the pager to change page and not on first load...
What am I missing here? I also Page_Load, Page_PreRender, OnColumnCreated, still it just never works on first load and it's driving me insane :/
Thanks!!
protected void GridMaster_PreRender(object sender, EventArgs e) { foreach (GridColumn col in GridMaster.MasterTableView.Columns) { if (col.UniqueName == "DeleteEntryCommand") { var deleteColum = col as GridButtonColumn; // deleteColum.ConfirmText = RessourceHelper.GetRessource(name: "KontraktLoeschenBestaetigen", kurzText: false, textIfEmpty: "Soll der Kontrakt wirklich gelöscht werden?", languageId: null); deleteColum.ConfirmTitle = RessourceHelper.GetRessource(name: "KontraktLoeschenBestaetigenTitel", kurzText: false, textIfEmpty: "Kontrakt löschen", languageId: null); deleteColum.ConfirmTextFormatString = RessourceHelper.GetRessource(name: "KontraktLoeschenBestaetigen", kurzText: false, textIfEmpty: "Soll der Kontrakt {0} wirklich gelöscht werden?", languageId: null); deleteColum.ConfirmTextFields = new string[] { "Referenz" }; } } }
<telerik:GridButtonColumn UniqueName="DeleteEntryCommand" CommandName="Delete" ConfirmDialogType="RadWindow" ConfirmDialogWidth="300" ConfirmDialogHeight="150" Text="" ItemStyle-HorizontalAlign="Center" ItemStyle-CssClass="radGridDeleteColumn" ButtonCssClass="fa fa-trash-o fa-1x radGridDeleteButton"> <HeaderStyle Width="40" /></telerik:GridButtonColumn>
