OrgChart with image

6 posts, 0 answers
  1. NA
    NA avatar
    39 posts
    Member since:
    Aug 2013

    Posted 09 Jun 2014 Link to this post

    orgchart with image i have to show the images but problem is condition based visible true/false the images 
       
     please provide me sample code 
  2. Plamen
    Admin
    Plamen avatar
    2729 posts

    Posted 09 Jun 2014 Link to this post

    Hi,

    from the provided information it is not quite clear what are you trying to achieve so would you please elaborate a little bit so we could be more helpful.

    Regards,
    Plamen
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. NA
    NA avatar
    39 posts
    Member since:
    Aug 2013

    Posted 10 Jun 2014 in reply to Plamen Link to this post

    Hi Plamen

    I am using below sample code this code is working .Image come from data base table image is there it will be show but problem is, In case  image is not there in the out put empty box will be show
       Please sample code 
     <telerik:RadOrgChart ID="OrgChat" runat="server" EnableCollapsing="true" EnableGroupCollapsing="true"  >                                            <ItemTemplate>
                                                    <asp:Panel runat="server" ID="Panel1" CssClass="TemplateHolder">
                                                        <table>
                                                            <tr>
                                                                <td style="width: 23%">
                                                                     <asp:Panel ID="ShowImagePanel" runat="server" Style="display: none;">
                                                                    <telerik:RadBinaryImage ID="chartimg" runat="server" DataValue='<%# Eval("Image")  == DBNull.Value? null: Eval("Image")  %>' Width="70" Height="75" ResizeMode="Fit" />
                                                                    </asp:Panel>
                                                                </td>
                                                                <td id="TdImage">
                                                                    <asp:Label ID="lbltxt" runat="server" Text='<%# Eval("Text") %>'></asp:Label>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </asp:Panel>
                                                </ItemTemplate>
                                            </telerik:RadOrgChart>
  5. Plamen
    Admin
    Plamen avatar
    2729 posts

    Posted 10 Jun 2014 Link to this post

    Hello,

    in such scenario instead of using Template we recommend using  DataImageURL as for example in this on-line demo and set the desired default image as explained in this help topic. 

    Hope this information will help you solve the issue.

    Regards,
    Plamen
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  6. NA
    NA avatar
    39 posts
    Member since:
    Aug 2013

    Posted 13 Jun 2014 in reply to Plamen Link to this post

    Hi,

    Thanking to you provide sample code .
    I saw you provide sample code in that link the image Url given by static but in my code  image data is come from data base table show in attach file  ,The image is bind dynamically 
  7. Plamen
    Admin
    Plamen avatar
    2729 posts

    Posted 18 Jun 2014 Link to this post

    Hi,

    In such case instead of setting the DataValue to null when Eval("Image") is null you can set it to some default image will appear in this case .

    Hope this will be helpful.

    Regards,
    Plamen
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017