GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Microsoft  >  DataGrid

 Print  |  
Question:  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?



July 07, 2008 01:57:07 #2
 anjani   Member Since: November 2005    Total Comments: 2 

RE: 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?
 
hi

Add buttons,images,etc to the footer in the data grid u use the template field conept in the html file

<Columns>

    <asp:TemplateField>
     
    <HeaderTemplate>
        HTML,TEXT,SERVER
      </HeaderTemplate>

     <ItemTemplate>
       HTML,TEXT,SERVER
      </ItemTemplate>


      <FooterTemplate>
      <asp:Button ID="Btn_Add" runat="server" CommandName="AddUser" Text="Add"/>
      </FooterTemplate>
        
    </asp:TemplateField>
   
     </Columns>

from that coding a button will be add in the footer of the gridview in the similar way we can add other controls also.
     

 

Back To Question