.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

have collapsiblePanelExtender event call databind

Posted By:      Posted Date: October 26, 2010    Points: 0   Category :ASP.Net

using vb.net/asp.net 2005

I have an outerGridview and for each row returned I am displaying a collapsiblePanelExtender and when the user clicks on the collapsiblePanelExtender it displays the results of the InnerGridview.

My problem is that it takes several minutes for all data to be returned so what I am thinking is this:

Return a record for each OuterGridview since this is only displaying one field (a ProductCategoryID) and then when the user clicks on the collapsiblePanelExtender call some function, probably an AJAX page that will query the database and then fill the InnerGridview for the results (products) based on the selected ProductCategoryID.

has anyone done something like this?

I've done something similar with linkbuttons but never with CollapsiblePanelExtenders.



View Complete Post

More Related Resource Links

databind from a custom function call


in datalist templatefield, i want to bind an imagebutton's visible property. the scenario is .. it is a picture comments page like one in facebook. if its your own comment, the delete button is shown, otherwise not.  the problem is .. for the imagebutton i want to set visible = false, if the user logged in is the same user as the one who commented. how can i do that ? please help

currently im using this code on datalist databind event. but the label is returned as null

public bool set_visibility()
        Label lb = DataList3.FindControl("Label7") as Label;

        if (lb.Text == Session["user_id"].ToString())
            return true;
            return false;

findcontrol dosent return the control.

When to call DataBind on GridView?

So I have a GridView and several events that can be triggered (such as filtering and inserting a new record) to manipulate the GridView.  I want to make sure that I'm not calling DataBind on Page_Load, especially since I might have to call it again when certain events fire.  Is there a way I can make it so I only have to call DataBind once on the GridView after Page_Load and anything else has fired?  Like some event that will absolutely fire last where I can put my DataBind?  The reason I need to do this is because the DataSource for the GridView is set programmatically from a DataView when the page is loaded, so DataBind needs to run every time.  Just, hopefully, not multiple times each time...

Gridview edit mode - What event does enter key call?

I have sort of a very specific problem.  I have a gridview with a few different template columns and a commandfield with the standard "edit" link.  There is no sqldatasource associated with it at all.  In the code, I pull some data from an sql database into a datatable and set the gridview's datasource to be the datatable.This all works fine.  When I hit the "edit" button, the standard textbox shows up where it needs to so that I can edit the data.  The problem is the updating portion.  I have programatically removed the "update" button and left the "cancel" button for design reasons. I want the user to be able to hit "enter" in order to update the data in the data table.  Then, when they're ready, they can click a submit button which will extract the data from the datatable and update the database.I'm having trouble with this 'enter key' business.  When you edit the data and hit "enter" while in edit mode, the page posts back, and the previous values are placed in the gridview.  What event was just  called?  I need a way to take what the user put in and place it in my datatable.  What are my options?Thank you. 

How to call a method with IDataObject in click event in wpf?

As I'm new in WPF development, I came up with a problem, looks like simple, however, I couldn't solve. The problem is, how to call a method with IDataObject in a click event?? I've a method like:  public void setProperty(IDataObject obj)         {                                      PropertyGrid mygrid = new PropertyGrid();                        UIElement elt = ExtractElement(obj);             Type t = elt.GetType();             string name = (string)t.GetProperty("Name").GetValue(elt, null);             mygrid.Instance = name;         } I want to call this method in a click event. I don't know how to. I've tried but couldn't yet. Any help will be appreciated regarding this. Thank you.   Regards, Binaya

call static event from non static procedure

Hai, I have a static event and i want to load this event from a non static procedure but it shows to add object reference , i use this code c#         public delegate void LoadListEventHandler();         public event LoadListEventHandler LoadList;         private static void LList()         {             LoadList();         } please tell me how can i call LoadList event thanks.

how to call a function or event using jquery Ajex

