473,407 Members | 2,598 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

WebControls.Toolbar control is being weird

Ok whats wrong with my toolbar? When I debug I don't get an error message
and the databinding is working correctly but the toolbar itself and the
<iewc:ToolbarDropDownlist /> control isn't showing up all that is returned to
the web page is the buttons text and the contents of the DropDownlist. What
am I doing wrong here? Below is the control I typed in and below that is the
code behind.

<iewc:toolbar id="Toolbar1" runat="server">
<iewc:ToolbarTextBox Width="100px" TabIndex="1"
ID="MName"></iewc:ToolbarTextBox>
<iewc:ToolbarSeparator></iewc:ToolbarSeparator>
<iewc:ToolbarButton Text="Add" ID="Add"
TabIndex="2"></iewc:ToolbarButton>
<iewc:ToolbarSeparator></iewc:ToolbarSeparator>
<iewc:ToolbarDropDownList AutoPostBack="True" ID="Select"
runat="server"></iewc:ToolbarDropDownList>
<iewc:ToolbarButton Text="Edit" ID="Edit"></iewc:ToolbarButton>
<iewc:ToolbarButton Text="Delete"
ID="Delete"></iewc:ToolbarButton>
<iewc:ToolbarSeparator></iewc:ToolbarSeparator>
<iewc:ToolbarTextBox ID="SecName"></iewc:ToolbarTextBox>
<iewc:ToolbarButton ID="SecAdd" Text="Add"></iewc:ToolbarButton>
<iewc:ToolbarSeparator></iewc:ToolbarSeparator>
<iewc:ToolbarDropDownList AutoPostBack="True" ID="DDLSection"
runat="server"></iewc:ToolbarDropDownList>
<iewc:ToolbarButton Text="Edit"
ID="EditSec"></iewc:ToolbarButton>
<iewc:ToolbarButton Text="Delete"
ID="DeleteSection"></iewc:ToolbarButton>
</iewc:toolbar>

Codebehind:

protected System.Web.UI.WebControls.DataGrid dgCMS1;

// Instances of the Toolbar control.
protected Microsoft.Web.UI.WebControls.Toolbar Toolbar1;
protected Microsoft.Web.UI.WebControls.ToolbarTextBox MName;
protected Microsoft.Web.UI.WebControls.ToolbarButton Add;
protected Microsoft.Web.UI.WebControls.ToolbarDropDownList Select;
protected Microsoft.Web.UI.WebControls.ToolbarButton Edit;
protected Microsoft.Web.UI.WebControls.ToolbarButton Delete;
protected Microsoft.Web.UI.WebControls.ToolbarTextBox SecName;
protected Microsoft.Web.UI.WebControls.ToolbarButton SecAdd;
protected Microsoft.Web.UI.WebControls.ToolbarDropDownList DDLSection;
protected Microsoft.Web.UI.WebControls.ToolbarButton EditSec;
protected Microsoft.Web.UI.WebControls.ToolbarButton DeleteSection;

// Database connection and access.
protected System.Data.SqlClient.SqlConnection clubconn;
protected System.Data.SqlClient.SqlDataAdapter clubadapt;
protected System.Data.DataSet dsClub;

// DataBase Connection String.
string strclubconn=ConfigurationSettings.AppSettings["ConnectionString"];

private void Page_Load(object sender, System.EventArgs e)
{
if(!IsPostBack)
{
BindData();
}
}
public void BindData()
{
string strDDLMenu="SELECT Menu_tbl.* FROM Menu_tbl";
string strDDLSection="SELECT Section_Tbl.* FROM Section_Tbl";
string strDDLSectionData="SELECT SectionData.* FROM SectionData";
string strDDLimg_tbl="SELECT img_tbl.* FROM img_tbl";

clubconn=new SqlConnection(strclubconn);
dsClub=new DataSet();
clubadapt=new SqlDataAdapter(strDDLMenu,clubconn);
clubadapt.Fill(dsClub,"DDLMenu");
clubadapt.SelectCommand=new SqlCommand(strDDLSection,clubconn);
clubadapt.Fill(dsClub,"DDLSection");
clubadapt.SelectCommand=new SqlCommand(strDDLSectionData,clubconn);
clubadapt.Fill(dsClub,"DDLSectionData");
clubadapt.SelectCommand=new SqlCommand(strDDLimg_tbl,clubconn);
clubadapt.Fill(dsClub,"img_tbl");
clubconn.Close();

dsClub.Relations.Add("Menu_Section",
dsClub.Tables["DDLMenu"].Columns["MenuID"],
dsClub.Tables["DDLSection"].Columns["MenuID"],false);
dsClub.Relations[0].Nested=true;

dsClub.Relations.Add("Section_IMG",
dsClub.Tables["DDLSection"].Columns["SectionID"],
dsClub.Tables["img_tbl"].Columns["SectionID"],false);
dsClub.Relations[1].Nested=true;

dsClub.Relations.Add("Section_SectionData",
dsClub.Tables["DDLSection"].Columns["SectionID"],
dsClub.Tables["DDLSectionData"].Columns["SectionID"],false);
dsClub.Relations[1].Nested=true;

Select.DataSource=dsClub;
Select.DataMember="DDLMenu";
Select.DataTextField="MenuName";
Select.DataValueField="MenuID";
Select.DataBind();

DDLSection.DataSource=GetChildRelation(dsClub,"Men u_Section");
DDLSection.DataMember="DDLSection";
DDLSection.DataTextField="SectionTitle";
DDLSection.DataValueField="SectionID";
DDLSection.DataBind();
}
protected DataView GetChildRelation(object dataItem, string relation)
{
DataRowView drv=dataItem as DataRowView;
if(drv != null)
{
return drv.CreateChildView(relation);
}
else
{
return null;
}
}
Nov 19 '05 #1
0 1467

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: John | last post by:
Hi all, I installed the Microsoft.Web.UI.Webcontrols.dll onto my development P.C. and in the reference from within Visual Studio, changed the Copy Local to true so as to have the copy in my Bin...
0
by: Hilmar Demant | last post by:
Hi, i've experienced something weird, and its probably not an special ASP.NET-issue, but containing several techniques i think its adequate to post it here. Hopefully someone knows anything...
3
by: DalePres | last post by:
I have an application that uses the Microsoft.Web.UI.WebControls.TabStrip and Multipage controls. When I test the app on my pc or on my client's development web servers the controls render...
1
by: KMart | last post by:
Hello, I have a ASP.NET/C# application that uses the IE Web Controls. Everything was working fine. Then, for some unknown reason, everything stopped working. Here's the error information: ...
8
by: Charts | last post by:
I download IEWebControls.exe, and installed it. Installation created IE Web Controls directory. The readme.txt said, 3. Create a /bin subdirectory for the application and copy the file...
2
by: Andre Ranieri | last post by:
I'm retouching our corporate web site that, among other things, allows customers to log in and pay their invoices online. I noticed that on the checkout page, the credit card number textbox...
1
by: Alfredo Barrientos | last post by:
Hi, I have a little trouble trying to assign a Toolbar control to another toolbar variable control. I am getting my forms controls with this: for (int j = 0; j <= frmChild.Controls.Count -...
3
by: dave | last post by:
We have an application that works perfectly in-house (tested on 3 different servers). It uses Microsoft.Web.UI.WebControls.dll for menubars and toolbars. Problem Description: We uploaded...
0
by: marcyb | last post by:
Can anyone help I am trying to get a WebControl toolbar to work this is my code for a toolbar in visual web developement 2005 express for C# <%@ Page Language="C#" Debug="true" %> <%@ Import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.