Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > Subclassing DataGrid

Reply
Thread Tools

Subclassing DataGrid

 
 
David Rainsford
Guest
Posts: n/a
 
      04-01-2004
I would like to make a DataGrid control but with some modifications.

Firstly, I would like all fields that come out of the database to be
editable at all times.
I would also like another row (this one non-editable) on the Datagrid which
shows the average or total values (and I want to be able to specify which
columns this will work for)
I would also like another column (again non-editable) which will also show
average or total values from specified columns

For example (damn this newsreader won't use a monospaced font - if you have
the same problem, copy and paste into notepad to see my example more
clearly)

Project Jan Feb Avg
foo {0.1} {0.3} 0.4
bar {0.5} {0.25} 0.75
TOTAL 0.6 0.55 1.15



The values in {} are editable and stored in the database. The other
numerical values are dynamically calculated and recalculated every time a
field is edited.

Is this realistic? Is subclassing the DataGrid web control the way to go
with this, or is there an easier way to achieve what I want to do?

Thanks in advance for your advice,


David


 
Reply With Quote
 
 
 
 
Alvin Bruney [MVP]
Guest
Posts: n/a
 
      04-01-2004
It's one approach. I'd only use it if I intended to release the control to
other folk. If it is for one project, you can just customize the itemcreated
and itemdatabound event handlers to give you what you want.

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"David Rainsford" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I would like to make a DataGrid control but with some modifications.
>
> Firstly, I would like all fields that come out of the database to be
> editable at all times.
> I would also like another row (this one non-editable) on the Datagrid

which
> shows the average or total values (and I want to be able to specify which
> columns this will work for)
> I would also like another column (again non-editable) which will also show
> average or total values from specified columns
>
> For example (damn this newsreader won't use a monospaced font - if you

have
> the same problem, copy and paste into notepad to see my example more
> clearly)
>
> Project Jan Feb Avg
> foo {0.1} {0.3} 0.4
> bar {0.5} {0.25} 0.75
> TOTAL 0.6 0.55 1.15
>
>
>
> The values in {} are editable and stored in the database. The other
> numerical values are dynamically calculated and recalculated every time a
> field is edited.
>
> Is this realistic? Is subclassing the DataGrid web control the way to go
> with this, or is there an easier way to achieve what I want to do?
>
> Thanks in advance for your advice,
>
>
> David
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Subclassing a DataGrid control Jeronimo Bertran ASP .Net Datagrid Control 3 05-10-2005 12:46 AM
SubClassing a TextBox Felbrigg ASP .Net 0 04-27-2004 09:05 AM
Subclassing DataGrid Dan ASP .Net Web Controls 0 02-28-2004 01:01 AM
Subclassing from System.Web.UI.Page - Designer Error =?Utf-8?B?Q2h1Y2sgSGFlYmVybGU=?= ASP .Net 1 02-20-2004 05:05 PM
Subclassing UserControl makes the Visual Studio designer does not work S Guiboud ASP .Net 1 07-18-2003 03:55 PM



Advertisments