Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > .NET 1.0 and Visual Studio.NET > .NET Framework 1.x
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
.NET Framework 1.x For discussing versions 1.0 and 1.1 of the Microsoft .NET Framework.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 1.x section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 22nd, 2008, 07:53 PM
Registered User
Join Date: May 2008
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default plz plz plz......help me

Hi guys i have a problem with DataGrid in .Net1.1
can anybody help me plz.....very urgent....

I have a datagrid containing 2 columns. In one column the values are displayed by binding datafield.the other column is template column which contains dropdownlist.

I need to enable dropdownlist only if the value in column1 matches some condition. I hard coded the values in DDl

Column1 Column2
red Enable DDL
red Enable DDL
blue Disable DDL
white Disable DDL
red Enable DDL
blue Disable DDL

i have written the following code:

<asp:BoundColumn DataField="Column1" HeaderText="Column1">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
<asp:TemplateColumn HeaderText="Column2">
<ItemStyle HorizontalAlign="Center"VerticalAlign="Middle"></ItemStyle>
<asp:DropDownList id="Column2DDL" Runat="server" Enabled='<%# GetDDLSetting(DataBinder.Eval(Container, "DataItem.Column1")) %>'>
<asp:ListItem Value="--Select--">--Select--</asp:ListItem>
<asp:ListItem Value="Good">1st degree</asp:ListItem>
<asp:ListItem Value="Average">5 degree</asp:ListItem>
<asp:ListItem Value="Poor">10 degree</asp:ListItem>

in the code behind i had a function

protected bool GetDDLSetting(object myobj)
                return true;
                return false;

the function is getting compiled but my DDL is not getting enabled if the value in column1 is equal to red.

please help me.......very urgent need.....i have a dead line.......plz guys.....

Very Thanks in advance!!!!!!
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
plz.....plz solve out my problem.... kethireddy435 ASP.NET 1.x and 2.0 Application Design 1 October 4th, 2007 12:56 PM
plz tell me flowertear Pro Visual Basic 2005 2 November 28th, 2006 08:30 PM
Plz help me ritesh_ch23 Pro JSP 1 July 18th, 2006 10:46 PM
Plz plz someone help beetle_jaipur CSS Cascading Style Sheets 3 March 26th, 2006 05:37 AM
Help me plz waqaraziz VB.NET 2002/2003 Basics 1 March 19th, 2005 04:40 PM

All times are GMT -4. The time now is 01:00 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.