CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!



Zone: > NEWSGROUP > Asp.Net Forum > visual_studio.visual_studio_2005 Tags:
Item Type: NewsGroup Date Entered: 2/21/2008 10:05:06 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 2 Views: 30 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
3 Items, 1 Pages 1 |< << Go >> >|
c1derly
Asp.Net User
Unable to use custome delegate with no input arguments in updatepanel2/21/2008 10:05:06 AM

0/0

I have created a custome web control that inherits from a grdiview.  I was asked to create a custom event called deselect which fires when 1 or more rows have been selected and as a result of a user action causes there to be no rows selected.  There were to be no arguments passed into this event so I created a custom delegate.  The update panel doesn't recognize the event as event without input arguments though.  Is there any way around this?

Samu Zhang - MS
Asp.Net User
Re: Unable to use custome delegate with no input arguments in updatepanel2/24/2008 10:05:39 AM

0/0

Hi c1derly ,

Please post your code .

 


Sincerely,
Samu Zhang
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.
c1derly
Asp.Net User
Re: Unable to use custome delegate with no input arguments in updatepanel2/26/2008 12:15:13 PM

0/0

 Here is the code.

This is the declaration of the delegate and the event varialble.

        public delegate void onNestedGridViewDeslectEvent();

        [Category("NestedGridViewAction")]
        public event onNestedGridViewDeslectEvent deselect;

 Update panel and its contents

 <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" >
    <ContentTemplate>
        &nbsp;

<cc1:nestedgridview id="NestedGridView1" runat="server" cellpadding="4"
    childpagesize="5" childpaging="False" collapsetext="~/Configuration/Images/collapse.gif"
    expandcolumnwidth="18px" expandtext="~/Configuration/Images/expand.gif" forecolor="Black"  multiselection="True" parentchildcongruent="True"
    relationname="ParentChildEntry" width="100%" DataSourceID="ods" DataKeyNames="pom_entry_pk" OnSelectedIndexChanged="NestedGridView1_SelectedIndexChanged" setChildDataKeyNames="pom_entry_pk,prnt_pom_entry_pk" BackColor="#CCCCCC" BorderColor="#999999" BorderStyle="Solid" BorderWidth="3px" CellSpacing="2" Ondeselect="NestedGridView1_deselect" OnmultiSelectionStatusChanged="NestedGridView1_multiSelectionStatusChanged"  style="display:none">
<FooterStyle BackColor="#CCCCCC"></FooterStyle>

<HeaderStyle BackColor="Black" ForeColor="White" Font-Bold="True"></HeaderStyle>

<PagerStyle BackColor="#CCCCCC" ForeColor="Black" HorizontalAlign="Left"></PagerStyle>

 

<SelectedRowStyle BackColor="#000099" ForeColor="White" Font-Bold="True"></SelectedRowStyle>
<RowStyle BackColor="White"></RowStyle>
</cc1:nestedgridview>
<asp:ObjectDataSource TypeName="Siemens.MES.CAB.TPLPOH.Domain.Interfaces.IBreadHierarchicalEntries" SelectMethod="getEntries" OnObjectCreating="ods_ObjectCreating" ID="ods" runat="server">
 <SelectParameters>
  <asp:SessionParameter DefaultValue="-1" SessionField="orderPK" Name="orderPk" />
 </SelectParameters>
</asp:ObjectDataSource>
        <asp:Panel ID="Panel1" runat="server" Width="100%">
            <asp:Button ID="btnDownload" runat="server" CssClass="button" OnClick="btnDownload_Click"
                Text="Download" Width="133px" />&nbsp;
                 <asp:Button ID="btnProperties" runat="server" CssClass="button" OnClick="btnProperties_Click"
                Text="Properties" Width="133px" />
                 <asp:Button ID="btnEdit" runat="server" CssClass="button" OnClick="btnEdit_Click"
                Text="Edit" Width="133px" />
          
            <asp:Button ID="btnSplit" runat="server" CssClass="button" OnClick="btnSplit_Click"
                Text="Split" Width="133px" />
           
          
            <asp:Button ID="btnChangeStatus" runat="server" CssClass="button" OnClick="btnChangeStatus_Click"
                Text="ChangeStatus" Width="133px" />
            &nbsp; &nbsp;
            <asp:HyperLink ID="hypOpenPopup" runat="server" Target="_blank">HyperLink</asp:HyperLink></asp:Panel>
    </ContentTemplate>
    <Triggers>
