BaseDataList
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngcontrolscs' list.


Bryan Costanich
Has anyone successfully create a control that inherits from BaseDataList
(the object that DataGrid and DataList inherit from)??????

Supposedly you have to implement a method called 'CreateControlHeirarchy,'
but this is what the SDK has to say about CreateControlHeirarchy:

This member supports the .NET Framework infrastructure and is not intended
to be used directly from your code.

Right.... cause that does me a lot of good.
Reply to this message...
 
    
Andy Smith
d2hhdCBraW5kIG9mIGNvbnRyb2wgYXJlIHlvdSB0cnlpbmcgdG8gY3JlYXRlPw0KDQoJLS0tLS1P
cmlnaW5hbCBNZXNzYWdlLS0tLS0gDQoJRnJvbTogQnJ5YW4gQ29zdGFuaWNoIFttYWlsdG86YnJ5
YW5Ad293emVyLm5ldF0gDQoJU2VudDogV2VkIDYvMjYvMjAwMiA5OjAyIFBNIA0KCVRvOiBhc3Bu
Z2NvbnRyb2xzY3MgDQoJQ2M6IA0KCVN1YmplY3Q6IFthc3BuZ2NvbnRyb2xzY3NdIEJhc2VEYXRh
TGlzdA0KCQ0KCQ0KDQoJSGFzIGFueW9uZSBzdWNjZXNzZnVsbHkgY3JlYXRlIGEgY29udHJvbCB0
aGF0IGluaGVyaXRzIGZyb20gQmFzZURhdGFMaXN0ICh0aGUgb2JqZWN0IHRoYXQgRGF0YUdyaWQg
YW5kIERhdGFMaXN0IGluaGVyaXQgZnJvbSk/Pz8/Pz8NCg0KCSANCg0KCVN1cHBvc2VkbHkgeW91
IGhhdmUgdG8gaW1wbGVtZW50IGEgbWV0aG9kIGNhbGxlZCAnQ3JlYXRlQ29udHJvbEhlaXJhcmNo
eSwnIGJ1dCB0aGlzIGlzIHdoYXQgdGhlIFNESyBoYXMgdG8gc2F5IGFib3V0IENyZWF0ZUNvbnRy
b2xIZWlyYXJjaHk6DQoNCgkgDQoNCglUaGlzIG1lbWJlciBzdXBwb3J0cyB0aGUgLk5FVCBGcmFt
ZXdvcmsgaW5mcmFzdHJ1Y3R1cmUgYW5kIGlzIG5vdCBpbnRlbmRlZCB0byBiZSB1c2VkIGRpcmVj
dGx5IGZyb20geW91ciBjb2RlLg0KDQoJIA0KDQoJUmlnaHQuLi4uIGNhdXNlIHRoYXQgZG9lcyBt
ZSBhIGxvdCBvZiBnb29kLg0KDQoJIA0KDQoJIA0KDQoJfCBbYXNwbmdjb250cm9sc2NzXSBtZW1i
ZXIgQW5keS5TbWl0aEBtYWN0ZWMuY29tID0gWU9VUiBJRCB8IGh0dHA6Ly93d3cuYXNwbGlzdHMu
Y29tL2FzcGxpc3RzL2FzcG5nY29udHJvbHNjcy5hc3AgPSBKT0lOL1FVSVQgfCBodHRwOi8vd3d3
LmFzcGxpc3RzLmNvbS9zZWFyY2ggPSBTRUFSQ0ggQXJjaGl2ZXMgPCAvQkxPQ0tRVU9URSA+IA0K
DQo
Reply to this message...
 
    
Bryan Costanich
Something similar to the datagrid.

-----Original Message-----
From: Andy Smith [mailto:Click here to reveal e-mail address]
Sent: Wednesday, June 26, 2002 10:57 PM
To: aspngcontrolscs
Subject: RE: [aspngcontrolscs] BaseDataList

what kind of control are you trying to create?

-----Original Message-----
From: Bryan Costanich [mailto:Click here to reveal e-mail address]
Sent: Wed 6/26/2002 9:02 PM
To: aspngcontrolscs
Cc:
Subject: [aspngcontrolscs] BaseDataList

Has anyone successfully create a control that inherits from BaseDataList
(the object that DataGrid and DataList inherit from)??????

Supposedly you have to implement a method called 'CreateControlHeirarchy,'
but this is what the SDK has to say about CreateControlHeirarchy:

This member supports the .NET Framework infrastructure and is not intended
to be used directly from your code.

Right.... cause that does me a lot of good.

| [aspngcontrolscs] member Click here to reveal e-mail address = YOUR ID |
http://www.asplists.com/asplists/aspngcontrolscs.asp = JOIN/QUIT |
http://www.asplists.com/search = SEARCH Archives < /BLOCKQUOTE >
Reply to this message...
 
    
Bryan Costanich
Specifically, I'm trying to recreate the basic DataGrid functionality, but I
want to make is so that you can select a row on the client side and also add
some buttons outside of the grid that when clicked would post-back to the
page and you would be able to access the selectedItemIndex property.
Additionally I would like to use the up and down arrow keys to cycle through
the rows.

I thought about inheriting from DataGrid and then overriding the Render()
method but I imagine I would have to do a LOT more coding than I want to get
it to work right because of the complex functionality of the DataGrid.
Additionally, I'm not even sure if I would have access to the internal data
that I would need to add the client-side onclick events to each row.

