I ran into this issue with a current project I was working on.
We wanted to use the WebExplorerBar but only wanted it to show Images, no text.
Everything we tried usually ended up with the headings of the explorer bar showing the image and default text of "Infragistics.Web.UI.Framework.Data.DataSetNode".
The work around we found and Infragistics has agreed with, is to create a new column in your datatable and leaving it blank. Set the TextField to this new column. This now shows only the image we want without any text.
Hello mts176,
I have created a simple example that includes “WebExplorerBar” control with the following markup:
<ig:WebExplorerBar ID="WebExplorerBar1" runat="server" Width="250px" GroupContentsHeight=""> <Groups> <ig:ExplorerBarGroup GroupContentsHeight="" ImageUrl="~/ig_res/Default/images/addnewrow_image.gif"> <Items> <ig:ExplorerBarItem ImageUrl="~/ig_res/Default/images/addnewrow_image.gif" Text=""> </ig:ExplorerBarItem> <ig:ExplorerBarItem ImageUrl="~/ig_res/Default/images/addnewrow_image.gif"> </ig:ExplorerBarItem> <ig:ExplorerBarItem ImageUrl="~/ig_res/Default/images/addnewrow_image.gif"> </ig:ExplorerBarItem> </Items> </ig:ExplorerBarGroup> </Groups> </ig:WebExplorerBar>
<ig:WebExplorerBar ID="WebExplorerBar1" runat="server" Width="250px" GroupContentsHeight="">
<Groups>
<ig:ExplorerBarGroup GroupContentsHeight="" ImageUrl="~/ig_res/Default/images/addnewrow_image.gif">
<Items>
<ig:ExplorerBarItem ImageUrl="~/ig_res/Default/images/addnewrow_image.gif" Text="">
</ig:ExplorerBarItem>
<ig:ExplorerBarItem ImageUrl="~/ig_res/Default/images/addnewrow_image.gif">
</Items>
</ig:ExplorerBarGroup>
</Groups>
</ig:WebExplorerBar>
The text property of the group and items are leaved blank and image URL is specified.
When “WebExplorerBar” is loaded only the images are shown for the groups and items and no default text is displayed.
This is true when text property is not specified and if the text property is set as empty string.
You approach is possible solution for this behavior too. When text property is set to empty field in the Data Source, the text of the item is assigned to it and nothing is displayed.
Let me know if you need further information about this question.
Is this explorer bar tied to any kind of back end or is it created in the markup only?
The “WebExplorerBar” control in my example is created only in “aspx” code with no Data Source attached in the Code-Behind.
If you send me your Data Table code I can test this behavior with it too.
I am looking forward to hearing from you.
Let me know if you need further assistance with this question.
I have used string column with empty string in my DataSet’s DataTable and I was able to show only image without text in “WebExplorerBar”. Here is the code used (you can try it on your own if you want):
<ig:WebExplorerBar ID="WebExplorerBar1" runat="server" Width="250px" OnGroupBound="WebExplorerBar1_GroupBound" GroupContentsHeight=""> <DataBindings> <ig:ExplorerBarItemBinding DataMember="RootData" TextField="rTexts" /> <ig:ExplorerBarItemBinding DataMember="ChildData" TextField="cTexts" ImageUrlField="cImages" /> </DataBindings> </ig:WebExplorerBar>
<ig:WebExplorerBar ID="WebExplorerBar1" runat="server" Width="250px" OnGroupBound="WebExplorerBar1_GroupBound"
GroupContentsHeight="">
<DataBindings>
<ig:ExplorerBarItemBinding DataMember="RootData" TextField="rTexts" />
<ig:ExplorerBarItemBinding DataMember="ChildData" TextField="cTexts" ImageUrlField="cImages" />
</DataBindings>
protected void Page_Load(object sender, EventArgs e) { WebExplorerBar1.DataSource = GetData(); WebExplorerBar1.DataBind(); } protected DataSet GetData() { DataSet ds = new DataSet("menuData"); DataTable dt = new DataTable("RootData"); dt.Columns.Add("rID", typeof(int)); dt.Columns.Add("rTexts", typeof(string)); dt.PrimaryKey = new DataColumn[1] { dt.Columns[0] }; dt.Rows.Add(1, "File"); dt.Rows.Add(2, "Edit"); dt.Rows.Add(3, "Help"); DataTable dt2 = new DataTable("ChildData"); dt2.Columns.Add("cID", typeof(int)); dt2.Columns.Add("rID", typeof(int)); dt2.Columns.Add("cTexts", typeof(string)); dt2.Columns.Add("cImages", typeof(string)); dt2.PrimaryKey = new DataColumn[1] { dt2.Columns[0] }; dt2.Rows.Add(1, 1, "Open", "~/ig_res/Default/images/addnewrow_image.gif"); dt2.Rows.Add(2, 1, "Close", "~/ig_res/Default/images/addnewrow_image.gif"); dt2.Rows.Add(3, 1, "Save", "~/ig_res/Default/images/addnewrow_image.gif"); dt2.Rows.Add(4, 1, "Exit", "~/ig_res/Default/images/addnewrow_image.gif"); dt2.Rows.Add(5, 2, "Cut", "~/ig_res/Default/images/addnewrow_image.gif"); dt2.Rows.Add(6, 2, "", "~/ig_res/Default/images/addnewrow_image.gif"); dt2.Rows.Add(7, 2, "Paste", "~/ig_res/Default/images/addnewrow_image.gif"); dt2.Rows.Add(8, 2, "Find", "~/ig_res/Default/images/addnewrow_image.gif"); dt2.Rows.Add(9, 3, "About", "~/ig_res/Default/images/addnewrow_image.gif"); dt2.Rows.Add(10, 3, "General Help", "~/ig_res/Default/images/addnewrow_image.gif"); ds.Tables.Add(dt); ds.Tables.Add(dt2); ds.Relations.Add(dt.Columns[0], dt2.Columns[1]); return ds; }
protected void Page_Load(object sender, EventArgs e)
{
WebExplorerBar1.DataSource = GetData();
WebExplorerBar1.DataBind();
}
protected DataSet GetData()
DataSet ds = new DataSet("menuData");
DataTable dt = new DataTable("RootData");
dt.Columns.Add("rID", typeof(int));
dt.Columns.Add("rTexts", typeof(string));
dt.PrimaryKey = new DataColumn[1] { dt.Columns[0] };
dt.Rows.Add(1, "File");
dt.Rows.Add(2, "Edit");
dt.Rows.Add(3, "Help");
DataTable dt2 = new DataTable("ChildData");
dt2.Columns.Add("cID", typeof(int));
dt2.Columns.Add("rID", typeof(int));
dt2.Columns.Add("cTexts", typeof(string));
dt2.Columns.Add("cImages", typeof(string));
dt2.PrimaryKey = new DataColumn[1] { dt2.Columns[0] };
dt2.Rows.Add(1, 1, "Open", "~/ig_res/Default/images/addnewrow_image.gif");
dt2.Rows.Add(2, 1, "Close", "~/ig_res/Default/images/addnewrow_image.gif");
dt2.Rows.Add(3, 1, "Save", "~/ig_res/Default/images/addnewrow_image.gif");
dt2.Rows.Add(4, 1, "Exit", "~/ig_res/Default/images/addnewrow_image.gif");
dt2.Rows.Add(5, 2, "Cut", "~/ig_res/Default/images/addnewrow_image.gif");
dt2.Rows.Add(6, 2, "", "~/ig_res/Default/images/addnewrow_image.gif");
dt2.Rows.Add(7, 2, "Paste", "~/ig_res/Default/images/addnewrow_image.gif");
dt2.Rows.Add(8, 2, "Find", "~/ig_res/Default/images/addnewrow_image.gif");
dt2.Rows.Add(9, 3, "About", "~/ig_res/Default/images/addnewrow_image.gif");
dt2.Rows.Add(10, 3, "General Help", "~/ig_res/Default/images/addnewrow_image.gif");
ds.Tables.Add(dt);
ds.Tables.Add(dt2);
ds.Relations.Add(dt.Columns[0], dt2.Columns[1]);
return ds;
Test this example and let me know what the results are on your machine.
I am connecting this to the database with a dataset.
Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4
Dataset with 2 tables in it
Table 1
Project_ID
Client_Logo
Project_Name
Image_Field
AddedBlankColumn
1
MyLogo.png
MyProject
~/MyLogo.png
Table 2
DSC_Template_ID
Name
Description
42
Project 1
Desc For Project 1
44
Project 2
Desc For Project 2
45
Project 3
Desc For Project 3
46
Project 4
Desc For Project 4
ASPX CODE:
<ig:WebExplorerBar ID="web" Height="100%" Width="320px" GroupContentsHeight="150px" GroupExpandBehavior="SingleExpanded" AnimationDuration="200" AnimationEquationType="Linear" runat="server" AutoPostBackFlags-ItemSelected="Off"> <DataBindings> <ig:ExplorerBarItemBinding DataMember="PROJECT" TextField="AddedBlankColumn" ImageUrlField="IMAGE_FIELD" /> <ig:ExplorerBarItemBinding DataMember="CONTRACT" TextField="DESCRIPTION" KeyField="DSC_TEMPLATE_ID" ValueField="DSC_TEMPLATE_ID" /> </DataBindings> <ClientEvents ItemClick="SubmitForSave" /> </ig:WebExplorerBar>
.CS CODE
RetailerPortalHomeDataAccess dal = new RetailerPortalHomeDataAccess(); DataSet webEDataSet = RetailerPortalHomeManager.FetchProjectContract(EnrollYear, parameterDictionary); dataset = RetailerPortalHomeManager.FetchProjectContractPermissions(parameterDictionary); bool hasPermission = true; webEDataSet.Tables[0].Columns.Add("AddedBlankColumn", typeof(string)); if (dataset.Tables[0].Rows.Count != 0) { foreach (DataRow dRow3 in dataset.Tables[0].Rows) { if (dRow3["uPermission"].ToString() == "0") { this.SecurityFrameworkAnnouncementAPI.CreateAnnouncement("You do not have Permission.", "You do not have the proper permissions to Enroll Stores, please contact your administrator.", MSA.IMS.WebFusion.Components.AnnouncementSeverity.Fatal, ""); hasPermission = false; } } } if (hasPermission) { if (webEDataSet.Tables[0].Rows.Count == 0) { this.SecurityFrameworkAnnouncementAPI.CreateAnnouncement("No Active Enrollment Programs.", "There are no active Enrollment Programs available at this time, please contact your administrator.", MSA.IMS.WebFusion.Components.AnnouncementSeverity.Fatal, ""); } else { foreach (DataRow dRow in webEDataSet.Tables[0].Rows) { dRow["IMAGE_FIELD"] = dRow["IMAGE_FIELD"].ToString().Replace("~", this.GraphicsPath); } webEDataSet.Tables[0].TableName = "PROJECT"; webEDataSet.Tables[1].TableName = "CONTRACT"; //relation between 1st and 2nd table. webEDataSet.Relations.Add(webEDataSet.Tables[0].Columns["PROJECT_ID"], webEDataSet.Tables[1].Columns["PROJECT_ID"]); //set the primary key for 1st table webEDataSet.Tables[0].PrimaryKey = new DataColumn[] { webEDataSet.Tables[0].Columns["PROJECT_ID"] }; web.DataSource = webEDataSet; web.DataBind(); } }