In the code below Item Command of grid with IdrgAttendenceDetails is not getting fired when a link button present in a template column which is created dynamically in code behind is clicked. Please have a look at the code and specify a answer for it thank you.
public partial class AttendenceDetailsGrid : System.Web.UI.UserControl
#region Properties Declarations
/// Business Layer Objects Declared to Reterive or Save Data To DataBase.
AttendenceDetailsDAO objAttendenceDetailsDAO = new AttendenceDetailsDAO();
AttendenceDetailsEntities objAttendenceDetailsEntities = new AttendenceDetailsEntities();
AttendenceDAO objAttendenceDAO = new AttendenceDAO();
AttendenceEntities objAttendenceEntities = new AttendenceEntities();
<asp:LiteralID="ltlNoRecords"runat="server"Text="No Records To Display"></asp:Literal>
1 Answer, 1 is accepted
answered on 28 Nov 2012, 06:45 AM
You could resolve your issue by creating the RadGrid control in the Page_Init method. As described in the help article below - Creating columns in the Page_Load event handler does not work for template columns. For the controls inside a template to persist their ViewState, the grid must be generated completely in the code-behind using the Page_Init event (see below). That way, template controls are instantiated before the LoadViewState event of the page.
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.