Ask a Question related to ASP.NET Data Grid Control, Design and Development.
-
Martin Bischoff #1
derive own controls from BoundField?
[this is question about the ASP.NET 2.0 details view control]
When I add a row which is bound to a string field, the details view displays
a single-line text box control in edit mode. Often, I would like to have a
text area instead. I know that I can achieve this by converting the row to a
template row and add a textbox with TextMode="MultiLine". But it seems to me
that this is a very common need, and I don't like to edit every page/row
where I need the same functionlity.
Is it possible to derive my own controls (e.g. containing a text area) from
BoundField and use them in a details view? Are there any samples
demonstrating this?
Thanks for any help,
Martin
Martin Bischoff Guest
-
Why the properties of web user controls which inherted from my custom base UI controls MISSED?
Why the properties of web user controls which inherted from my custom base UI controls MISSED? How should I to set enable? -
How to custom gridview control if it derive from web user control?
How to custom gridview control (modify column templates) if it derived from web user control? I have a web user control which contains one... -
Derive OnItemCreated
Hello, i have created my own datagrid control derived from the datagrid control. Now I would like to override the OnItemCreated method. But I... -
user controls: dynamiclly added child controls dont survive post back ?
hi, i have some strange behaviour: i've created a web user control that add's some child controls (e.g: textbox, image buttons) to its control... -
How to derive summary info from one single table..
Something along the lines of ... SLECT col1, sum(col3), sum(col4) FROM tbl WHERE col2 BETWEEN @d1 AND @d2 GROUP BY col1 ; -- - Anith (... -
Steven Cheng[MSFT] #2
RE: derive own controls from BoundField?
Hi Martin,
Welcome to ASPNET newsgroup.
Regarding on the question on creating a custom Field for DetailsView, it's
possible and in fact this is already available for asp.net 1.x DataGrid
control. For DataGrid, we can create our custom datagridcolumn through
create custom class derived from DataGridColumn and override the certain
methods. And for the GridView/DetailsView contorl in asp.net 2.0, all the
XXXFields are derived from the DataControlField:
#DataControlField
[url]http://msdn2.microsoft.com/library/3stahdsh(en-us,vs.80).aspx[/url]
Also, here is a tech article in MSDN discussing on creating a custom
datagrid Column, you can get some ideas from it:
#Creating Custom Columns for the ASP.NET Datagrid
[url]http://msdn.microsoft.com/library/en-us/dnaspp/html/creatingcustomcolumns.as[/url]
p?frame=true
Thanks,
Steven Cheng
Microsoft Online Support
Get Secure! [url]www.microsoft.com/security[/url]
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| Thread-Topic: derive own controls from BoundField?
| thread-index: AcWzeVkCdyqS/2oYS2WeWsBdmBXkCQ==
| X-WBNR-Posting-Host: 194.209.202.1
| From: =?Utf-8?B?TWFydGluIEJpc2Nob2Zm?= <nitramb4@newsgroup.nospam>
| Subject: derive own controls from BoundField?
| Date: Tue, 6 Sep 2005 23:57:01 -0700
| Lines: 15
| Message-ID: <91EB19B1-1A50-42E0-8ED6-702194C0F4B2@microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridc ontrol
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA02.phx.gbl!TK2MSF TNGXA03.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet.datagridc ontrol:5475
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridc ontrol
|
| [this is question about the ASP.NET 2.0 details view control]
|
| When I add a row which is bound to a string field, the details view
displays
| a single-line text box control in edit mode. Often, I would like to have
a
| text area instead. I know that I can achieve this by converting the row
to a
| template row and add a textbox with TextMode="MultiLine". But it seems to
me
| that this is a very common need, and I don't like to edit every page/row
| where I need the same functionlity.
|
| Is it possible to derive my own controls (e.g. containing a text area)
from
| BoundField and use them in a details view? Are there any samples
| demonstrating this?
|
| Thanks for any help,
| Martin
|
Steven Cheng[MSFT] Guest



Reply With Quote

