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

RadPanelItemBinding Add property ExpandedImageUrl in binding

1 Answer 41 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
ncollet
Top achievements
Rank 2
ncollet asked on 29 Jul 2008, 03:52 PM

Hello,

I use a RadPanelBar and I want to use a sqldatasource. There’s no problem if I don’t need to use the “ExpandedImageUrl” panelbar’s item’s member.

In my code I got something like that :

            DataSet dsMenu = new DataSet();

            dsMenu.Tables.Add("Menu");

            dsMenu.Tables[0].Columns.Add("IDMenu");

            dsMenu.Tables[0].Columns.Add("Menu_Text");

            dsMenu.Tables[0].Columns.Add("Menu_Tooltip");

            dsMenu.Tables[0].Columns.Add("Menu_ImageUrl");

            dsMenu.Tables[0].Columns.Add("Menu_ExpandedImageUrl");

            dsMenu.Tables[0].Columns.Add("Menu_NavigateUrl");

            dsMenu.Tables[0].Columns.Add("Menu_Target");

            dsMenu.Tables[0].Columns.Add("Menu_ParentID");

 

            dsMenu.Tables[0].Rows.Add();

            dsMenu.Tables[0].Rows[0]["IDMenu"] = "1";

            dsMenu.Tables[0].Rows[0]["Menu_Text"] = " ";

            dsMenu.Tables[0].Rows[0]["Menu_Tooltip"] = "Mon espace";

            dsMenu.Tables[0].Rows[0]["Menu_ImageUrl"] = "~/images/espace-over.gif";

            dsMenu.Tables[0].Rows[0]["Menu_ExpandedImageUrl"] = "~/images/espace-over.gif";

            dsMenu.Tables[0].Rows[0]["Menu_NavigateUrl"] = "";

            dsMenu.Tables[0].Rows[0]["Menu_Target"] = "";

            RadPanelBar1.DataFieldID = "IDMenu";

            RadPanelBar1.DataFieldParentID = "Menu_ParentID";

            RadPanelBar1.DataTextField = "Menu_Text";

            RadPanelItemBinding item = new RadPanelItemBinding();

            item.ImageUrlField = "Menu_ImageUrl";

            item.ToolTipField = "Menu_Tooltip";

            item.NavigateUrlField = "Menu_NavigateUrl";

            item.TargetField = "Menu_Target";

            RadPanelBar1.DataBindings.Add(item);

My problem is that I haven’t member for my item to manage the ExpandedImageUrl like it’s possible with HoveredImageUrl

Is this just an omission or a will of the developer. In the first case, is it possible to enhance the possibility of RadPanelItemBinding

Thanks for your answer.

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 29 Jul 2008, 03:55 PM
Hello ncollet,

At the time being the ExpandedImageUrl property cannot be mapped by using RadPanelItemBinding. You can however use the ItemDataBound event of the panelbar:

e.Item.ExpandedImageUrl = (string)DataBinder.Eval(e.Item.DataItem, "
Menu_ExpandedImageUrl")

I hope this helps,
Albert
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
PanelBar
Asked by
ncollet
Top achievements
Rank 2
Answers by
Atanas Korchev
Telerik team
Share this question
or