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: 3/29/2007 8:50:03 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 1 Views: 57 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
2 Items, 1 Pages 1 |< << Go >> >|
NissanSE98
Asp.Net User
Tree View Database Control - trying to select gridview primary key to return to tree view3/29/2007 8:50:03 PM

0/0

I have a treeview control that gets information from a database. I have everything working when it's in the page_load event. However, when I set the primary key to gridview.selecteddatakey(0), I get the null error. I tried doing an IF gridview.selecteddatakey(0) is vbnullstring then exit sub, but it still doesnt like the gridview.selecteddatakey(0). Anyway, so, I want the treeview to populate upon the select button. I'll his the select button on the gridview and then have it populate. I renamed the subroutine to tree1 and added OnClick="tree1" to the selected button. Now, when I run the page, I get:

 

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30408: Method 'Private Sub tree1(sender As Object, e As System.Web.UI.WebControls.TreeNodeEventArgs, a As System.EventArgs)' does not have the same signature as delegate 'Delegate Sub EventHandler(sender As Object, e As System.EventArgs)'.

Source Error:


Line 190:            SelectCommand="SELECT * FROM [Invoices]"></asp:SqlDataSource>
Line 191: <br />
Line 192: <asp:Button ID="Button1" runat="server" Text="Button" OnClick="tree1" /><br />
Line 193: <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource2" DataKeyNames="PrimaryKey">
Line 194: <Columns>


 

 

I dont know what this means. I tried putting delegate in front but then i got more errors. 

Zhao Ji Ma - MS
Asp.Net User
Re: Tree View Database Control - trying to select gridview primary key to return to tree view4/2/2007 1:51:42 PM

0/0

Hi NissanSE98,

You need a method called tree1

<asp:Button ID="Button1" runat="server" Text="Button" OnClick="tree1" /><br />

 e.g:

    void GreetingBtn_Click(Object sender,
                           EventArgs e)
    {
...

    }

... ...
    
      <asp:Button id="Button1"
           Text="Click here for greeting..."
           OnClick="GreetingBtn_Click"
           runat="server"/>

For full example, please see:

http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.button.click.aspx


Zhao Ji Ma
Sincerely,
Microsoft Online Community Support

?Please remember to click ?Mark as Answer? on the post that helps you, and to click ?Unmark as Answer? if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ?
2 Items, 1 Pages 1 |< << Go >> >|


Free Download:


Web:
Tree View Database Control - trying to select gridview primary key ... Tree View Database Control - trying to select gridview primary key to return to tree view. Last post 04-02-2007 9:51 AM by Zhao Ji Ma - MSFT ...
GridView: Move Over DataGrid, There's a New Grid in Town! The GridView comes with a pair of complementary view controls: DetailsView and .... into hierarchical data-bound controls such as the new TreeView control. ...
CodeProject: Refresh a GridView control on the parent page, from a ... I simply populate the GridView from the database, using a SELECT query in the .... NET TreeView control from client-side script. How to group RadioButtons ...
15 Seconds : Visual Studio 2005 Hands-On Tutorial - Part 3 In the middle left cell, drop a TreeView control (from the Navigation section). ... columns are in the GridView, the selected value will be the primary key ...
Programming | ASP.NET | Understanding ASP.NET User Control Jul 30, 2006 ... Navigate to the database, expand the tree and expand the tree titled Tables. ... the link End Template Editing to return to the Design view. ...
Populating Tree View nodes from sql server 2000 - C# - Source Code ... Mar 8, 2007 ... Here i have discussed the tree view control which gets the nodes ... Alternatively, You can select the treeview and press the f4 key. ...
TheMSsForum.com >> Asp >> ASP.NET Treeview selectedNodeStyle - The ... When I select a record on the Gridview I'm presented with the ..... issue of the TreeView control, the dev team has recorded this for fixing in ...
Learn to Use the New Data Source Controls in ASP.NET 2.0 Next, drag-and-drop a GridView control to the page and bind it to .... and select the Slate scheme. Now, switch to Source view and add the bold portion of ...
CodeProject: Selector Radio Button for GridView. Free source code ... Mar 2, 2008 ... A radio button to select a record in an ASP.NET GridView control.; Author: David Hay; ... NET TreeView control from client-side script. ...
Dynamically Templated GridView with Edit, Delete and Insert ... i am binding all my tables to my treeview and when i click on one table this code ..... I'm trying to create a CheckBox templated column for a bit database ...




Search This Site:










skin problem in ie

deny users and anonymous

issues with windows authentication

accessing masterpage properties inside a usercontrol

themes, themes, themes

validaterequest

v2.1.2 - validation for register users module?

using the block in my own namespace.

how do you setup windows authentication in dnn 3.2

grid view updating using gridview_updating in asp.net 2.0

why can't i add a new user!!!!!

is samaccountname the only way to go?

volunteer for access sitelogs wanted

problem in the documentation

how can i add line break in sitemap

error during installation of pa

help! i changed my login page!

how do i change the width of a tab?

error while build dnn 3.0.13

button click not firing the event !!!

custom security framework with permissions

installing on win xp pro and sql server 2000

why visual web 2005 express is taking so long to open a local page?

installed under donnetnuke directory i am getting this error message

password & pin

populate treeview programatically

what are the consequences of setting e.cancel to true in the membership sendingmail event handlers?

avoid ultima hosts (review)

is asp.net 2.0 official yet ?

pesonalization without web parts

 
All Times Are GMT