Configuring The ObjectDataSource For Sorting?
Feb 2, 2011
System.NotSupportedException was unhandled by user code
Message=The data source does not support sorting.
Source=namespace
StackTrace:
at namespace.Admin.ToolkitScriptManager1_AsyncPostBackError(Object sender, AsyncPostBackErrorEventArgs e) in C:projectMaster.cs:line 27
at System.Web.UI.ScriptManager.OnAsyncPostBackError(AsyncPostBackErrorEventArgs e)
at System.Web.UI.PageRequestManager.OnPageError(Object sender, EventArgs e)
at System.Web.UI.TemplateControl.OnError(EventArgs e)
at System.Web.UI.Page.HandleError(Exception e).......
below is my code using for simple gridview and i am only having problem with the sorting and paging is working as expected and i even define the ONSorting event but it still throws me an error: The data source does not support sorting.
namespace mynamespace
{
public class Product
{
private int _id;
public int Id
{
get { return _id; }
set { _id = value; }
}
private string _code;
public string Code
{
get { return _code; }
set { _code = value; }
}
private string _name;
public string Name
{
get { return _name; }
set { _name = value; }
}
<asp:GridView ID="GridView1" runat="server" DataKeyNames="Id"
AutoGenerateColumns="False" OnSorting="gridview1_Sorting" DataSourceID="ObjectDataSource1" >
<Columns>
<asp:CommandField ShowEditButton="True" />
<asp:BoundField DataField="Id" HeaderText="Id"
SortExpression="Id" ReadOnly="True" />
<asp:BoundField DataField="Code" HeaderText="Code"
SortExpression="Code" />
<asp:BoundField DataField="Name" HeaderText="Name"
SortExpression="Name" />
<asp:TemplateField HeaderText="State/Province" SortExpression="StateProvinceName".......
View 1 Replies
Similar Messages:
Sep 16, 2010
So, I have 3 table adapters in my dataset, and trying to configure the objectDataSource will not give me the option to select the correct table adapter.
I set up a temporary website to illustrate what I am talking about, along with pics, not much, just 4 pics.
https://sites.google.com/site/configuringobjectdatasource/
The first 2 pics are irrelevant but just in case anyone thinking I don't have it set up properly. The other table adapters are working fine, which I have gridviews being populated etc.
why it will not give me the option to select aspnet_GetRecordDatesTableAdapter?
View 9 Replies
Feb 2, 2011
how I do a sorting in a gridView with data bound by a ObjectDataSource?
View 2 Replies
Sep 30, 2010
I want to sorting via clicking header ( kod , aciklama, yeri, are headers ) with list view component and ObjectDataSource. ObjectDataSource use komponentListesi() method for selecting. How can i sorting with use listview component.
Data Object layer
[Code]....
Data Access layer
[Code]....
Listview
[Code]....
View 3 Replies
Aug 31, 2010
I have a gridview being data bound by an objectdatasource which points to a BLL/DAL. I have paging and sorting enabled within the gridview. I have the fields configured in the look/fell I want from a templatefield. This templatefield has the sort expression (date) I want things to be sorted by. All this works as it should and I have no issues with it.But, the issue is that when I click on the header to sort asc/desc by date, I have to click on it twice for it switch to descending order. E.g. I hit the webpage and it lists all the information in the gridview, sorted by date, ascending order. If I want to sort by descending order, I have to click the date header twice in order for the gridview to sort the information in descending order; the clicks cause a post-back and the whole screen is refreshed.
View 2 Replies
Mar 11, 2010
I am having some difficulty enabling sorting on a gridview that has data in it that has come from an objectdatasource.
The AllowSorting="True" function doesnt work for ObjectDataSource so I need to find a work around...I am guessing that I will need to do something in code in order to get this off the ground.
View 4 Replies
Feb 4, 2010
ObjectDataSource - Custom Gridview Paging and Sorting?
View 2 Replies
Sep 7, 2010
i am building my objectdatasource dynmically when certain buttons are clicked on the page.. and with that the gridview is being displayed with the results of the objectdatasource that was built.
So my gridview code looks like this:
[Code]....
How can i enable sorting and paging if the datasource is being built on button click event?
View 16 Replies
Jan 31, 2010
I started learning LINQ, So i thought of just creating gridview with sorting and paging using objectdatasource using LINQ. So i got this link
[URL] which Brian Orrel tell us how to do using IQueryable Interface. but i have nearly 300 lines of stored procedure which joins nearly 20 tables. so i thought of creating a stored procedure and using that instead of IQuerytable.
[code]...
View 7 Replies
Jul 18, 2010
Moderators Note: THIS ISSUE IS BIG FOR ME AND EVEN IF POSSIBLE, GET THE REPLY FROM THE DESIGNER OF GRIDVIEW. I have been looking for him for long. I am really fed up with reviewing a good lot of web pages on how we can possibly customize the gridview to enable sorting and paging. So many sites have listed out a lot of information and so many guidances. But the problem is that one works out fine and the other is a burden. I really feel bad about being given the job of customizing this kind of a gridview which has no user friendly approach to it. Also, this control is rendered without the pager links inside the <tfoot> tag. I have tried the Pear Pager in php. It is that good and easy to use and compared to that, the gridview in asp.net is the worst ever control i have ever tried so far.
1. i can use the images to indicate the sorting direction
2. I can have the custom pager like
[code]
<<Previous 1 2 3 .. 7 Next >>.
[/code]
When i click the next when i am viewing the page at 3 , the pager links should change as
[code]
<<Previous 2 3 4 .. 7 Next >>
[/code]
Kindly look into this type of requirement and firstly tell me whether this is possible with the gridview control. I would like this request even to be escalated to the designers of the gridview control also, so that Microsoft comes out with a reply THAT WORKS and not the kind of stuff like surfing through a lot of links and pages and finally wasting a lot of days precious time and still breaking the head with this useless control. I have spent a lot of time in searching for a perfect way. Not writing a code that is non-standard. I am really serious b'cos I have spent weeks in customizing this control. If I dont get a solid reply atleast now, I am going to generate all the output by HTML content by custom coding.
View 7 Replies
Dec 21, 2010
I am trying to get the SMTP Server in IIS7 working so I can use the asp:PasswordRecovery component. I have included a screenshot of my SMTP setup in IIS, the SMTP setup in my web.config file, and my asp:PasswordRecovery component code. I have set it up to not require any authentication settings. I basically want to specify whatever email address I want as the "From" attribute (I'm using a series of noreply* addresses for a web app), like the php mail function that lets you put whatever you want in the from argument. What am I missing? Do I need to install anything else? I'm assuming that when people say "you need an SMTP server to send mail", this is what they're talking about.
Web.config:
[Code]....
ASP Code:
[Code]....
SMTP Setup Screenshot:
View 6 Replies
Jun 2, 2010
I have a site map configured as such:
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="www.website.com/index.aspx" title="Site Name" description="">
<siteMapNode url="home.aspx" title="My Home" description="My Home" Group="Active">
<siteMapNode url="Search.aspx" title="Search" description="Search For Roommate" Group="Active">
[Code]....
For some reason, even though in the sitemap, the url is defined as "www.website.com/index.aspx" or "home.aspx", the currentNode.URL always has the domain attached to the URL, creating bad urls like "www.domain.com/www.website.com/index.aspx"
I've tried to figure out where www.domain.com was coming from by search my project and inside of my web.config file, but I can't seem to find it.
View 1 Replies
Jul 25, 2010
When I add an AccessDataSource and attempt to configure it, the "Advanced SQL Generation Options" panel opens, but checkboxes "Generate INSERT, UPDATE and DELETE statements" and "Use optimistic concurrency" are sometimes grayed out.It appears that this happens when a table is specified that contains a foreign key, and it also seems that any Update query statement I specify in conjunction with a related databound gridview doesn't "take". What's the story here? Is it not possible to update a database table from a databound gridview control if the underlying table has a foreign key? Or is something else going on?
View 2 Replies
Jan 23, 2011
I'm trying to configure my Solution to publish multiple web sites to Azure using the 1.3 SDK and I want them to run under one Web Role. I've added the entry to the Sites element as per the CHM file and when I deploy to Azure the Instance starts up. Now for the symptoms:
Browsing to the "Primary" (first site added to the solution) everything works fine.
Browsing to the "Secondary" site throws the following error:
Exception type: ConfigurationErrorsException Exception message: Could not load file or assembly 'System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. (E:approot_WASR_1web.config line 28)
What have I tried so far without success (sigh):
1. I noticed that by default VStudio (2010 Ultimate) did not include the "Secondary" project output in the cspkg file. Setting a project dependency seems to have fixed that problem (or at least I now see it in the output window during the build process).
2. I've set "Copy Local=true" for the System.Web.Mvc on the "Secondary" project still nothing.
3. I have a CName setup for the "Secondary" project and use the hostHeader parameter on the Binding element so I haven't found a good way of testing this local so I'm limited in diagnostic info.
One thought that I had was that both projects now contain a WebRole.cs file, should that be the case in this configuration?
View 1 Replies
Jan 4, 2010
Im learning how to use the SqlMembershipProvider. I want to use my google mail account to send the automatic mail message like for example to recover passwords.
I have this in my web-config
<system.net>
View 6 Replies
Aug 16, 2010
I'm trying to send an email from my website that I've upgraded from .NET 1.1 to 2.0. The 1.1 version set the SmtpServer like this:
System.Web.Mail.SmtpMail.SmtpServer = Current.Application.Item("SMTPServer")It's using the SmtpMail.SmtpServer property from the old 'System.Web.Mail' namespace.
How do I set the SmtpServer without using any classes/properties from the old namespace? I've seen a couple of examples online that set the SmtpServer in the web.config file. Is this the only way? How can you use an application setting in web.config ?
View 1 Replies
Mar 11, 2010
When I am inserting or deleting rows with my database gridview, the page refreshes to show the changes.
I happen to have multiple gridviews on one page, organized within a css/jquery tabbed panel, so that you only see one gridview depending on the tab that is clicked on. I have also setup the page to add a page number to the url based on the tab. For instance, my page url is www.website.com/default.aspx. When I click on a tab it will add a page number like so: www.website.com/default.aspx#2.
The problem is that when there is a page refresh, the web page refreshes the page default.aspx. So if my current url is default.aspx#2, it doesn't show that page when the web site refreshes. It shows default.aspx. how I would make the page return to the current url. When I make a change on a gridview within tab #2 I want the page to refresh and return me to page #2 again.
View 1 Replies
Jan 18, 2013
I have a column in an asp:repeater control that needs to be a hyperlink in which a user can click on it. By clicking on this link it needs to execute a function (this function creates an HTML letter and displays the letter in the browser) in my VB.Net Code-Behind. I'm not sure what kind of control to use that will allow this kind of functionality. Not sure if a Button or an Anchor would be best or even something else. I'm truly perplexed on this.
View 3 Replies
May 21, 2010
I'm trying to install a 32-bit ASP.NET application onto a 64-bit IIS server running on Windows Server 2008. This is a clean installation of the operating system with no other applications installed.As a prerequisite for our installation, we run the 32-bit version of aspnet_regiis -iIt fails with the following message: The error indicates that IIS is not installed on the machine. Please install IIS before using this tool.Additionally:IIS is definitely installed. The 64 bit version of aspnet_regiis runs cleanly without warnings.€œEnable 32 bit applications" is set to True in the DefaultAppPool's Advanced Settings.
The IIS Metabase and IIS 6 configuration compatibility" component is installed.We have a test VM where this error occurs as well as test VM where both the 32 bit and 64 bit versions of aspnet_regiis run without errors. We've had no luck distinguishing the differences between the two test VMs.We have struggled with this issue for several days to no avail.
View 2 Replies
Jun 1, 2010
When I first published my site, I tested it using my gmail account and worked like a charm first try (a rare feat for me ;) ). Now, I'd like to finish it up by having it send the emails from the account at the host. No joy... I asked the host if I had misunderstood the rather unhelpful info in the control panel and they advised that in my web config I should change:
[code]....
View 2 Replies
Aug 1, 2010
I am in the begininng stages of designing (or redisigning) a site. I am using VWD Express 2010 and the project is configured for .net 4.0. I am designing it offline so its currently just on my laptop, which is also running sql server express 2008 R2.
When I ran the ASP.Net Configuration tool, it automatically created a database called aspnetdb in the app_data folder where it stores all the user and roll info. How can I use a different database that has the same schema as well as some additional tables of my own. I want to point it to mylocally running sql server.
View 3 Replies
Dec 23, 2010
I would like to know why I am not able to see myclasslibrary.dllhaving strong name key and added in gac when adding through 'add referrence in solution explorer of vs2008 professional edition.I used .netconfiguration tool2.0 for adding assembly into Gac.In installation default folder of VS2008 I was able to see
2 folders 'C:WINDOWSMicrosoft.NETFrameworkv2.0.50727'and 'C:WINDOWSMicrosoft.NETFrameworkv1.1.4322' .Which Gac foder is getting used?using Gacutil.exe -l I did not find myssembly though it showed from configuration tool mmc.
View 1 Replies
Dec 20, 2010
I have a IIS server in my company which runs our intranet application, We assigned one static IP to it in order to access through internet. when we to mapped our application address eg : http://ip/applicationname to one host name, after loading when i try to access any page it was again showing ip address instead of my host name. When I check with my ISP, he told me that to resolve this either you have to put your application folder in root directory(directly in Inetput/wwwroot) or you have to create sub domain, when I put all my fies to root directory it is working well, but , I found that for all other application which i put the folders inside wwroot are taking the config file from root, how can i resolve it... or just explain me how to configure subdomain in my server to solve this issue....
View 1 Replies
Aug 26, 2010
I have an application that's locked down using forms authentication. There are few nightly tasks I want to script that make get requests to, say, http://myapp.domain.com/NightlyTask ... I don't need any response, I just need it to accept a get request from a certain IP address. I realize you could spoof an IP address, etc. but I'm trying to make this dead simple.Is there anyway I can setup the Web.config to unconditionally give access to a certain IP? Any other idea to approach this?Again, long-term solution would be a service running Quartz or some other cron-like job handler. I'm not quite there yet, hoping for an interim solution
View 1 Replies
Apr 14, 2010
Fist of all I want to say IIS to me is like a vending machine to a monkey.
So I have Windows XP SP2 with IIS 5.1 on it and an ASP.NET Web Forms project. I just want my website to be accessed by someone else from the internet or from my local network. How do I configure IIS so that is possible?
I tried a lot of user guides, but I don't know what I did wrong cause all I got was Page not foud and Service Unavailable.
View 1 Replies