Creating Custom GridView Control
page 6 of 6
by Abdulla Hussein AbdelHaq
Feedback
Average Rating: 
Views (Total / Last 10 Days): 27702/ 544

Conclusion

In this article, I demonstrate how to create a custom GridView control and how to add a new checkbox column automatically. Also, we have learned how to embedded JavaScript file with custom controls and how to use it in the page.

In addition, we have learned how to create a template field classes and how to declare an object from these classes. I encourage you to download the source code so you can see all what we have done in more details.

If you have any questions, please write your comments below.

I hope you found this useful and informative.


View Entire Article

Article Feedback

Title:  
Name:  
Url: ( Optional )
Comment:  
Please add 8 and 8 and type the answer here:

User Comments

Title: Extra feature Needed !! Please help Abdulla   
Name: anji
Date: 10/26/2009 9:31:02 PM
Comment:
Abdulla ,
u r idea works excellent.what if i want to include an extra header row with all checkboxes in it .And click of each check box in each column header will rise an event.

please,can u give to modifications to ur code to include above said functionality and include as a separate article or mail the file to anji.halaharvi@gmail.com
Title: Need code in C#   
Name: DJ
Date: 8/7/2009 6:42:45 AM
Comment:
Hi
Can u convert all code to C#
Title: Re: Can u convert all code to C#   
Name: Abdulla [The Author]
Date: 8/5/2009 2:09:32 PM
Comment:
Well, I am a Visual Basic Developer.
C# or VB it does not matter, the major point is the idea, there are many tools and websites that enable you to convert code between two languages
Title: Can u convert all code to C#   
Name: Aziz
Date: 8/5/2009 10:36:58 AM
Comment:
if you can, please convert to C# your source.
Title: Applications Programmer   
Name: JHG
Date: 7/7/2009 11:18:20 AM
Comment:
Grr. Visual Basic again!
Title: Hello   
Name: Jilani
Date: 7/7/2009 8:48:22 AM
Comment:
This is nice Art
Title: Mr   
Name: Thanigainathan
Date: 7/7/2009 8:26:09 AM
Comment:
Hi,

This article is very nice. Thanks for giving this opportunity to read this. This will be the base to create advanced controls.

Thanks,
Thani
Title: No Website Code RegisterClient   
Name: User
Date: 6/29/2009 6:02:19 PM
Comment:
Abdulla thanks for the great article this was a great learning point. Unfortunetly I've been getting the following errors.

The ScriptManager.RegisterStartupScript line in "Public Overrides Sub Rendercontrol" method doesn't compile. I had to change it to "Page.ClientScript.RegisterClientScriptBlock"

This line in the onRowCreate "DirectCast(e.Row.FindControl("ChkHeader"), CheckBox).Attributes.Add("onclick", _
"ObjJs_" & Me.ID & ".CheckUnCheckRows(this.checked)")" produces an undefined object when the header checkbox is clicked. Have not been able to solve this one.

I also was unable to find the sample site in the download.
Title: SampleWebsite code missing   
Name: Michael
Date: 6/26/2009 10:05:57 AM
Comment:
Hi there, I'm experiencing the same as Mouzam. There doesn"t appear to any Sample Website code files.

Has this issue been resolved yet?

I tried pasting in the error messages but the result is my previous post.
Title: Extremely Helpful   
Name: Faisal Lodhi
Date: 5/21/2009 6:18:17 PM
Comment:
Thank you for this article, it was much easier to read and understand than so many others that explain how to inherit from GridView
Title: SampleWebsite code missing   
Name: Mouzam
Date: 5/1/2009 10:59:21 AM
Comment:
Hi, a nice simple article. But the SampleWebsite source is missing. I used this link to download (http://authors.aspalliance.com/AAbdelHaq/TestingCustomGridView.zip). CustomGrid source is available but SampleWebsite code is not.
Title: Re: Ms   
Name: Abdulla [The Author]
Date: 3/15/2009 3:14:08 PM
Comment:
Are you sure ? I just downloaded the project successfully !
Please try again, and report us if it is still not working.
Title: Ms   
Name: Diana
Date: 3/13/2009 4:55:58 AM
Comment:
Gr8 article....
But unable to download the sample.
Title: Excellent Article   
Name: Cebo
Date: 11/20/2008 2:20:05 PM
Comment:
This article of example project of gridview with checkbox is very well written and deserves 5-stars!

Product Spotlight
Product Spotlight 






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2009 ASPAlliance.com  |  Page Processed at 11/21/2009 1:24:32 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search