Solved

Conditional Logic in Datagrid Template Question

Posted on 2010-11-29
1
324 Views
Last Modified: 2012-05-10
I have a Status row in my Obout datagrid.  If the status cell is "INVALID FILENAME", I want to have it be a linkbutton that has a ajax flyout attached to it, to show the user what to do about the invalid name.

If the status is "VALID", I just want to display "Valid Filename" with no linkbutton.

How can I only show the linkbutton and flyout conditionally.  I know how to do things like, change the cell properties conditionally, but I don't know how to add custom HTML / Ajax.

(The code I attached shows what I want to display when Invalid - I need the IF statement to account for valid too, if that's possible in a template)

If anyone has a better solution, for a cool pop out to display my "Invalid Filename" message, please advise.  Is there some simple Javascript that I can use in my grid template?  Thanks

Justin
<cc1:GridTemplate runat="server" ID="tmpStatus">

                            <Template>   

                                <asp:LinkButton ID="LinkButton1" Text="<%# Container.Value %>" runat="server"></asp:LinkButton>



                                <cc3:Flyout ID="Flyout1" AttachTo="LinkButton1" runat="server">

                                    <div style="width:300px; background-color:white; border:solid 2px;">

                                    This filename contains invalid character(s).  

                                    !@#$%^&*()+~`

                                    Please go to your FTP folder and change the file name, then refresh this page.

                                    </div>

                                </cc3:Flyout>

                            </Template>

                        </cc1:GridTemplate>

Open in new window

0
Comment
Question by:JT_SIRO
1 Comment
 
LVL 29

Accepted Solution

by:
Kumaraswamy R earned 125 total points
ID: 34236515
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now