Showing posts with label occurred. Show all posts
Showing posts with label occurred. Show all posts

Wednesday, March 28, 2012

Tab Container and GridView

Hello

Does any peopel try to use the GridView Paging with the Tab Container? It is because when I try to click to page 2.

Following problem occurred.

Specified argument was out of the range of valid values.
Parameter name: The StartRowIndex '10' is out of range. Current item count is '0'

Hi Hnchan,

Here is the sample which you can reference to. Please compare it with yours.

<%@. Page Language="C#" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script runat="server"></script><html xmlns="http://www.w3.org/1999/xhtml"><head id="Head1" runat="server"> <title>Untitled Page</title></head><body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:Panel ID="Panel2" runat="server"> <ajaxToolkit:TabContainer ID="TabContainer1" runat="server"> <ajaxToolkit:TabPanel ID="TabPanel1" runat="server"> <HeaderTemplate> Tab1</HeaderTemplate> <ContentTemplate> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="EmployeeID" DataSourceID="SqlDataSource1" AllowPaging="true" PageSize="3"> <Columns> <asp:BoundField DataField="EmployeeID" HeaderText="EmployeeID" InsertVisible="False" ReadOnly="True" SortExpression="EmployeeID" /> <asp:BoundField DataField="LastName" HeaderText="LastName" SortExpression="LastName" /> <asp:BoundField DataField="FirstName" HeaderText="FirstName" SortExpression="FirstName" /> <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" /> <asp:CommandField ShowEditButton="True" /> </Columns> </asp:GridView> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NORTHWNDConnectionString%>" SelectCommand="SELECT [EmployeeID], [LastName], [FirstName], [Title] FROM [Employees]"></asp:SqlDataSource> </ContentTemplate> </ajaxToolkit:TabPanel> <ajaxToolkit:TabPanel ID="TabPanel2" runat="server"> <HeaderTemplate> Tab2 </HeaderTemplate> <ContentTemplate> <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox> </ContentTemplate> </ajaxToolkit:TabPanel> </ajaxToolkit:TabContainer> </asp:Panel> </form></body></html>
Also you can add an UpdatePanel and put the GridView inside the UpdatePanel .Thanks.
Best regards,
Jonathan

I am sorry to say that it still does not work. Is this the problem related the ObjectContainerDataSource from WCSF?


Hi Hnchan,

So what's your Ajax Control Toolkit's version? Mine is V10618.

hnchan:

Is this the problem related the ObjectContainerDataSource from WCSF?

It's hard to say.Would you please wholly copy my source code and have a test.If all these don't work, we really need more information to find out the exact root cause.

I hope this help.

Best regards,

Jonathan

Saturday, March 24, 2012

TabContainer and TabPanel - Error Rendering Control, An unhandled exception has occurred.

I get this error in the designer when I place either TabContainer or TabPanel on any page in my project. I also get it if I look at the Tabs.aspx page in the toolkit sample website that comes with the source code. This has been happening for a while now and is rather anoying.

Anyone else get this error in the designer?

I only get it on the TabPanel
No resolution found yet


Are you saying that if you open Tabs.aspx from the SampleWebsite in the designer you get this error? Or when you run the page?

In either case, I don't see the problem. More info might help narrow it down.


Yes you do get this error if you have no ScriptManager control on your page. I assume you did the obvious and add one. Otherwise you've got an installation problem, because it works for me.

As of the Latest Release 23/01/2007 the errors are gone.Smile


I'm looking at putting together a bit of a better designer for tabs hopefully for the next release.

Thank you for your time. I look forward to the next release.


Currently, I'm experiencing the same error with the latest release.

Have you tried the following:

Make sure there is a ScriptManager as the top most component of the page or if you have a ScriptManager on a MasterPage then make sure it is before your Content areas.

Have you tried the following:

Make sure there is a ScriptManager as the top most component of the page or if you have a ScriptManager on a MasterPage then make sure it is before your Content areas.

Have you tried the following:

Make sure there is a ScriptManager as the top most component of the page or if you have a ScriptManager on a MasterPage then make sure it is before your Content areas.

Have you tried the following:

Make sure there is a ScriptManager as the top most component of the page or if you have a ScriptManager on a MasterPage then make sure it is before your Content areas.
I am also haveing the same issue. I started a new AJAX Website from the template provided and when I drag a tab panel onto the page I get the above error. I don't have an old version since I just downloaded it today.

Did anyone figure out the solution to this? I too downloaded a new version, only this tool is still giving me a problem by not working at all.