Files
NKC/NKC_WF/WebUserControls/mod_lemmiVocab.ascx.cs
T
Samuele E. Locatelli 3031566e5d More cleanup on code
2020-07-15 18:57:57 +02:00

53 lines
1.4 KiB
C#

using SteamWare;
using System;
using System.Web.UI.WebControls;
namespace NKC_WF.WebUserControls
{
public partial class mod_lemmiVocab : ApplicationUserControl
{
#region protected
protected override void aggiornaControlliDataGL()
{
base.aggiornaControlliDataGL();
grView.PageSize = _righeDataGridAnagr;
}
protected void grView_DataBound(object sender, EventArgs e)
{
if (grView.Rows.Count > 0)
{
LinkButton lb;
// aggiorno gli headers
foreach (TableCell cella in grView.HeaderRow.Cells)
{
try
{
lb = (LinkButton)cella.Controls[0];
lb.Text = traduci(lb.Text);
}
catch
{ }
}
int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1);
lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord);
}
else
{
lblNumRec.Text = "";
}
}
/// <summary>
/// aggiorna i dati mostrati
/// </summary>
public void doUpdate()
{
ods.DataBind();
grView.DataBind();
}
#endregion
}
}