If anyone has seen anything like this working with the datagrid or has
implemented something similar I would love to see it.

-b

-----Original Message-----
From: Bryan Costanich [mailto:Click here to reveal e-mail address]
Sent: Wednesday, June 26, 2002 11:18 PM
To: aspngcontrolscs
Subject: [aspngcontrolscs] RE: BaseDataList

Something similar to the datagrid.

-----Original Message-----
From: Andy Smith [mailto:Click here to reveal e-mail address]
Sent: Wednesday, June 26, 2002 10:57 PM
To: aspngcontrolscs
Subject: RE: [aspngcontrolscs] BaseDataList

what kind of control are you trying to create?

-----Original Message-----
From: Bryan Costanich [mailto:Click here to reveal e-mail address]
Sent: Wed 6/26/2002 9:02 PM
To: aspngcontrolscs
Cc:
Subject: [aspngcontrolscs] BaseDataList

Has anyone successfully create a control that inherits from BaseDataList
(the object that DataGrid and DataList inherit from)??????

Supposedly you have to implement a method called 'CreateControlHeirarchy,'
but this is what the SDK has to say about CreateControlHeirarchy:

This member supports the .NET Framework infrastructure and is not intended
to be used directly from your code.

Right.... cause that does me a lot of good.

| [aspngcontrolscs] member Click here to reveal e-mail address = YOUR ID |
http://www.asplists.com/asplists/aspngcontrolscs.asp = JOIN/QUIT |
http://www.asplists.com/search = SEARCH Archives < /BLOCKQUOTE >

| [aspngcontrolscs] member Click here to reveal e-mail address = YOUR ID |
http://www.asplists.com/asplists/aspngcontrolscs.asp = JOIN/QUIT |
http://www.asplists.com/search = SEARCH Archives
Reply to this message...
 
    
Andy Smith
cGVyc29uYWxseS4uLiBJIHRoaW5rIHlvdSdsbCBoYXZlIG11Y2ggbW9yZSBsdWNrIGV4dGVuZGlu
ZyB0aGUgRGF0YUdyaWQgdGhhbiB0cnlpbmcgdG8gcmVjcmVhdGUgdGhlIGNvbnRyb2wuDQogDQph
cyBmb3IgdGhlI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IEZyYW1ld29yayBpbmZyYXN0cnVjdHVyZSBhbmQg
aXMgbm90IGludGVuZGVkIHRvIGJlIHVzZWQgZGlyZWN0bHkgZnJvbSB5b3VyIGNvZGUuDQoNCgkJ
IA0KDQoJCVJpZ2h0Li4uLiBjYXVzZSB0aGF0IGRvZXMgbWUgYSBsb3Qgb2YgZ29vZC4NCg0KCQkg
DQoNCgkJIA0KDQoJCXwgW2FzcG5nY29udHJvbHNjc10gbWVtYmVyIEFuZHkuU21pdGhAbWFjdGVj
LmNvbSA9IFlPVVIgSUQgfCBodHRwOi8vd3d3LmFzcGxpc3RzLmNvbS9hc3BsaXN0cy9hc3BuZ2Nv
bnRyb2xzY3MuYXNwID0gSk9JTi9RVUlUIHwgaHR0cDovL3d3dy5hc3BsaXN0cy5jb20vc2VhcmNo
ID0gU0VBUkNIIEFyY2hpdmVzIDwgL0JMT0NLUVVPVEUgPiANCg0KCXwgW2FzcG5nY29udHJvbHNj
c10gbWVtYmVyIGJyeWFuQHdvd3plci5uZXQgPSBZT1VSIElEIHwgaHR0cDovL3d3dy5hc3BsaXN0
cy5jb20vYXNwbGlzdHMvYXNwbmdjb250cm9sc2NzLmFzcCA9IEpPSU4vUVVJVCB8IGh0dHA6Ly93
d3cuYXNwbGlzdHMuY29tL3NlYXJjaCA9IFNFQVJDSCBBcmNoaXZlcyANCg0KCXwgW2FzcG5nY29u
dHJvbHNjc10gbWVtYmVyIEFuZHkuU21pdGhAbWFjdGVjLmNvbSA9IFlPVVIgSUQgfCBodHRwOi8v
d3d3LmFzcGxpc3RzLmNvbS9hc3BsaXN0cy9hc3BuZ2NvbnRyb2xzY3MuYXNwID0gSk9JTi9RVUlU
IHwgaHR0cDovL3d3dy5hc3BsaXN0cy5jb20vc2VhcmNoID0gU0VBUkNIIEFyY2hpdmVzIDwgL0JM
T0NLUVVPVEUgPiANCg0K
Reply to this message...
 
    
Bryan Costanich
Yup, well, it would have been a slimmed down version of it, so recreation
wasn't an issue.

Button column sucks. I hate having a button for every column. I'd rather
be able to click a row and then have one button for edit. In order for that
to work I would have to have Onclick="javaScript: someFunction()" on each
row, but I'm not sure how to get that in there since I don't know if I can
add it to the row object.

-----Original Message-----
From: Andy Smith [mailto:Click here to reveal e-mail address]
Sent: Thursday, June 27, 2002 8:17 PM
To: aspngcontrolscs
Subject: RE: [aspngcontrolscs] RE: BaseDataList

personally... I think you'll have much more luck extending the DataGrid than
trying to recreate the control.

