Hi there,
I have the same problem as already posted with my toolbar.
http://www.telerik.com/community/forums/thread/b311D-bekmgb.aspx
I want a button (logout) and a dropdown (language) to flow to the right side and the other components to the left.
I did, what's posted, and it worked fine as long as I did not add separators to my toolbar. But I need some separators in there.
My actual style sheet looks like that:
| .RadToolBar_Default |
| { |
| width:100%; |
| } |
| .RadToolBar_Default .rtbOuter |
| { |
| width:100%; |
| } |
| .RadToolBar_Default_Horizontal .rtbItem |
| { |
| padding-right: 1px; |
| float:left; |
| } |
| * html .RadToolBar_Default .rtbItem |
| { |
| margin-bottom:2px; |
| } |
| .RadToolBar_Default_Horizontal .rightAlignedWrapper |
| { |
| float:right; |
| } |
| .RadToolBarDropDown_Default .rtbSeparator |
| { |
| border: 0; |
| line-height: 0; |
| float:left; |
| } |
| .RadToolBarDropDown_Default .rtbSeparator .rtbText |
| { |
| display: none; |
| } |
I have no idea what the matter is, but I am not a CSS-guru.
I have to say, that I didn't already test, what happens, when I insert the required language dropdown.I did this only with the logout button. So maybe it would get worse.
There is an other problem too: I want to wrap this toolbar in a masterpage. There are two buttons (navigate back and forward). Those buttons are displayed all the time. (Same for language dropdown and logout button.) But the one that creates the content page, adds its required buttons after those static buttons. So that would cause, those buttons are after language and logout. I think, I have to work around with some life time cycle events as prerender. But maybe you have an idea, to do this with css.
Thanks for help
Greets Simon

using
System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlTypes;
using System.Data.SqlClient;
using Telerik.Web.UI;
using WebApplicationProtoypeZenith;
using Telerik.QuickStart;
namespace WebApplicationProtoypeZenith
{
public partial class Admin : System.Web.UI.Page
{
private static DataTable GetDataTable(string queryString)
{
String ConnString = ConfigurationManager.ConnectionStrings["SysnetDenmarkConnectionString"].ConnectionString;
SqlConnection MySqlConnection = new SqlConnection(ConnString);
SqlDataAdapter MySqlDataAdapter = new SqlDataAdapter();
MySqlDataAdapter.SelectCommand = new SqlCommand(queryString, MySqlConnection);
DataTable myDataTable = new DataTable();
MySqlConnection.Open();
try
{
MySqlDataAdapter.Fill(myDataTable);
}
finally
{
MySqlConnection.Close();
}
return myDataTable;
}
private DataTable Projects
{
get
{
object obj = this.Session["Project"];
if ((!(obj == null)))
{
return ((DataTable)(obj));
}
DataTable myDataTable = new DataTable();
myDataTable = GetDataTable("SELECT * FROM Project");
this.Session["Project"] = myDataTable;
return myDataTable;
}
}
protected void RadGrid1_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
{
this.RadGrid1.DataSource = this.Projects;
this.Projects.PrimaryKey = new DataColumn[] { this.Projects.Columns["ProjectId"] };
}
protected void RadGrid1_InsertCommand(object source, GridCommandEventArgs e)
{
GridEditableItem editedItem = e.Item as GridEditableItem;
UserControl userControl = (UserControl)e.Item.FindControl(GridEditFormItem.EditFormUserControlID);
//Create new row in the DataSource
DataRow newRow = this.Projects.NewRow();
//Insert new values
Hashtable newValues = new Hashtable();
newValues["ProjectName"] = (userControl.FindControl("RadTextBoxProjectName") as RadTextBox).Text;
newValues["ProjectResume"] = (userControl.FindControl("RadEditor1") as RadEditor).Content;
newValues["ProjectStart"] = (userControl.FindControl("RadDatePickerProjectStart") as RadDatePicker).SelectedDate;
newValues["ProjectEnd"] = (userControl.FindControl("RadDatePickerProjectEnd") as RadDatePicker).SelectedDate;
newValues["Responsible"] = (userControl.FindControl("RadTextBoxResponsible") as RadTextBox).Text;
newValues["OrderdBy"] = (userControl.FindControl("RadTextBoxOrderdBy") as RadTextBox).Text;
newValues["Contact"] = (userControl.FindControl("RadTextBoxContact") as RadTextBox).Text;
//make sure that unique primary key value is generated for the inserted row
newValues["ProjectId"] = (int)this.Projects.Rows[this.Projects.Rows.Count - 1]["ProjectId"] + 1;
try
{
foreach (DictionaryEntry entry in newValues)
{
newRow[(string)entry.Key] = entry.Value;
}
this.Projects.Rows.Add(newRow);
this.Projects.AcceptChanges();
}
catch (SqlException ecx)
{
RadGrid1.Controls.Add(new LiteralControl("Unable to update/insert Projects. Reason: " + ecx.StackTrace));
}
catch (Exception ex)
{
RadGrid1.Controls.Add(new LiteralControl("Unable to update/insert Projects. Reason: " + ex.Message));
e.Canceled = true;
}
}
}