<asp:AsyncPostBackTrigger  ControlID="NestedGridViewSingleSelection1$NestedGridView1" EventName="SelectedIndexChanged"/>
<asp:AsyncPostBackTrigger  ControlID="NestedGridViewSingleSelection1$NestedGridView1" EventName="deselect"/>
<asp:AsyncPostBackTrigger  ControlID="NestedGridViewSingleSelection1$NestedGridView1" EventName="childGridView_SelectedIndexChanging"/>

</Triggers>
</asp:UpdatePanel>

 

Function Declared In the code to link the deselect event.

    protected void NestedGridView1_deselect()
    {

        Session.Add("orderPK", "-1");
        ((ObjectDataSource)this.Page.FindControl("NestedGridViewMultiSelection1$ods")).Select();
        ((NestedGridView.NestedGridView)this.Page.FindControl("NestedGridViewMultiSelection1$NestedGridView1")).Style.Add("display","none");

    }

3 Items, 1 Pages 1 |< << Go >> >|


Free Download:


Web:
Unable to use custome delegate with no input arguments in ... Unable to use custome delegate with no input arguments in updatepanel. Last post 02-26-2008 7:15 AM by c1derly. 2 replies. Sort Posts: ...
ng.asp-net-forum.visual_studio_2005/5 - Fix error problem @CodeVerge Unable to use custome delegate with no input arguments in updatepanel, 2, 11, 2/ 26/2008 12:15:13 PM. Unable to create web site on Windows Server 2003 ...
Onteora Software - 2006 Do not update the contents inside a UpdatePanel with java script. ... This api takes two arguments a string which will be the command line argument when the ...
TheMSsForum.com >> Dotnet >> CAL for Windows Server 2008 in a ... However, I want to use a delegate in VB to asynchronously run a method in one of ... I want to pass a good user/pass combo using command-line arguments (no ...
Single Source for the Latest .NET Jobs and Info -- .NET Reporter NET Exception Handling links I wondered why in the article Rich Custom ..... Unable to call parameterized constructor for type arguments in Generic class. ...
Valery&Galina's Blog As a result, no SOAP is involved whatsoever and the body of the request simply contains the JSON stream of input arguments. For non-AJAX requests, ...
A Continuous Learner's Weblog: January 2007 NET project that contains numerous custom attributes targeted at performing business ..... NET application - "Unable to start debugging on the web server. ...
CodeProject: Build Google IG like Ajax Start Page in 7 days using ... So, Start Page is not something that you should make using UpdatePanel and .... I'd like to use only your custom drag & drop extender and multicolumn drop ...
Sanjeetosphere If I tried to use one more class, it failed with the message: Unable to load type 1002. Please note that its suggested in the documents that custom user ...
.NET ASP Page 28 - Bytes Site Map USe of INamingContainer while creating custom control. session related issue .... Ajax Problem: UpdatePanel with dropdownlist jumps to bottom of the page ...




Search This Site:










what is the best way to publish a website?

vb.net / asp.net internet app.

extending website property pages

how can i rebuild my website?

web references and source control

difference between web site project, and web application project?

upgrade from vs.net 1.1 to 2.0

how to show line number

"if you have references in markup, they will not be renamed" error message generated

code folder contents

stored procedures w/multiple resultsets in dataset designer??

vs2005 - feature

using the 2005 ide but still the 1.1 runtime

dximagetransform.microsoft.alphaimageloader problem in the vs2005 design time?

team foundation server & sps

vs picking up 2 class defs

switching between code/designer? (f7) (web application project type)

how to

auto matching brackets

unable to add references to a website on a remote computer

nothing in the "recent projects" window

dropdownlist and intellisence

command-line arguments and debugging

vs 2005 set up and web project issues

help! stopping dropdownlist listitem value="" from disappearing on design view change in vs2005

how to add checkbox in datagridview using datagridviewcheckboxcolumn?im new to windows application

my tableadapter doesn't show up on the toolbox

asp.net development server: port in use (but it's not!)

access users exchange account

handling multiple languages in one project

  Privacy | Contact Us
All Times Are GMT