HighDots Forums  

problem with datagrid control

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss problem with datagrid control in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
etherx
 
Posts: n/a

Default problem with datagrid control - 09-15-2004 , 03:13 AM






Hi, i am trying to dynamically control which column in the datagrid is visible
and which is invisible using a configuration table storing the value of true or
false. When i load the datagrid, i set the visibility of each data column to
the value in the configuration table for each particular column but it gives me
parser error. What's wrong with the code? Can someone help me pls? below is the
code attached.

I have checked the value returned by <%# dsConfig.FieldValue("s_vendorName",
Container) %> is either true or false.

<aspataGrid
AllowPaging="false"
AllowSorting="true"
AutoGenerateColumns="false" BorderColor="#000000" BorderWidth="1"
CellPadding="3"
CellSpacing="0"
DataSource="<%# dsVendor.DefaultView %>" id="dgVendor"
runat="server"
ShowFooter="false"
ShowHeader="true" Width="100%" OnSortCommand="sort_grid"
Quote:
Columns
<asp:TemplateColumn HeaderText="Vendor" SortExpression="vName"
Visible= "<%# dsConfig.FieldValue("s_vendorName", Container) %>"
runat="server">




Reply With Quote
  #2  
Old   
Randy Edmunds
 
Posts: n/a

Default Re: problem with datagrid control - 09-15-2004 , 11:37 AM






Quote:
I have checked the value returned by <%# dsConfig.FieldValue("s_vendorName",
Container) %> is either true or false.
The attribute value needs to be a string ("true" or "false"), as opposed
to a Boolean (true or false). In JavaScript, that would be something like:

<%# (dsConfig.FieldValue("s_vendorName", Container) ? "true" : "false") %>

HTH,
Randy



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.