صباح الخير
لدي داتا جريد أريد وضع عدد العناصر الموجودة فيها في ال pager لهذا قمت بإنشاء class جديدة ترث من DataGrid وأضفت ديناميكيا Label إلى ال pager
ولكن عند ظهورها يظهر الخطأ التالي :
Specified argument was out of the range of valid values. Parameter name: index
والكود الذي أدى لذلك هو :
protected override void OnPreRender(System.EventArgs e)
Line 76: {
Line 77: Control c1 = this.Controls[0];
Line 78: Control c2 = c1.Controls[c1.Controls.Count - 1];
Line 79: Label lblNumRecords = c2.FindControl("lblNumRecords") as Label;
أرجو حل هذه المشكلة لأني بحاجة ماسة لها
ولكم جزيل الشكر