This is a migrated thread and some comments may be shown as answers.

OrgChart with image

5 Answers 141 Views
OrgChart
This is a migrated thread and some comments may be shown as answers.
NA
Top achievements
Rank 1
NA asked on 09 Jun 2014, 06:57 AM
orgchart with image i have to show the images but problem is condition based visible true/false the images 
   
 please provide me sample code 

5 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 09 Jun 2014, 11:26 AM
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.

 
0
NA
Top achievements
Rank 1
answered on 10 Jun 2014, 05:43 AM
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>
0
Plamen
Telerik team
answered on 10 Jun 2014, 08:02 AM
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.

 
0
NA
Top achievements
Rank 1
answered on 13 Jun 2014, 07:07 AM
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 
0
Plamen
Telerik team
answered on 18 Jun 2014, 07:00 AM
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.

 
Tags
OrgChart
Asked by
NA
Top achievements
Rank 1
Answers by
Plamen
Telerik team
NA
Top achievements
Rank 1
Share this question
or