473,804 Members | 2,460 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with datagrid DataBinder.Eval : 'System.Data.Da taRowView' does ....

MS
I am very new to asp.net. Please help me in resolving the error:
DataBinder.Eval : 'System.Data.Da taRowView' does not contain a property
with the name RENEW_EXIST.
I get the above error with the following code in aspx page
<asp:Label ID="lblRenewExi st" Visible="False" Runat="server" Text='<%#
DataBinder.Eval (Container.Data Item, "RENEW_EXIS T") %>' />

If I change DataBinder.Eval (Container.Data Item, "RENEW_EXIS T") to
Container(DataI tem."RENEW_EXIS T"), the error message is changed to
BC30367: Class 'System.Web.UI. WebControls.Dat aGridItem' cannot be
indexed because it has no default property.
PLEASE HELP!!!

Dim oDA = New System.Data.Sql Client.SqlDataA dapter()
Dim oConn = New System.Data.Sql Client.SqlConne ction()
Dim oCmd = New System.Data.Sql Client.SqlComma nd()
Dim oDs = New DataSet()
oConn = Application("Co nnString")
oDA.SelectComma nd = oCmd
oDA.TableMappin gs.AddRange(New
System.Data.Com mon.DataTableMa pping() {New
System.Data.Com mon.DataTableMa pping("Table", "SPAR_REL", New
System.Data.Com mon.DataColumnM apping() {New
System.Data.Com mon.DataColumnM apping("REL_ID" , "REL_ID"), New
System.Data.Com mon.DataColumnM apping("REL_NAM E", "REL_NAME") , New
System.Data.Com mon.DataColumnM apping("TM_OFFI CER", "TM_OFFICER "), New
System.Data.Com mon.DataColumnM apping("NUM_ACC TS", "NUM_ACCTS" ), New
System.Data.Com mon.DataColumnM apping........( "RENEW_RATE ",
"RENEW_RATE "), New System.Data.Com mon.DataColumnM apping("RENEW_L IMIT",
"RENEW_LIMI T"), New System.Data.Com mon.DataColumnM apping("RENEW_N OTICE",
"RENEW_NOTICE") , New
System.Data.Com mon.DataColumnM apping("RENEW_E XIST", "RENEW_EXIST")} )})

'SqlSelectComma nd1 '
oCmd.CommandTex t = "[sp_SPAR_SelectC mdRel]"
oCmd.CommandTyp e = System.Data.Com mandType.Stored Procedure
oCmd.Connection = oConn
oCmd.Parameters ("@CSM_ID").Val ue = Session("User_I D")
oDA.Fill(oDs, "SPAR_REL")
DataGrid1.DataS ource = oDs
DataGrid1.DataB ind()
oDA.Dispose()
oDA = Nothing
oDs.Dispose()
oDs = Nothing
oConn.Close()
oConn = Nothing
Nov 18 '05 #1
0 1741

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
1781
by: VB Programmer | last post by:
I have an itemtemplate in a datagrid. I'm trying to set it's value based on data. Having no trouble with the textbox. But, how do I do the same thing for a dropdownlist???? <ItemTemplate> <asp:DropDownList id="ddlYesNo" runat="server" > <asp:ListItem Value="-">-</asp:ListItem> <asp:ListItem Value="Yes">Yes</asp:ListItem> <asp:ListItem Value="No">No</asp:ListItem> </asp:DropDownList>
2
8880
by: Bennett Haselton | last post by:
I know how to create a DataAdapter that loads data from a data source into a table in a typed DataSet, and how to set the DataSource and DataMember properties of a DataGrid so that at run time it will load the data from that table in the DataSet. Assuming I've got two tables in the DataSet, how can I set the DataSource property of the DataGrid to be an inner join of the two tables in the DataSet? If I want the DataGrid to get data...
3
2789
by: CVerma | last post by:
Hi, I have an embedded datagrid within a datalist. I am not able to perfrom paging in the datagrid. Any ideas? Here is my code: Here is my Simplegrid.cs file: using System; using System.Collections; using System.ComponentModel; using System.Data;
2
1033
by: wolfgang wagner | last post by:
Hi all! Im having a big problem including a DropDownList in my DataGrid. After searchin round some Sites i thought i can get this thing working. Here's my Code: <asp:TemplateColumn HeaderText="Rechnertyp"> <ItemTemplate> <%# DataBinder.Eval(Container.DataItem, "ht_rtyp_ref") %> </ItemTemplate>
0
864
by: rkbnair | last post by:
I have a DataGrid populated with some data. In the grid, I have placed a DropDownListBox. The DropDownListBox's current item should be retrieved from Dataset 'A'. However, the items in the DropDownListBox should be retrieved from another DataSet 'B'. So, I call a function GetLibraryItems() to return the dataset 'B'. However, the compiler gives the following error.
2
5040
by: zambizzi | last post by:
....I can't seem to get my hands on a control I'm loading in an editable datagrid. Here's my datagrid control: <asp:datagrid id="GLRulesGrid" runat="server" autogeneratecolumns="False" oneditcommand="GLRulesGrid_Edit"
4
4485
by: Girish | last post by:
Im trying to create a grid within a grid programmatically. Ive been successful in doing this but I need the embedded grid to fire its ItemDataBound event so I can handle it. The event does not seem to fire for some reason. The code is below. Look towards the end of the CustomerDataGrid_OnItemDataBound(object sender, DataGridItemEventArgs e) method. This is where I register the event and place the programmatically created grid into the...
7
3347
by: Girish | last post by:
OK.. phew. Playing with data grids for the past few days has been fun and a huge learning experience.. My problem. I have a requirement to display a gird with a gird. Within the embedded grid, theres a requirement to show a drop down menu list (this is a control I downloaded online) in one of the columns. For the purposes of this question, Ive implemented the drop down menu as a drop down list instead. Ive got all this working at this...
4
7351
by: CharlesA | last post by:
a general question... I'm a bit mystified by Databinder.eval(object, Colname, ) if controls can be bound to their individual data sources within the load event of the page... why would we ever use this quite inelegant OO code wrapped in #<% %> inside the markup? secondly: sometimes you see simliar code inside the markup without calls to
0
10561
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10302
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10069
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7608
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6845
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5639
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4277
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2976
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.