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
Go To First  |  Previous Question  |  Next Question 
 DataGrid  |  Question 8 of 14    Print  
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?

  
Total Answers and Comments: 2 Last Update: July 15, 2008     Asked by: Yatin 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
October 18, 2006 05:30:00   #1  
M.Nagababu        

RE: Hi, I was asked this in an Interview I want to add...

Hi,Yatin

       to added controls to the footer of the datagrid we use <footer Template> </footer template> command in <template columns> </template colums>. For example we a button control in a footer of datagrid like this:

<datagrid><columns><template columns><footer template><asp:button id= btn1 label = button runat = server></asp:button></footer template></template columns></columns></datagrid>

in the same way we add controls to header also. by using <header template></header template>


 
Is this answer useful? Yes | No
July 15, 2008 01:57:07   #2  
anjani Member Since: November 2005   Contribution: 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.

 
Is this answer useful? Yes | No

 Related Questions

In DataGrid, is it possible to add rows one by one at runtime. That means after entering data in one row next row will be added.

Latest Answer : Hi,You can use template column to add controls like label, textbox etc.The same way you can add datetime control also. ...

Latest Answer : refresh datagrid by calling it in postback ...
Read Answers (10) | Asked by : Prajakta Deshpande

Hi, How to sort the data in gatagrid ? when we use DataBound event of Datagrid,,,, I want to display the data using controls.... For an example, If i click a button, which is outside of the datagrid, entire data should be shown. 1st column in TextBoxs. second column in Drop down List Boxs.. How to bind the data in Dropdownlist,which is in DataGrid at run time?
View Question | Asked by : Ravi Majji

Hi, How to sort the data in Datagrid ? when we use DataBound event of Datagrid, I want to display te data using controls.... For an example, If i click a button, which is outside of the datagrid, entire data should be shown. 1st column in TextBoxs. second column in Drop down List Boxs.. How to bind the data in Dropdownlist,which is in DataGrid at run time? Row1 Row2 Row3 Row4 ----------------- This is the record in datagrid...
Read Answers (2) | Asked by : aspnet

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?
Read Answers (2) | Asked by : Yatin

View Question | Asked by : tuhina

Latest Answer : Cancel CommandDelete CommandEdit CommandUpdate CommandItem Command ...

How to get the content of Datagrid into excel format?I want to use this feature in Windows Application and C#, Visual Studio .NET 2003 
Latest Answer : for windows application u use excel object to create excel file ...

Latest Answer : For adding controls in datagrid, first you have to add available templates of datagrid whichever you want that is, ItemTemplate, EditTemplate.In that template you can write any ASP control normally. ...


 Sponsored Links

 
Related Articles

jQuery - Enabling the Pager Buttons

Learning jQuery Enabling the Pager Buttons To make these new buttons actually work we need to update the currentPage variable and then run our pagination routine At first blush it seems we should be able to do this by setting currentPage to page which is the current value of the iterator that create
 

How to achieve looping in C++

How to achieve looping in C In object oriented programming language whenever a block of statements has to be repeated a certain number of times or repeated until a condition becomes satisfied the concept of looping is used mosgoogle center The following commands used in C for achieving looping for
 

The Interview Snafu

How to turn someone else&rsquo;s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won&rsquo;t get over the line without a polished, prof
 

Importance of Proper English during Job Interview

Importance of Proper English during Job Interview Your job interview is crucially important and it will determine whether or not you will get the job Depending on the type of job you re going for it is very important for you to use proper English In most cases jobs which offer higher salaries will h
 

HR Interview - HR Interview Mistakes You Will Want To Avoid

HR Interview Mistakes You Will Want To Avoid The job interview can be a stressful process This is especially true for those who are going after a competitive position Your nonverbal communication combined with the answers you give during the interview will determine if you are hired mosgoogle While
 

HR Interview - Behavioral HR Interviews

Behavioral HR Interviews As the name implies a behavioral interview is an interview that is held by a human resources department to determine if an applicant has the behaviors that are appropriate for a job The company must know how an applicant will behave in a certain situations mosgoogle The logi
 

HR Interview - How To Prepare For Your HR Interview

How To Prepare For Your HR Interview Before you begin thinking about how you are going to dress for the interview it is important to do your research first You should learn everything you can about the company you wish to work for When you have detailed information about your employer you will conve
 

HR Interview - Telephone Interview Etiquette

Telephone Interview Etiquette When you conduct a telephone interview for a job it is important to show the proper etiquette Not only is it important it is critical is you wish to be hired by the company There are a number of things you will want to do and other things should never be done mosgoogle
 

HR Interview - How To Succeed At HR Interviews

How To Succeed At HR Interviews There are a number of things you will need to do in order to make sure you pass the interview process Your appearance is something that you will want to pay close attention to Even if you feel that your appearance shouldn t be a factor in whether or not you re highere
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape