Display image in GridPanel AND FormPanel

  1. #1

    Display image in GridPanel AND FormPanel

    Hello,
    I store image Path(~/Image/CompanyLogo/Thumb/PENGUINS129848307916170429.jpg) in my database. I would like to display the image in a grid and also in a form panel.

    Can you please tell me how I can achieve this?

    Thank you in advance.
  2. #2
    도움이 되실지 모르겠네요.

    <!DOCTYPE html>
        
    <html>
    <head runat="server">
        <title>Ext.NET Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" Theme="Gray" />
    
            <ext:GridPanel ID="GridPanel1" runat="server">
                <Store>
                    <ext:Store ID="Store1" runat="server">
                        <Model>
                            <ext:Model ID="Model1" runat="server" IDProperty="name">
                                <Fields>                                
                                    <ext:ModelField Name="url" />                                      
                                </Fields>
                            </ext:Model>
                        </Model>
                    </ext:Store>
                </Store>
                <ColumnModel>
                    <Columns>
                        <ext:TemplateColumn ID="TemplateColumn1"
                            runat="server"
                            Text="File" 
                            DataIndex="url" 
                            TemplateString='<img style="width:60px;height:45px;" src="{url}" />' 
                            />
                    </Columns>    
                </ColumnModel>
            </ext:GridPanel>
    
            <ext:FormPanel ID="FormPanel1" runat="server" Height="100">
                <Items>                
                    <ext:Image runat="server" ImageUrl="/img/f01.png" />
                </Items>        
            </ext:FormPanel>
        </form>
    </body>
    </html>
    이와 같이 그리드와 폼패널에 적용하면 될듯 합니다.
    ^^ 즐거운 코딩 하세요.



    Quote Originally Posted by nazmulrockon View Post
    Hello,
    I store image Path(~/Image/CompanyLogo/Thumb/PENGUINS129848307916170429.jpg) in my database. I would like to display the image in a grid and also in a form panel.

    Can you please tell me how I can achieve this?

    Thank you in advance.
    Last edited by Daniil; Jul 02, 2012 at 7:03 PM. Reason: Please use [CODE] tags
  3. #3
    Quote Originally Posted by SeoNamseok View Post
    도움이 되실지 모르겠네요.

    <!DOCTYPE html>
        
    <html>
    <head runat="server">
        <title>Ext.NET Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" Theme="Gray" />
    
            <ext:GridPanel ID="GridPanel1" runat="server">
                <Store>
                    <ext:Store ID="Store1" runat="server">
                        <Model>
                            <ext:Model ID="Model1" runat="server" IDProperty="name">
                                <Fields>                                
                                    <ext:ModelField Name="url" />                                      
                                </Fields>
                            </ext:Model>
                        </Model>
                    </ext:Store>
                </Store>
                <ColumnModel>
                    <Columns>
                        <ext:TemplateColumn ID="TemplateColumn1"
                            runat="server"
                            Text="File" 
                            DataIndex="url" 
                            TemplateString='<img style="width:60px;height:45px;" src="{url}" />' 
                            />
                    </Columns>    
                </ColumnModel>
            </ext:GridPanel>
    
            <ext:FormPanel ID="FormPanel1" runat="server" Height="100">
                <Items>                
                    <ext:Image runat="server" ImageUrl="/img/f01.png" />
                </Items>        
            </ext:FormPanel>
        </form>
    </body>
    </html>
    이와 같이 그리드와 폼패널에 적용하면 될듯 합니다.
    ^^ 즐거운 코딩 하세요.

    Thanks for reply .

    <ext:FormPanel ID="FormPanel1" runat="server" Height="100">
    <Items>
    <ext:Image runat="server" ImageUrl="/img/f01.png" />
    </Items>
    </ext:FormPanel>
    This FormPanel Part Work but the GridPanel sitt not workong ...... In Grid no image Show ...... any Idea ????
    Last edited by Daniil; Jul 02, 2012 at 7:04 PM. Reason: Please use [CODE] tags
  4. #4
    image path change ^^

    '~/Image/CompanyLogo/Thumb/PENGUINS129848307916170429.jpg'
    => '/Image/CompanyLogo/Thumb/PENGUINS129848307916170429.jpg '

    Good Luck !!!

    ^^..



    Quote Originally Posted by nazmulrockon View Post
    Thanks for reply .

    <ext:FormPanel ID="FormPanel1" runat="server" Height="100">
    <Items>
    <ext:Image runat="server" ImageUrl="/img/f01.png" />
    </Items>
    </ext:FormPanel>

    This FormPanel Part Work but the GridPanel sitt not workong ...... In Grid no image Show ...... any Idea ????
    Last edited by Daniil; Jul 02, 2012 at 7:04 PM. Reason: Please use [CODE] tags
  5. #5
    thanks for sharing these codes, i only know how to display image through an web image viewing control on the web page. i learned a lot of displaying in GridPanel. what's the difference between these two while i am displaying image, which is better? any suggestion?

    _______________
    displaying image in web image viewer

Similar Threads

  1. [CLOSED] How to display an image in GridPanel column?
    By vadym.f in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Feb 28, 2012, 1:15 PM
  2. Replies: 0
    Last Post: Dec 30, 2010, 4:22 AM
  3. How to display a thumb nail image in grid
    By ajaybabu.maddinani in forum 1.x Help
    Replies: 1
    Last Post: May 14, 2010, 3:14 AM
  4. Replies: 0
    Last Post: Oct 21, 2009, 6:42 PM
  5. ext image in formpanel
    By maxdiable in forum 1.x Help
    Replies: 5
    Last Post: Jul 23, 2009, 12:01 PM

Posting Permissions