its been 6 days passed since i started making this assignment of mine it is to show how objectdatasource is used, until now, i still cannot getaway with this error, [B][U]The data source for GridView with id 'GridView1' did not have any properties or attributes from which to generate columns. Ensure that your data source has content.[/U][/B] is anybody can help me? and check what is wrong with my codes? [CODE]<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div style="background-color: #FFCC00" > &nbsp;<asp:GridView …

Member Avatar
Member Avatar
+0 forum 4

I have a DropDownList that is populated from an ObjectDataSource [CODE] <asp:DropDownList ID="ddlDepartment" runat="server" AutoPostBack="True" DataSourceID="odsGetDeptByFaculty" DataTextField="Dept" DataValueField="FID" onselectedindexchanged="ddlDepartment_SelectedIndexChanged"> </asp:DropDownList> <asp:ObjectDataSource ID="odsGetDeptByFaculty" runat="server" SelectMethod="usp_GetDeptByFaculty" TypeName="DataLayer.StoredProcs"> <SelectParameters> <asp:ControlParameter ControlID="ddlFaulty" Name="fCode" PropertyName="SelectedValue" Type="String" /> </SelectParameters> </asp:ObjectDataSource> [/CODE] My problem is when I run the program and select the option from the dropdownlist when the postback happens it returns to the first value in the list. Please help me nip resolve this issue. Many thanks in advance.

Member Avatar
Member Avatar
+0 forum 1

Hi, I have an objectdatasource showing lots of details for a particular product. In the table of products, there is an extra field which is either 'yes' or 'no' Is there a way in the cs code or javascript to make an image visible="true" if the value is 'yes' thanks

Member Avatar
+0 forum 0

Hi. I am making page which in essence is like a recent history section. When an item is viewed, a cookie is set storing its ID. I have managed to read the cookie and make a pop-up to display its data so I know it works. Does anyone know how, or have any advice how, by using the ID I can get the data to show product name and other details? Thanks

Member Avatar
Member Avatar
+0 forum 1

Hi all, I have a grid view I am trying to use, and it displays a large number of pill codes, (thousands) that I would like to be able to filter down. I have set up a dropdown list that gives the different options to filter on, basically every letter in the alphabet and 0-9. I beleive that I have set up the grid view and object data source correctly, but it does not seem to work. When no filter is applied, all the data appears, but when any filter, other than "0" is used, the GridView does not show. …

Member Avatar
+0 forum 0

Hi, I have an objectdatasource as shown: [CODE] <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetProducts" TypeName="ProductsDALTableAdapters.ProductsDTTableAdapter" MaximumRowsParameterName=""> <SelectParameters> <asp:QueryStringParameter DefaultValue="" Name="Param2" QueryStringField="ID" Type="Int32" /> <asp:Parameter DefaultValue="???" Name="Param1" Type="String" /> </SelectParameters> </asp:ObjectDataSource> [/CODE] This returns products that include (in a particular field) what is placed instead of ??? with the exception of the current product shown. It works fine when I type in the correct value, but the value should really be 'ProductName' from objectdatasource1 so that it works on every page. Any help is much appreciated.

Member Avatar
+0 forum 0

The End.