We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Wierd Problem with Callback with custom control

Thread ID:





45929 Jun 30,2006 09:21 AM Jul 1,2006 05:28 AM ASP.NET Web Forms (Classic) 3
Tags: Tools
manoj singh
Asked On June 30, 2006 09:21 AM

Hi, I am having very wierd problem with callback. I have Custom Grid Control which is placed under callbackpanel. This Custom Grid is getting populated on Click of treeview control. So when i click on treeview control, i could see grid is getting populated and its data is been shown on the page. This grid control has column, on click of which I am processing some pages and then coming back to the old page were I have that Custom Grid Control Placed.When I come back to this page, surprisingly my Custom Grid Control is not visible. I can see the data is getting created but grid control is not visible. When I saw the "View Source" of my browser page, i could see nothing in that particular area. Like only "Table" tag is getting created but not the entire "Table" set like "
", where as when i could see the Grid, its showing complete "Table" set. Now again I click on TreeView, again i could see the datagrid. I have set the viewstate property to "True" and everything but nothing is working out. Attaching sample CustomGridControl Zip file. Code for CallbackPanel -----------------------------
Please tell me what wrong I am doing here with. Thanks & Regards, Manoj Singh.

Administrator [Syncfusion]
Replied On June 30, 2006 08:00 PM

Hi Manoj, I am not sure I understand, What do you mean by ''Custom Grid Control'' are you saying about UserControl? and I couldn''t find any code relevent to the callback panel in your code. Can you please provide me the entire sample so that I can know about the issue. I don''t think the issue is with callback, Can you please check this by keeping the grid outside the callback control?. The issue you might be encountering should be because you might not be binding the grid in the Page_Load and only when clicking on the treeview you might be binding. so that when you call some page by clicking the hyperlink from the grid and navigating to some other page and after that when you return back to this page(where the grid is available) it is obvious that there won''t be grid visible Let me explain the scenario, I suspect to be the issue. -------------------------------------------------------- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> a) Consider a grid is populated when clicking on a button b) The grid has a hyperlink and when you click on that hyperlink a new page is opened in the same browser c) Then by clicking on a back button/link in that page. you want to display the page where the grid is available and the grid to be visible with the last populated data''s. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> if the above is the scenario then based on some conditions. you can fill the grid and call ''GridView1.DataBind()'' in the Page_Load Event. Your code will be something like this (pseudo code) protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { //Here check with some conditions, hope the HTTP_REFERER you were saying about in dropdown''s should help here // FillGrid1();you can either fill the grid using any of the options like binding to dataset/datatables/datasource controls etc... GridView1.DataSource = table; GridView1.DataBind(); } } //also in ButtonClick for example(you might be using treeview here instead) protected void Button1_Click(object sender, EventArgs e) { GridView1.DataSource = table; GridView1.DataBind(); } We might be missing something, in understanding the scenario if so please let us know. Best Regards, A.Sivakumar

manoj singh
Replied On July 1, 2006 05:02 AM

Hi Siva, Thanks for understanding my problem. You got me right, I am using "WebUserControl" for datagrid, and i bind my datagrid in WebUserControl only. I could see in Trace information that Grid is getting binded and its firing ItemDataBound Event also from datagrid. So I am not understanding why its not getting visible. After taking off from CallbackPanel also this grid is not visible. Attaching here source code for WebUserControl and CallbackPanel. Thanks & Regards, Manoj Singh.


manoj singh
Replied On July 1, 2006 05:28 AM

Hi Siva, Thanks for all help and support. I could solve the problem. Now its working fine and showing the data. Thanks again Regards, Manoj Singh


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.