L LL Dec 11, 2003 #1 Hi, I'm using DBGrid. Can I add a caption "Page:" in front of the PageNumber: Page: 1.2.... Thanks.
S Suresh Dec 11, 2003 #2 Yes you can. You have to find the Pager row and stick the literal Page in their. To do that wire the datagrid's ItemCreated event with the following method. private void dgTest_ItemCreated(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e) { try { if (e.Item.ItemType == ListItemType.Pager) { TableCell pc = new TableCell(); pc = (TableCell)e.Item.Controls[0]; string strPg = "<b>Page: </b>"; pc.Controls.AddAt(0, new LiteralControl(strPg)); } } catch() { } } That should do it. Suresh.
Yes you can. You have to find the Pager row and stick the literal Page in their. To do that wire the datagrid's ItemCreated event with the following method. private void dgTest_ItemCreated(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e) { try { if (e.Item.ItemType == ListItemType.Pager) { TableCell pc = new TableCell(); pc = (TableCell)e.Item.Controls[0]; string strPg = "<b>Page: </b>"; pc.Controls.AddAt(0, new LiteralControl(strPg)); } } catch() { } } That should do it. Suresh.