Header Problem in Gridview
-
Hi , Can i put Lable or Any Other Control in GridView's HeaderTemplate , i put control in HeaderTemplate and find this Control but its not working Code Label labname = (Lable)(GridView1.Rows[i].FindControl("ControlName")); now labname value show null with Error . The same Conditon works fine if i use Control in ItemTemplate . tell me the Solution .
-
Hi , Can i put Lable or Any Other Control in GridView's HeaderTemplate , i put control in HeaderTemplate and find this Control but its not working Code Label labname = (Lable)(GridView1.Rows[i].FindControl("ControlName")); now labname value show null with Error . The same Conditon works fine if i use Control in ItemTemplate . tell me the Solution .
You have to find that control after databinding and when dataitembound event gets fired in that you will get row if that rrow type is hederrow then you will get that control
-
You have to find that control after databinding and when dataitembound event gets fired in that you will get row if that rrow type is hederrow then you will get that control
Thanx 4 That , but can u tell me hw can i do this .
-
Thanx 4 That , but can u tell me hw can i do this .
In which event, you are trying to find the control??
Regards, Vengat P
-
Thanx 4 That , but can u tell me hw can i do this .
select grid control go to property page and in that event list will get rowdatabound event double click over there in that eent you will get e.row type chek that type and then finde your control if row type is header