Hi Telerik experts,
Can you say me how to get the value of a groupheader, actually i can get the text based on your sample, also i can get the groupindex, but i can't get the value set into FieldName="SubDiarioID"
Can you say me how to get the value of a groupheader, actually i can get the text based on your sample, also i can get the groupindex, but i can't get the value set into FieldName="SubDiarioID"
protected void tk_Grid_PreRender(object sender, EventArgs e) |
{ |
foreach (GridGroupHeaderItem groupHeader in tk_Grid.MasterTableView.GetItems(GridItemType.GroupHeader)) |
{ |
string strtxt = groupHeader.DataCell.Text; // accessing the groupheader text |
string strGroupIndex = groupHeader.GroupIndex; |
LinkButton hyperlnk = new LinkButton(); // creting new link |
hyperlnk.Text = strtxt.Substring(8,strtxt.Length-8); |
hyperlnk.CssClass = "gridtextbold"; |
hyperlnk.Attributes.Add("OnClick", "return AbreVentana('ConsolidadoDiarioAuxiliar.aspx','Consolidado');"); |
groupHeader.DataCell.Controls.Clear(); |
groupHeader.DataCell.Controls.Add(hyperlnk); // adding link to the groupheader |
} |
} |
<GroupByExpressions > |
<telerik:GridGroupByExpression > |
<GroupByFields > |
<telerik:GridGroupByField FieldName="SubDiarioID" FormatString="{0:g}" /> |
</GroupByFields> |
<SelectFields> |
<telerik:GridGroupByField FieldName="BESubDiarios.NombreSubDiario" HeaderText="Cuenta" /> |
</SelectFields> |
</telerik:GridGroupByExpression> |
</GroupByExpressions> |
<GroupHeaderItemStyle HorizontalAlign="Left" CssClass="gridtext" /> |