CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 12/13/2005 4:54:42 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 2 Views: 47 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
3 Items, 1 Pages 1 |< << Go >> >|
Edward Eves
Asp.Net User
Master Page with OnRowCreated12/13/2005 4:54:42 AM

0/0

I'm looking for suggestions...

I have a MasterPage (Table.master) with a ContentPlaceHolder containing a GridView.  The GridView's OnRowCreated attribute is set to the method GridView_OnRowCreated(...) in the CodeFile (Table.master.cs) for adding sort images to the header cells.

Now, I would like to replace the GridView and/or the SQLDataSource SelectCommand & GridView columns so I can create several other pages that select data from different tables and have different schemas while still defining the OnRowCreated method/event in only 1 place.

Basically, where is the best place to define the OnRowCreated?  Do I use a MasterPage base class of some kind?  Should I remove the ContentPlaceHolder and have the inheriting page clear and add new columns?

 

Any suggestions?

Fredrik N
Asp.Net User
Re: Master Page with OnRowCreated12/13/2005 9:27:37 AM

0/0

Is the following correct:

You have a GridView where the RowCreated event is added to the master page code-behind page!? You know want to replace the GridView when it's not needed for other content pages, and know you want to know where to have the RowCreated method, correct?

If so, I should in your case create my own custom GridView control by inheriting the GridView class and override the RowCreated method and add the code that should add the images to the header. If you do that, you have implemented the logic into a control, and don't need to have the code located in the master page file.


/Fredrik Norm?n NSQUARED2
Microsoft MVP, MCSD, MCAD, MCT

Cornerstone

My Blog, ASP.Net 2.0 etc
Edward Eves
Asp.Net User
Re: Master Page with OnRowCreated12/13/2005 4:11:20 PM

0/0

Thank you!  I was actually using your original source to add the images to the header cells.  I did exactly as you instructed and now have it all working.
3 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
ASP.NET 2.0 Cookbook Authors: Michael A. Kittel, Geoffrey T. Leblond, Pages: 989, Published: 2005
ASP.NET 2.0 Website Programming: Problem-design-solution Authors: Marco Bellinaso, Pages: 576, Published: 2006
Professional ASP.NET 2.0 Databases Authors: Thiru Thangarathinam, Pages: 504, Published: 2007

Web:
Master Page with OnRowCreated - ASP.NET Forums I have a MasterPage (Table.master) with a ContentPlaceHolder containing a GridView. The GridView's OnRowCreated attribute is set to the ...
Master Pages, Themes and Navigation Controls - ASP.NET Forums Professional ASP.NET 2.0 Design: CSS, Themes, and Master Pages by Jacob J. Sanford ... Master Page with OnRowCreated by Edward Eves. No Status ...
GridView OnRowCreated won't compile GridView OnRowCreated won't compile. microsoft.public.dotnet.framework.aspnet. webcontrols ... Re: Treeview state in a master page ...
Export to excel doesnt work with master pages. - ASP.NET Forums The master page already has a form atag. .... the content page does not have the form tag because the master page has it ...
CodePlex Information and Discussion - Discussions Mar 27, 2007 ... Wiki Link: [discussion:8614]. Using RealWorld.Grids with Master Page problem Tags: CodePlex Source Control Client, CodePlex Web-Site ...
Parag's Weblog Look at the code below that we need to write for OnRowCreated event. ... Master page has a LoginView control with a Label control inside ...
CodeHighStreet: Multi Header GridView - Part III Now we got two rows,first represents the master row,second holds nested data. ... protected override void OnRowCreated(GridViewRowEventArgs e) ...
CodeProject: GridView Custom Paging with PageSize Change Dropdown ... May 5, 2008 ... NET GridView control, and the OnRowCreated method is overriden in .... Might the reason be that I am using master pages, and this page is a ...
How do I add GridView editing functions : asp.net, ie 6 OnRowCreated(e); } } } EquipList.aspx <%@ Page Language="C#" MasterPageFile="~/ INVGridView.Master" AutoEventWireup="true" CodeFile="EquipList.aspx.cs" ...
Sys.InvalidOperationException: Could not find UpdatePanel with ID ... Aug 23, 2008 ...




Search This Site:










bug of rename a file in file manager

debugging is not working in windows vista

postback url ?

menu samples

applying "blocks"

translating admin and host menu

connection error to the database after server from vs development server to iis - why?

any sample desktopportalbanner.ascx's

ibuyspy portal vs. portal starter kit

positioning text inside wizardstep

unable to view more than the first page of user accounts

ok,i'm trying to replicate the enhanced horizontal menu example

problem with using ie web controls on staging server

security exception on external dll

menu module with categegory header !! can we ??

rich text editor doesn't work

how to have expanded archived previous monthes?

create directory and grant asp.net permissions to read and write to

extending authentication to a separate application

question about how trap events

personal site start kit installation process - summary

must declare the scalar variable "@original_id". why ?

problem to understand readme and copying the files to appropriate place

guestbook spamming problem

global.asax and root namespace

change password and security question at the same time.

best logic possible for last ten files

mlhtml1.01.00 on 3.0.12

css friendly treeview

strange 3.1.1 errors - any ideas?

 
All Times Are GMT