Hi, I was asked this in an interview I want to add buttons,images,etc to the footer of a datagrid at runtime. How would I achieve this?

Answer

As they ask you to do it at run time, you need to add the controls to the control collection of the cell of the footer row of the gridView.
Button myBtn = new Button();

gvTest.FooterRow.Cells[1].Controls.Add(myBtn);

Play caution where the dynamic addition is done if you want it to persist.

All DATA GRID Questions

Ask your interview questions on data-grid

Write Your comment or Questions if you want the answers on data-grid from data-grid Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---