Congratulations to all monthly winners of May 2013 !!! They have won INR 2900 cash and INR 27497 worth prize.
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 11855 |  Welcome, Guest!   Register  Login
 Home > Interview Questions > Exclusive Interview Questions > Exclusive ASP.NET Interview Questions > How to use a checkbox in a data grid? OR ...

How to use a checkbox in a data grid? OR How can I track event in checkbox, which is one of the columns of a data grid?

Category: ASP.NET | Difficulty Level: Intermediate | Views:1456

Ads
Ads


Answer:

Answer: -
Note: - This is normally asked when the interviewer want to see that have you really worked practically on a project.

Following are the steps to be done:-

• In ASPX page you have to add Item template tag in data grid.

<ItemTemplate>
<asp:CheckBox id="CheckBox1" runat="server" AutoPostBack="True" OnCheckedChanged="Check_Clicked"></asp:CheckBox>
</ItemTemplate>


If you look at the Item template, we have “OnCheckChanged” event. This “OnCheckChanged” event has “Check Clicked” subroutine is actually in behind code. Note this method, which is in behind code, should either be “protected” or “public”
Following below is the subroutine, which defines the method

Protected Sub Check Clicked (By Val sender As Object, By Val e As EventArgs)
‘Do something
End Sub

The above steps should be defined in short to the interviewer, which will give a quick feeling of your practical experience with ASP.NET’


Get Questpond's 500+ .NET Interview preparation videos at discounted price

Found interesting? Add this to:


Page copy protected against web site content infringement by Copyscape
>> Write Response - Respond to this post and get points

More ...

About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 6/19/2013 3:51:43 AM