Click here to Skip to main content
15,901,122 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HI all,

i have added a button in Gridview's Footer through Template field, but in this way button is showing in separate column and hence disturbing the design.

now I want to place that button in the footer in the way that it should be shown under the last column.

Can any body give me idea about that? :)
Posted

1 solution

Refer- Re: Gridview displaying a command button in the footer[^].

You have to add one FooterTemplate for the Column under which you want to show the Button.
 
Share this answer
 
Comments
VICK 13-Nov-13 1:13am    
Thanks Tadit,,, I was already trying this, but was unable to get the results in desired way because I was also making the visibility of a column false before that column and that was the reason, disturbing the design>


5+ :)
Glad to hear that. Most welcome. Good work. :)
VICK 13-Nov-13 1:55am    
One more question.. How can i get this button(added in Footer template of TemplateField) in Gridview's on Row Data Bound.

to get item template text of this template field I am using
e.row.cells[index].Text

but not understanding how to get the Footer Button of same cell index. :(
Check if you can do like below...

Button footerButton = e.FooterRow.FindControl("buttonId") as Button;
VICK 13-Nov-13 3:13am    
Done.. Thanks again.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900