as for the button issue... what's wrong with a ButtonColumn?

the up/down keys would take a little creative clientside code which would
postback with the paging commands. you could emit this script in OnPreRender
of the grid.

-----Original Message-----
From: Bryan Costanich [mailto:Click here to reveal e-mail address]
Sent: Thu 6/27/2002 8:34 PM
To: aspngcontrolscs
Cc:
Subject: [aspngcontrolscs] RE: BaseDataList

Specifically, I'm trying to recreate the basic DataGrid functionality, but I
want to make is so that you can select a row on the client side and also add
some buttons outside of the grid that when clicked would post-back to the
page and you would be able to access the selectedItemIndex property.
Additionally I would like to use the up and down arrow keys to cycle through
the rows.

I thought about inheriting from DataGrid and then overriding the Render()
method but I imagine I would have to do a LOT more coding than I want to get
it to work right because of the complex functionality of the DataGrid.
Additionally, I'm not even sure if I would have access to the internal data
that I would need to add the client-side onclick events to each row.

If anyone has seen anything like this working with the datagrid or has
implemented something similar I would love to see it.

-b

-----Original Message-----
From: Bryan Costanich [mailto:Click here to reveal e-mail address]
Sent: Wednesday, June 26, 2002 11:18 PM
To: aspngcontrolscs
Subject: [aspngcontrolscs] RE: BaseDataList

Something similar to the datagrid.

-----Original Message-----
From: Andy Smith [mailto:Click here to reveal e-mail address]
Sent: Wednesday, June 26, 2002 10:57 PM
To: aspngcontrolscs
Subject: RE: [aspngcontrolscs] BaseDataList

what kind of control are you trying to create?

-----Original Message-----
From: Bryan Costanich [mailto:Click here to reveal e-mail address]
Sent: Wed 6/26/2002 9:02 PM
To: aspngcontrolscs
Cc:
Subject: [aspngcontrolscs] BaseDataList

Has anyone successfully create a control that inherits from BaseDataList
(the object that DataGrid and DataList inherit from)??????

Supposedly you have to implement a method called 'CreateControlHeirarchy,'
but this is what the SDK has to say about CreateControlHeirarchy:

This member supports the .NET Framework infrastructure and is not intended
to be used directly from your code.

Right.... cause that does me a lot of good.

| [aspngcontrolscs] member Click here to reveal e-mail address = YOUR ID |
http://www.asplists.com/asplists/aspngcontrolscs.asp = JOIN/QUIT |
http://www.asplists.com/search = SEARCH Archives < /BLOCKQUOTE >

| [aspngcontrolscs] member Click here to reveal e-mail address = YOUR ID |
http://www.asplists.com/asplists/aspngcontrolscs.asp = JOIN/QUIT |
http://www.asplists.com/search = SEARCH Archives

| [aspngcontrolscs] member Click here to reveal e-mail address = YOUR ID |
http://www.asplists.com/asplists/aspngcontrolscs.asp = JOIN/QUIT |
http://www.asplists.com/search = SEARCH Archives < /BLOCKQUOTE >
Reply to this message...
 
    
Vandana Datye (DevCepts)
This is a multi-part message in MIME format.

--------------InterScan_NT_MIME_Boundary
Content-Type: multipart/alternative;
    boundary="----_=_NextPart_001_01C21EB7.7BC55985"

------_=_NextPart_001_01C21EB7.7BC55985
Content-Type: text/plain;
    charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

The built-in ASP.NET data-bound controls implement the
PrepareControlHierarchy method to provide a common code path for child
control creation in both of these scenarios: (a) using the data source
and (b) using the saved view state. The MSDN topic
http://msdn.microsoft.com/library/default.asp?url=3D/library/en-us/dv_vst=
e
chart/html/vbtchCreatingWebServerControlTemplatesProgrammatically.asp
has an example that shows how to implement this method.=20

=20

You can then invoke the PrepareControlHierarchy from DataBind (using the
data source) and from CreateChildControls (using the view state) w/o
implementing the child control creation logic in each of those methods.
This helps reduce the potential for errors and makes code more
maintainable.=20

=20

Hope that helps.

Vandana=20

-----Original Message-----
From: Bryan Costanich [mailto:Click here to reveal e-mail address]=20
Sent: Thursday, June 27, 2002 8:55 PM
To: aspngcontrolscs
Subject: [aspngcontrolscs] RE: BaseDataList

=20

Yup, well, it would have been a slimmed down version of it, so
recreation wasn't an issue.

=20

Button column sucks. I hate having a button for every column. I'd
rather be able to click a row and then have one button for edit. In
order for that to work I would have to have Onclick=3D"javaScript:
someFunction()" on each row, but I'm not sure how to get that in there
since I don't know if I can add it to the row object.

=20

-----Original Message-----
From: Andy Smith [mailto:Click here to reveal e-mail address]=20
Sent: Thursday, June 27, 2002 8:17 PM
To: aspngcontrolscs
Subject: RE: [aspngcontrolscs] RE: BaseDataList

=20

personally... I think you'll have much more luck extending the DataGrid
than trying to recreate the control.

=20

as for the button issue... what's wrong with a ButtonColumn?