<asp:Button id="Bu_DocShareSave" runat="server" Text="Save Share" OnClick="Bu_DocShareSave_Click"/>protected void Bu_DocShareSave_Click (object sender, System.EventArgs e){            string S_DocShareID=CCUtility.ToSQL(Utility.GetParam("txt_DownloadFileID"),FieldTypes.Number);            string S_DocStorage=CCUtility.ToSQL(Utility.GetParam("dbo_Storage"),FieldTypes.Text);            string S_DocShareToEmp=Utility.GetParam("dbo_Emp");            string[] SA_DocShareToEmpSplit = S_DocShareToEmp.Split(',');                        int a=0;                         foreach (string Empid in SA_DocShareToEmpSplit){                        if(!Empid.Equals(""))                   {                      

asp:Button inside a SharePoint Dataview's Rows with onclick event does not call C# function. Pull i

asp:Button inside SharePoint Dataview Rows with onclick event does not call C# function. Pull it out of Dataview and works fine. I have a ASP.NET Button I've placed inside a SharePoint  DataView's rows with an onclick event pointing to C# function block inside my page. The page refreshes when I click on them, but it's not hitting that code block. If I move the button to outside the dataview and make the ID fixed, the code works beautifully. what's up with that? the button in the Dataview: td class="ms-vb" style="width: 70px"><asp:Button runat="server" Text="Delete" id="Delete{@ID}" CommandArgument="{@FileRef}" OnClick="DeleteDoc"/> </td> my C# onclick handler (inline C# on the page) void DeleteDoc(object sender, EventArgs e) { Button b = sender as Button; .. more code The buttons are rendered and they look like this: input type="submit" name="ctl00$PlaceHolderMain$g_08acadfd_957b_4112_a426_cc7c81991c1e$Delete1" value="Delete" id="ctl00_PlaceHolderMain_g_08acadfd_957b_4112_a426_cc7c81991c1e_Delete1" Thie code block in inline and I'm working from SharePoint Designer. Not sure how I can troubleshoot this.  Am I missing something here, maybe I need to add an Itemtemplate or something like we need to in the ASP.N

How to call java script in grid rowdatabound event

Guys I want some help on this issue my code goes like this protected void grdResults_RowDataBound(object sender, GridViewRowEventArgs e)    {        if (e.Row.RowType == DataControlRowType.DataRow)        {                       TextBox txtQty = e.Row.Cells[1].FindControl("txtQty") as TextBox;            Label lblTWeight = e.Row.Cells[9].FindControl("lblTWeight") as Label;            Label lblTMHRS = e.Row.Cells[10].FindControl("lblTMHRS") as Label;            Label lblTLabor = e.Row.Cells[11].FindControl("lblTLabor") as Label;            Label lblTMaterial = e.Row.Cells[12].FindControl("lblTMaterial") as Label;            Label lblTCost = e.Row.Cells[13].FindControl("lblTCost") as Label;            string onComp = "getTotalComplete(document.getElementById('" + txtQty.ClientID + "'));&q

how to call a event another page & refresh other page jquery

!) i have two page a with event   Bu_DocSearch_Click (object sender, System.EventArgs e)  i require it call another page and reftesh automatically protected void Bu_DocSearch_Click (object sender, System.EventArgs e){            //+" order by a.ID";            string sql="";            string S_SubjectContain=CCUtility.ToSQL((Utility.GetParam("txt_SubjectContain")+"%"),FieldTypes.Text);;            string Find=" and a.Subject Like "+S_SubjectContain;            //string Find=" and a.Subject ='"+S_SubjectContain+"%'";                                ArrayList SelectedChkBox =new ArrayList();                SelectedChkBox =Utility.CheckboxSelected(CheckBoxBind);                    string Inclause="";            for(int i=0;i<SelectedChkBox.Count;i++){ 

FormView doesnt call itemupdating event?


Hello all,

So, to sum is up, I have a FormView:

        <asp:FormView ID="fvSubscriptionEdit" DefaultMode="Edit" runat="server" GridLines="None"
            CssClass="SubEditPanel" OnItemUpdating="fvSubscriptionEdit_ItemUpdating">
                    Abonnement wijzigen</h2>
                <asp:HiddenField runat="server" ID="hfSubscriptionId" Value='<%# Bind("SubscriptionId")%>' />
                <asp:Label runat="server">Type wijzigen</asp:Label>
                <asp:DropDownList ID="ddlTypeEdit" runat="server" SelectedValue='<%# Bind("SubscriptionType")%>'>
                    <asp:ListItem Text="- Kies -" Value="1" />
                    <asp:ListItem Text="Upgrade" Value="upgrade" />
                    <asp:ListItem Text="Verlengen" Value="verlengen" />
                <hr />
                    Credits wijzigen</h2>
                <asp:Label runat="server">Nieuw aantal credits</asp:Label>

How to call a button click event on from an event handler



I got an event handler like this, in this event, i wanted to call another button click event. How can I do that?

protected void gwDetail_SaveCommand(object sender, System.EventArgs e)
            lblMsg.Text = "Saving...";


if (ds.Tables[0].Rows.Count == 0)

how to call button click event of ascx page in the button click event of aspx page



i'm using user control in my page.i need to call the button click event of user control in the button click event of aspx page based on some condition.is it possible?can any one help me?

view state doubled if i call prerender event


i have one method which save datatable in viewstate.

i am calling this method in

1. page_load

2. Prerender

the page was every heavy,

i did tracing of page i found due to calling of method from preprnder it doubled the viewstate size

what was the reseon behind this.

Cannot call the button_Click event



I would really appreciate if someone can solve this below sample of code. (This is a solution for all those who want to know how to load  a usercontrol inside a popUp.)

The solution works perfectly except that, after the popup is loaded, when you hit Enter, I want to call the btn_ok (button click event) of the Child.ascx that should MessageBox(the event is fired..) but now it fails to call teh button_Click event.

Please find my whole code step by step below:


    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager5" runat="server">
              <asp:PlaceHolder ID="phlDefault" runat="server" />


    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim UC As New UserControl
        UC = LoadControl("NewSearch.ascx")
    End Sub



<%@ Register Src="~/Popup.ascx" TagName="Child" TagPrefix="uc" %>

<uc:Child ID="uc_Child" runat="se

How to call Picuture box mouse up event in the Picture box paint event..


Hi, I have problem that whatever the graphics that i have drawn on the picture box in the Picture box mouse up evnet is not persist while i minimise or maximise the window. To solve this problem i came to know that i need to redraw everything on picture box paint event also.so i need to know that how to calll the picture box mouse up event in the picture box paint event..I don't know whether i am going in the right path or not to solve this above problem..Any help can be appreciated.. Here is my code in the Picture mouse up event...

private void pictureBox1_MouseUp(object sender, MouseEventArgs e)
            blnDrawing = false;
            blnErasing = false;

              if (circle == 1 || text == 1 || ellipse == 1 || arrow == 1)

                    if (circle == 1)


How to call a javascript click event from ASPx?


this is kind of wierd but I need to use behindcode or aspx code to call a javascript click event.  The reason is because, I have two controls.  One control is a javascript controls tabs.  The other control is a panel.  The panel has a bunch of controls and depending on which tabs are being selected, the panel will switch to panel1,2,3,4 depending on if the user click tab1,2,3,4.

I've got the upper part programmed by using a __doPostback to the update panel.

However, in this case, I need to program the opposite because when the user switches the panel, the tab must be switched.

So here's what I got when a user clicks the tabs:

<a href="#" onclick="easytabs('1', '1');__doPostBack('UpdatePanel2', 'Tab1');return false;" onfocus="easytabs('1', '1');" title="" id="tablink1">

So I need a server side function such that when a user clicks <asp:LinkButton> or something, it will also call "easytabs('1','1');

How to track Collapse/ Expand event of AJAX Collapsible Panel Extender to call javascript ?



I am working with AJAX Panel Collapsable panel extender.

The Panel which is to be collapsed/Expanded using AJAX panel Extender contains one custom control, containing 3 Radio buttons one of them is set checked through a javascript function when page loads. I have kept the default property of AJAX collapsable panel as Collapsable.

Script for AJAX Collapsible Panel Extender is as follow. 

 <ajax:CollapsiblePanelExtender ID="cpeSOP" runat="Server" CollapseControlID="pnlCollapsable"
   CollapsedSize="0" Collapsed="True" CollapsedImage="~/public/img/arrowRightWhite.gif"
   ExpandControlID="pnlCollapsable" ExpandDirection="Vertical" ExpandedImage="~/public/img/arrowDownWhite.gif"
   ImageControlID="Image1" SuppressPostBack="true" TargetControlID="pnlSearchCriteria">

But problem is that when page loads, collapsible panel gets collapsed but it resets the radio buttons in custom control. i.e. First radio button does not get checked. Script for Collpsable panel is as follow. I want to call some javascript code when the panel is Collapsed or Expanded. Is there any way to track Coll

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend