Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Conditional Logic in Datagrid Template Question

Posted on 2010-11-29
1
Medium Priority
?
346 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 29

Accepted Solution

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

Featured Post

What is a Denial of Service (DoS)?

A DoS is a malicious attempt to prevent the normal operation of a computer system. You may frequently see the terms 'DDoS' (Distributed Denial of Service) and 'DoS' used interchangeably, but there are some subtle differences.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

670 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