the up/down keys would take a little creative clientside code which
would postback with the paging commands. you could emit this script in
OnPreRender of the grid.

    -----Original Message-----=20
    From: Bryan Costanich [mailto:Click here to reveal e-mail address]=20
    Sent: Thu 6/27/2002 8:34 PM=20
    To: aspngcontrolscs=20
    Cc:=20
    Subject: [aspngcontrolscs] RE: BaseDataList

    Specifically, I'm trying to recreate the basic DataGrid
functionality, but I want to make is so that you can select a row on the
client side and also add some buttons outside of the grid that when
clicked would post-back to the page and you would be able to access the
selectedItemIndex property. Additionally I would like to use the up and
down arrow keys to cycle through the rows.

    =20

    I thought about inheriting from DataGrid and then overriding the
Render() method but I imagine I would have to do a LOT more coding than
I want to get it to work right because of the complex functionality of
the DataGrid. Additionally, I'm not even sure if I would have access to
the internal data that I would need to add the client-side onclick
events to each row.

    =20

    If anyone has seen anything like this working with the datagrid
or has implemented something similar I would love to see it.

    =20

    -b

    =20

    -----Original Message-----
    From: Bryan Costanich [mailto:Click here to reveal e-mail address]=20
    Sent: Wednesday, June 26, 2002 11:18 PM
    To: aspngcontrolscs
    Subject: [aspngcontrolscs] RE: BaseDataList

    =20

    Something similar to the datagrid.

    =20

    =20

    -----Original Message-----
    From: Andy Smith [mailto:Click here to reveal e-mail address]=20
    Sent: Wednesday, June 26, 2002 10:57 PM
    To: aspngcontrolscs
    Subject: RE: [aspngcontrolscs] BaseDataList

    =20

    what kind of control are you trying to create?

        -----Original Message-----=20
        From: Bryan Costanich [mailto:Click here to reveal e-mail address]=20
        Sent: Wed 6/26/2002 9:02 PM=20
        To: aspngcontrolscs=20
        Cc:=20
        Subject: [aspngcontrolscs] BaseDataList

        Has anyone successfully create a control that inherits
from BaseDataList (the object that DataGrid and DataList inherit
from)??????

        =20

        Supposedly you have to implement a method called
'CreateControlHeirarchy,' but this is what the SDK has to say about
CreateControlHeirarchy:

        =20

        This member supports the .NET Framework infrastructure
and is not intended to be used directly from your code.

        =20

        Right.... cause that does me a lot of good.

        =20

        =20

        | [aspngcontrolscs] member Click here to reveal e-mail address =3D YOUR
ID | http://www.asplists.com/asplists/aspngcontrolscs.asp =3D JOIN/QUIT =
|
http://www.asplists.com/search =3D SEARCH Archives < /BLOCKQUOTE >=20

    | [aspngcontrolscs] member Click here to reveal e-mail address =3D YOUR ID |
http://www.asplists.com/asplists/aspngcontrolscs.asp =3D JOIN/QUIT |
http://www.asplists.com/search =3D SEARCH Archives=20

    | [aspngcontrolscs] member Click here to reveal e-mail address =3D YOUR ID |
http://www.asplists.com/asplists/aspngcontrolscs.asp =3D JOIN/QUIT |
http://www.asplists.com/search =3D SEARCH Archives < /BLOCKQUOTE >=20

| [aspngcontrolscs] member Click here to reveal e-mail address =3D YOUR ID |
http://www.asplists.com/asplists/aspngcontrolscs.asp =3D JOIN/QUIT |
http://www.asplists.com/search =3D SEARCH Archives=20

------_=_NextPart_001_01C21EB7.7BC55985
Content-Type: text/html;
    charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html>

<head>
<meta http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 10 (filtered)">

