[CLOSED] image bind

Page 1 of 2 12 LastLast
  1. #1

    [CLOSED] image bind

    hi,

    i have stored images in database as s blob field. how i can bind the blob field as a image in gridpanel. i am easily bind blob field as a image in dot net gridview control. bur gridpanel i didn't bind.
  2. #2

    RE: [CLOSED] image bind

    Hi speedstep,

    I think you will have to pass an id for the image in the Store, then use a Renderer to create an <img src="image_url_here?id=myID" /> tag.*


    Then when that file/image is requested, *you would have to get the blob out of the database and return an image. Just double check that you return the correct content type headers for the image.*


    The GridPanel does not automatically render image blobs.


    Hope this helps.




    Geoffrey McGill
    Founder
  3. #3

    RE: [CLOSED] image bind

    hi,
    how to render the blob image in gridpanel and display the image. please send sample code.

  4. #4

    RE: [CLOSED] image bind

    Hi speedstep,

    As mentioned above, the GridPanel will not automatically handle the image binding. You have to create the image on the server dynamically. Within a Renderer you can build an <img src="your_image_generator_url_here.aspx" /> tag and set the url to some Page (or maybe .ashx) which will handle getting the image from the database and returning to the client.*


    Hope this helps.


    Geoffrey McGill
    Founder
  5. #5

    RE: [CLOSED] image bind

    hi,

    i render the image in gridpanel perfectly. i have bind the image in page_load and then i click the coolite button ajaxevent call the image bind function then the image is changed. This is worked in internet exploar. but the mozilla browser its not working. In Mozilla image bind only in page load, then i click the button, image is not changed. imageurl is not worked in mozilla browser, when i click the coolite ajaxevent button. what is the problem.

    please send solution.



    
    
    
    
    <script type="text/javascript">
    
    
    
    
    
    
    
    
    var template1 = '<img src="article_image.aspx" id="myID" />';
    
    
    
    
    
    
    
    
    var COLOUMN2 = function() 
    
    
    { 
    
    
    
    
    
    return template1;
    
    
    
    
    
    } 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    </script> 
    
    
    <ext:GridPanel 
    
    
    ID="GridPanel3" 
    
    
    runat="server" 
    
    
    StoreID="Store4" BodyBorder="false" Header="false" Height="210" HideHeaders="true" 
    
    
    
    
    
    >
    
    
    <ColumnModel ID="ColumnModel3" runat="server">
    
    
    <Columns>
    
    
    <ext:Column Header="article_image_id" Width="150" Sortable="true" DataIndex="article_image_id">
    
    
    <Renderer Fn="COLOUMN2" />
    
    
    </ext:Column> 
    
    
    </Columns>
    
    
    </ColumnModel>
    
    
    
    
    
    
    
    
    </ext:GridPanel>
  6. #6

    RE: [CLOSED] image bind

    hi,

    The code what i send previous, thats working fine if i using .net button. if i use coolite ajaxevent button its not working. give me a solution.

  7. #7

    RE: [CLOSED] image bind

    hi,

    i am waiting for your reply..
  8. #8

    RE: [CLOSED] image bind

    Hi speedstep,

    Based on the code sample you provided I wasn't able to determine why setting the image url is not working. sorry.


    Geoffrey McGill
    Founder
  9. #9

    RE: [CLOSED] image bind

    hi,

    i have post the full source. please check this source in both the browsers.i have get image blob from database and render into the image control. That source working fine in interner explorer. but mozilla its not working. coolite ajaxevent not call the imageurl in mozilla.

    please give the solution.
  10. #10

    RE: [CLOSED] image bind

    Hi speedstep,

    I was able to get the data to render in the GridPanel by changing the*<ext:JsonReader> to a*<ext:ArrayReader>.


    You are setting the Store's .DataSource property with an Array, so the Store needs the <ext:ArrayReader> to properly read the Data.*


    Hope this helps.


    Geoffrey McGill
    Founder
Page 1 of 2 12 LastLast

Similar Threads

  1. Can I bind Image in GridPanel?
    By Huangshan in forum 1.x Help
    Replies: 4
    Last Post: Jun 08, 2012, 10:25 AM
  2. Replies: 1
    Last Post: May 16, 2012, 12:57 PM
  3. [CLOSED] Ext:Image: How I can change the image when mouse over?
    By supera in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: May 11, 2012, 11:10 AM
  4. [CLOSED] ext:Image - How I can show a menu when click in ext:Image?
    By supera in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: May 10, 2012, 8:56 PM
  5. [CLOSED] Cannot bind to image
    By UGRev in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Dec 08, 2009, 10:10 AM

Posting Permissions