", 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
-----------------------------
CustomGridControlCode.zip
SIGN IN To post a reply.
3 Replies
AD
Administrator
Syncfusion Team
July 1, 2006 12:00 AM UTC
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
MS
manoj singh
July 1, 2006 09:02 AM UTC
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.
GridCode_CallBackPanel.zip
MS
manoj singh
July 1, 2006 09:28 AM UTC
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
SIGN IN To post a reply.
4/20/2024 12:32:43 PM
Sat, 03 December 2022 16:59:00 UTC
12/03/2022 04:59:00 AM
Wed, 16 Feb 2022 04:59:00 UTC
|