<style>
<!--
/* Font Definitions */
@font-face
    {font-family:Tahoma;
    panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
    {font-family:Verdana;
    panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
    {margin:0in;
    margin-bottom:.0001pt;
    font-size:12.0pt;
    font-family:"Times New Roman";}
a:link, span.MsoHyperlink
    {color:blue;
    text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
    {color:purple;
    text-decoration:underline;}
p
    {margin-right:0in;
    margin-left:0in;
    font-size:12.0pt;
    font-family:"Times New Roman";}
span.emailstyle17
    {font-family:Arial;
    color:windowtext;}
span.emailstyle18
    {font-family:Arial;
    color:navy;}
span.emailstyle19
    {font-family:Arial;
    color:navy;}
span.emailstyle20
    {font-family:Arial;
    color:navy;}
span.EmailStyle21
    {font-family:Verdana;
    color:teal;
    font-weight:normal;
    font-style:normal;
    text-decoration:none none;}
@page Section1
    {size:8.5in 11.0in;
    margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
    {page:Section1;}
-->
</style>

</head>

<body lang=3DEN-US link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p class=3DMsoNormal><font size=3D2 color=3Dteal face=3DVerdana><span =
style=3D'font-size:
10.0pt;font-family:Verdana;color:teal'>The built-in ASP.NET data-bound =
controls
implement the PrepareControlHierarchy method to provide a common code =
path for child
control creation in both of these scenarios: (a) using the data source =
and (b) using
the saved view state. The MSDN topic <a
href=3D"http://msdn.microsoft.com/library/default.asp?url=3D/library/en-u=
s/dv_vstechart/html/vbtchCreatingWebServerControlTemplatesProgrammaticall=
y.asp">http://msdn.microsoft.com/library/default.asp?url=3D/library/en-us=
/dv_vstechart/html/vbtchCreatingWebServerControlTemplatesProgrammatically=
.asp</a>
has an example that shows how to implement this method. =
</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dteal face=3DVerdana><span =
style=3D'font-size:
10.0pt;font-family:Verdana;color:teal'> </span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dteal face=3DVerdana><span =
style=3D'font-size:
10.0pt;font-family:Verdana;color:teal'>You can then invoke the =
PrepareControlHierarchy
from DataBind (using the data source) and from CreateChildControls =
(using the
view state) w/o implementing the child control creation logic in each of =
those
methods. This helps reduce the potential for errors and makes code more
maintainable. </span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dteal face=3DVerdana><span =
style=3D'font-size:
10.0pt;font-family:Verdana;color:teal'> </span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dteal face=3DVerdana><span =
style=3D'font-size:
10.0pt;font-family:Verdana;color:teal'>Hope that =
helps.</span></font></p>

<div>

<p><font size=3D2 color=3Dgray face=3DVerdana><span =
style=3D'font-size:10.0pt;
font-family:Verdana;color:gray'>Vandana</span></font><font =
color=3Dteal><span
style=3D'color:teal'> </span></font></p>

</div>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3DTahoma><span
style=3D'font-size:10.0pt;font-family:Tahoma'>-----Original =
Message-----<br>
<b><span style=3D'font-weight:bold'>From:</span></b> Bryan Costanich
[mailto:Click here to reveal e-mail address] <br>
<b><span style=3D'font-weight:bold'>Sent:</span></b> Thursday, June 27, =
2002 8:55
PM<br>
<b><span style=3D'font-weight:bold'>To:</span></b> aspngcontrolscs<br>
<b><span style=3D'font-weight:bold'>Subject:</span></b> =
[aspngcontrolscs] RE:
BaseDataList</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'> </span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>Yup, well, it =
would have
been a slimmed down version of it, so recreation wasn't an =
issue.</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'> </span></fo=
nt></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>Button column
sucks.   I hate having a button for every column.  I'd =
rather be
able to click a row and then have one button for edit.  In order =
for that
to work I would have to have Onclick=3D"javaScript: =
someFunction()" on
each row, but I'm not sure how to get that in there since I don't know =
if I can
add it to the row object.</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'> </span></fo=
nt></p>

<p class=3DMsoNormal style=3D'margin-left:1.0in'><font size=3D2 =
face=3DTahoma><span
style=3D'font-size:10.0pt;font-family:Tahoma'>-----Original =
Message-----<br>
<b><span style=3D'font-weight:bold'>From:</span></b> Andy Smith
[mailto:Click here to reveal e-mail address] <br>
<b><span style=3D'font-weight:bold'>Sent:</span></b> Thursday, June 27, =
2002 8:17
PM<br>
<b><span style=3D'font-weight:bold'>To:</span></b> aspngcontrolscs<br>
<b><span style=3D'font-weight:bold'>Subject:</span></b> RE: =
[aspngcontrolscs] RE:
BaseDataList</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:1.0in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'> </span></font></p>

<div>

<p class=3DMsoNormal style=3D'margin-left:1.0in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'>personally... I think you'll have much more =
luck
extending the DataGrid than trying to recreate the =
control.</span></font></p>

</div>

<div>

<p class=3DMsoNormal style=3D'margin-left:1.0in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'> </span></font></p>

</div>

<div>

<p class=3DMsoNormal style=3D'margin-left:1.0in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'>as for the button issue... what's wrong with =
a
ButtonColumn?</span></font></p>

</div>

<div>

<p class=3DMsoNormal style=3D'margin-left:1.0in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'>the up/down keys would take a little creative
clientside code which would postback with the paging commands. you could =
emit
this script in OnPreRender of the grid.</span></font></p>

</div>

<blockquote =
style=3D'margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'>

<div>

<p class=3DMsoNormal =
style=3D'margin-right:0in;margin-bottom:12.0pt;margin-left:
1.0in'><font size=3D2 face=3D"Times New Roman"><span =
style=3D'font-size:10.0pt'>-----Original
Message----- <br>
<b><span style=3D'font-weight:bold'>From:</span></b> Bryan Costanich
[mailto:Click here to reveal e-mail address] <br>
<b><span style=3D'font-weight:bold'>Sent:</span></b> Thu 6/27/2002 8:34 =
PM <br>
<b><span style=3D'font-weight:bold'>To:</span></b> aspngcontrolscs <br>
<b><span style=3D'font-weight:bold'>Cc:</span></b> <br>
<b><span style=3D'font-weight:bold'>Subject:</span></b> =
[aspngcontrolscs] RE:
BaseDataList</span></font></p>

</div>

<div>

<p class=3DMsoNormal style=3D'margin-left:1.0in'><font size=3D2 =
color=3Dnavy
face=3DArial><span =
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>Specifically,
I'm trying to recreate the basic DataGrid functionality, but I want to =
make is
so that you can select a row on the client side and also add some =
buttons
outside of the grid that when clicked would post-back to the page and =
you would
be able to access the selectedItemIndex property.  Additionally I =
would
like to use the up and down arrow keys to cycle through the =
rows.</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:1.0in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'> </span></font></p>

<p class=3DMsoNormal style=3D'margin-left:1.0in'><font size=3D2 =
color=3Dnavy
face=3DArial><span =
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>I
thought about inheriting from DataGrid and then overriding the Render() =
method
but I imagine I would have to do a LOT more coding than I want to get it =
to
work right because of the  complex functionality of the DataGrid.
 Additionally, I'm not even sure if I would have access to the =
internal
data that I would need to add the client-side onclick events to each =
row.</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:1.0in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'> </span></font></p>

<p class=3DMsoNormal style=3D'margin-left:1.0in'><font size=3D2 =
color=3Dnavy
face=3DArial><span =
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>If
anyone has seen anything like this working with the datagrid or has =
implemented
something similar I would love to see it.</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:1.0in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'> </span></font></p>

<p class=3DMsoNormal style=3D'margin-left:1.0in'><font size=3D2 =
color=3Dnavy
face=3DArial><span =
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>-b</span></font><=
/p>

<p class=3DMsoNormal style=3D'margin-left:1.0in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'> </span></font></p>

<p class=3DMsoNormal style=3D'margin-left:1.5in'><font size=3D2 =
face=3DTahoma><span
style=3D'font-size:10.0pt;font-family:Tahoma'>-----Original =
Message-----<br>
<b><span style=3D'font-weight:bold'>From:</span></b> Bryan Costanich
[mailto:Click here to reveal e-mail address] <br>
<b><span style=3D'font-weight:bold'>Sent:</span></b> Wednesday, June 26, =
2002
11:18 PM<br>
<b><span style=3D'font-weight:bold'>To:</span></b> aspngcontrolscs<br>
<b><span style=3D'font-weight:bold'>Subject:</span></b> =
[aspngcontrolscs] RE:
BaseDataList</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:1.5in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'> </span></font></p>

<p class=3DMsoNormal style=3D'margin-left:1.5in'><font size=3D2 =
color=3Dnavy
face=3DArial><span =
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>Something
similar to the datagrid.</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:1.5in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'> </span></font></p>

<p class=3DMsoNormal style=3D'margin-left:1.5in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'> </span></font></p>

<p class=3DMsoNormal style=3D'margin-left:2.0in'><font size=3D2 =
face=3DTahoma><span
style=3D'font-size:10.0pt;font-family:Tahoma'>-----Original =
Message-----<br>
<b><span style=3D'font-weight:bold'>From:</span></b> Andy Smith
[mailto:Click here to reveal e-mail address] <br>
<b><span style=3D'font-weight:bold'>Sent:</span></b> Wednesday, June 26, =
2002
10:57 PM<br>
<b><span style=3D'font-weight:bold'>To:</span></b> aspngcontrolscs<br>
<b><span style=3D'font-weight:bold'>Subject:</span></b> RE: =
[aspngcontrolscs]
BaseDataList</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:2.0in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'> </span></font></p>

<div>

<p class=3DMsoNormal style=3D'margin-left:2.0in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'>what kind of control are you trying to =
create?</span></font></p>

</div>

<blockquote =
style=3D'margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'>

<div>

<p class=3DMsoNormal =
style=3D'margin-right:0in;margin-bottom:12.0pt;margin-left:
2.0in'><font size=3D2 face=3D"Times New Roman"><span =
style=3D'font-size:10.0pt'>-----Original
Message----- <br>
<b><span style=3D'font-weight:bold'>From:</span></b> Bryan Costanich =
[mailto:Click here to reveal e-mail address]
<br>
<b><span style=3D'font-weight:bold'>Sent:</span></b> Wed 6/26/2002 9:02 =
PM <br>
<b><span style=3D'font-weight:bold'>To:</span></b> aspngcontrolscs <br>
<b><span style=3D'font-weight:bold'>Cc:</span></b> <br>
<b><span style=3D'font-weight:bold'>Subject:</span></b> =
[aspngcontrolscs]
BaseDataList</span></font></p>

</div>

<div>

<p class=3DMsoNormal style=3D'margin-left:2.0in'><font size=3D2 =
face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial'>Has anyone successfully =
create a
control that inherits from BaseDataList (the object that DataGrid and =
DataList
inherit from)??????</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:2.0in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'> </span></font></p>

<p class=3DMsoNormal style=3D'margin-left:2.0in'><font size=3D2 =
face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial'>Supposedly you have to =
implement a
method called 'CreateControlHeirarchy,' but this is what the SDK has to =
say
about CreateControlHeirarchy:</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:2.0in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'> </span></font></p>

<p class=3DMsoNormal style=3D'margin-left:2.0in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'>This member supports the .NET Framework =
infrastructure
and is not intended to be used directly from your =
code.</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:2.0in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'> </span></font></p>

<p class=3DMsoNormal style=3D'margin-left:2.0in'><font size=3D2 =
face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial'>Right.... cause that does =
me a lot
of good.</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:2.0in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'> </span></font></p>

<p class=3DMsoNormal style=3D'margin-left:2.0in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'> </span></font></p>

</div>

<p class=3DMsoNormal style=3D'margin-left:2.0in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'>| [aspngcontrolscs] member =
Click here to reveal e-mail address =3D
YOUR ID | http://www.asplists.com/asplists/aspngcontrolscs.asp =3D =
JOIN/QUIT |
http://www.asplists.com/search =3D SEARCH Archives < /BLOCKQUOTE > =
</span></font></p>

</blockquote>

<p class=3DMsoNormal style=3D'margin-left:1.5in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'>| [aspngcontrolscs] member Click here to reveal e-mail address =
=3D YOUR ID
| http://www.asplists.com/asplists/aspngcontrolscs.asp =3D JOIN/QUIT |
http://www.asplists.com/search =3D SEARCH Archives </span></font></p>

</div>

<p class=3DMsoNormal style=3D'margin-left:1.0in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'>| [aspngcontrolscs] member =
Click here to reveal e-mail address =3D
YOUR ID | http://www.asplists.com/asplists/aspngcontrolscs.asp =3D =
JOIN/QUIT |
http://www.asplists.com/search =3D SEARCH Archives < /BLOCKQUOTE > =
</span></font></p>

</blockquote>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'>| [aspngcontrolscs] member =
Click here to reveal e-mail address =3D
YOUR ID | http://www.asplists.com/asplists/aspngcontrolscs.asp =3D =
JOIN/QUIT |
http://www.asplists.com/search =3D SEARCH Archives </span></font></p>

</div>

</body>

</html>
=00
------_=_NextPart_001_01C21EB7.7BC55985--

--------------InterScan_NT_MIME_Boundary--

Reply to this message...
 
    
David Johnson
You should be able to add the client-side OnClick event by doing
Row.Attributes.Add("onClick","SomeJScriptFunction(this.rowIndex)")

-----Original Message-----
From: Bryan Costanich [mailto:Click here to reveal e-mail address]
Sent: Thursday, June 27, 2002 8:55 PM
To: aspngcontrolscs
Subject: [aspngcontrolscs] RE: BaseDataList

Yup, well, it would have been a slimmed down version of it, so
recreation wasn't an issue.

Button column sucks. I hate having a button for every column. I'd
rather be able to click a row and then have one button for edit. In
order for that to work I would have to have Onclick="javaScript:
someFunction()" on each row, but I'm not sure how to get that in there
since I don't know if I can add it to the row object.

-----Original Message-----
From: Andy Smith [mailto:Click here to reveal e-mail address]
Sent: Thursday, June 27, 2002 8:17 PM
To: aspngcontrolscs
Subject: RE: [aspngcontrolscs] RE: BaseDataList

personally... I think you'll have much more luck extending the DataGrid
than trying to recreate the control.

as for the button issue... what's wrong with a ButtonColumn?
the up/down keys would take a little creative clientside code which
would postback with the paging commands. you could emit this script in
OnPreRender of the grid.
    -----Original Message-----
    From: Bryan Costanich [mailto:Click here to reveal e-mail address]
    Sent: Thu 6/27/2002 8:34 PM
    To: aspngcontrolscs
    Cc:
    Subject: [aspngcontrolscs] RE: BaseDataList
    Specifically, I'm trying to recreate the basic DataGrid
functionality, but I want to make is so that you can select a row on the
client side and also add some buttons outside of the grid that when
clicked would post-back to the page and you would be able to access the
selectedItemIndex property. Additionally I would like to use the up and
down arrow keys to cycle through the rows.
    
    I thought about inheriting from DataGrid and then overriding the
Render() method but I imagine I would have to do a LOT more coding than
I want to get it to work right because of the complex functionality of
the DataGrid. Additionally, I'm not even sure if I would have access to
the internal data that I would need to add the client-side onclick
events to each row.
    
    If anyone has seen anything like this working with the datagrid
or has implemented something similar I would love to see it.
    
    -b
    
    -----Original Message-----
    From: Bryan Costanich [mailto:Click here to reveal e-mail address]
    Sent: Wednesday, June 26, 2002 11:18 PM
    To: aspngcontrolscs
    Subject: [aspngcontrolscs] RE: BaseDataList
    
    Something similar to the datagrid.
    
    
    -----Original Message-----
    From: Andy Smith [mailto:Click here to reveal e-mail address]
    Sent: Wednesday, June 26, 2002 10:57 PM
    To: aspngcontrolscs
    Subject: RE: [aspngcontrolscs] BaseDataList
    
    what kind of control are you trying to create?
        -----Original Message-----
        From: Bryan Costanich [mailto:Click here to reveal e-mail address]
        Sent: Wed 6/26/2002 9:02 PM
        To: aspngcontrolscs
        Cc:
        Subject: [aspngcontrolscs] BaseDataList
        Has anyone successfully create a control that inherits
from BaseDataList (the object that DataGrid and DataList inherit
from)??????
        
        Supposedly you have to implement a method called
'CreateControlHeirarchy,' but this is what the SDK has to say about
CreateControlHeirarchy:
        
        This member supports the .NET Framework infrastructure
and is not intended to be used directly from your code.
        
        Right.... cause that does me a lot of good.
        
        
        | [aspngcontrolscs] member Click here to reveal e-mail address = YOUR
ID | http://www.asplists.com/asplists/aspngcontrolscs.asp = JOIN/QUIT |
http://www.asplists.com/search = SEARCH Archives < /BLOCKQUOTE >
    | [aspngcontrolscs] member Click here to reveal e-mail address = YOUR ID |
http://www.asplists.com/asplists/aspngcontrolscs.asp = JOIN/QUIT |
http://www.asplists.com/search = SEARCH Archives
    | [aspngcontrolscs] member Click here to reveal e-mail address = YOUR ID |
http://www.asplists.com/asplists/aspngcontrolscs.asp = JOIN/QUIT |
http://www.asplists.com/search = SEARCH Archives < /BLOCKQUOTE >
| [aspngcontrolscs] member Click here to reveal e-mail address = YOUR ID |
http://www.asplists.com/asplists/aspngcontrolscs.asp = JOIN/QUIT |
http://www.asplists.com/search = SEARCH Archives
Reply to this message...
 
    
Bryan Costanich
Yeah, that's exactly what I did. I actually used Item.Attributes....

Thanks for the reply.

-----Original Message-----
From: David Johnson [mailto:Click here to reveal e-mail address]
Sent: Friday, June 28, 2002 9:21 AM
To: aspngcontrolscs
Subject: [aspngcontrolscs] RE: BaseDataList

You should be able to add the client-side OnClick event by doing
Row.Attributes.Add("onClick","SomeJScriptFunction(this.rowIndex)")

-----Original Message-----
From: Bryan Costanich [mailto:Click here to reveal e-mail address]
Sent: Thursday, June 27, 2002 8:55 PM
To: aspngcontrolscs
Subject: [aspngcontrolscs] RE: BaseDataList

Yup, well, it would have been a slimmed down version of it, so recreation
wasn't an issue.

Button column sucks. I hate having a button for every column. I'd rather
be able to click a row and then have one button for edit. In order for that
to work I would have to have Onclick="javaScript: someFunction()" on each
row, but I'm not sure how to get that in there since I don't know if I can
add it to the row object.

-----Original Message-----
From: Andy Smith [mailto:Click here to reveal e-mail address]
Sent: Thursday, June 27, 2002 8:17 PM
To: aspngcontrolscs
Subject: RE: [aspngcontrolscs] RE: BaseDataList

personally... I think you'll have much more luck extending the DataGrid than
trying to recreate the control.

as for the button issue... what's wrong with a ButtonColumn?

the up/down keys would take a little creative clientside code which would
postback with the paging commands. you could emit this script in OnPreRender
of the grid.

-----Original Message-----
From: Bryan Costanich [mailto:Click here to reveal e-mail address]
Sent: Thu 6/27/2002 8:34 PM
To: aspngcontrolscs
Cc:
Subject: [aspngcontrolscs] RE: BaseDataList

Specifically, I'm trying to recreate the basic DataGrid functionality, but I
want to make is so that you can select a row on the client side and also add
some buttons outside of the grid that when clicked would post-back to the
page and you would be able to access the selectedItemIndex property.
Additionally I would like to use the up and down arrow keys to cycle through
the rows.

I thought about inheriting from DataGrid and then overriding the Render()
method but I imagine I would have to do a LOT more coding than I want to get
it to work right because of the complex functionality of the DataGrid.
Additionally, I'm not even sure if I would have access to the internal data
that I would need to add the client-side onclick events to each row.

If anyone has seen anything like this working with the datagrid or has
implemented something similar I would love to see it.

-b

-----Original Message-----
From: Bryan Costanich [mailto:Click here to reveal e-mail address]
Sent: Wednesday, June 26, 2002 11:18 PM
To: aspngcontrolscs
Subject: [aspngcontrolscs] RE: BaseDataList

Something similar to the datagrid.

-----Original Message-----
From: Andy Smith [mailto:Click here to reveal e-mail address]
Sent: Wednesday, June 26, 2002 10:57 PM
To: aspngcontrolscs
Subject: RE: [aspngcontrolscs] BaseDataList

what kind of control are you trying to create?

-----Original Message-----
From: Bryan Costanich [mailto:Click here to reveal e-mail address]
Sent: Wed 6/26/2002 9:02 PM
To: aspngcontrolscs
Cc:
Subject: [aspngcontrolscs] BaseDataList

Has anyone successfully create a control that inherits from BaseDataList
(the object that DataGrid and DataList inherit from)??????

Supposedly you have to implement a method called 'CreateControlHeirarchy,'
but this is what the SDK has to say about CreateControlHeirarchy:

This member supports the .NET Framework infrastructure and is not intended
to be used directly from your code.

Right.... cause that does me a lot of good.

| [aspngcontrolscs] member Click here to reveal e-mail address = YOUR ID |
http://www.asplists.com/asplists/aspngcontrolscs.asp = JOIN/QUIT |
http://www.asplists.com/search = SEARCH Archives < /BLOCKQUOTE >

| [aspngcontrolscs] member Click here to reveal e-mail address = YOUR ID |
http://www.asplists.com/asplists/aspngcontrolscs.asp = JOIN/QUIT |
http://www.asplists.com/search = SEARCH Archives

| [aspngcontrolscs] member Click here to reveal e-mail address = YOUR ID |
http://www.asplists.com/asplists/aspngcontrolscs.asp = JOIN/QUIT |
http://www.asplists.com/search = SEARCH Archives < /BLOCKQUOTE >

| [aspngcontrolscs] member Click here to reveal e-mail address = YOUR ID |
http://www.asplists.com/asplists/aspngcontrolscs.asp = JOIN/QUIT |
http://www.asplists.com/search = SEARCH Archives

| [aspngcontrolscs] member Click here to reveal e-mail address = YOUR ID |
http://www.asplists.com/asplists/aspngcontrolscs.asp = JOIN/QUIT |
http://www.asplists.com/search = SEARCH Archives
Reply to this message...
 
 
System.Web.UI.WebControls.BaseDataList
System.Web.UI.WebControls.ButtonColumn
System.Web.UI.WebControls.DataGrid
System.Web.UI.WebControls.DataList
System.Windows.Forms.DataGrid




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com