Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
179 views
I implemented

ExpandedCssClass

attribute in radmenuItem to control item when child nodes are displayed but does not appear to work.

I want the bg color to stay when mega drop down is open.

<

 

telerik:RadMenuItem Text="Stores" PostBack="false" ExpandedCssClass="rmExpanded">

 

Kamen Bundev
Telerik team
 answered on 01 Jun 2010
1 answer
77 views
2010.1.525.35


<HeaderContextMenu CollapseDelay="0" ExpandAnimation-Type="None"></HeaderContextMenu>

Header ContextMenu takes 2 seconds to show up after right click on the column header.

2nd issue:   I defined this to false but on the tooltip of the column header it still says "drag to group or render", and if I tried to drag it still showed the "dragging shadow".

<ClientSettings AllowDragToGroup="False" />

<telerik:RadGrid ID="RadGrid1" runat="server" Skin="Windows7" AllowFilteringByColumn="true" EnableHeaderContextMenu="true" EnableHeaderContextFilterMenu="true"  
        AllowPaging="True" AllowSorting="True" ShowStatusBar="true" 
        GroupingSettings-CaseSensitive="false" EnableLinqExpressions="False" 
Radoslav
Telerik team
 answered on 01 Jun 2010
1 answer
112 views
I was wondering what the best way to change the cell type by row was.  I have a grid with a column "Value"  and one called "Type" which is a dropdown column.  Say there are two values for "Type" (Text and DD).  If I select "Text" I want the value column to be a textbox where the user can enter data.  If I select "DD" I want the "Value" column to be a Dropdown column.  What I can't figure out is how to change the type of cell (text or dropdown) in the ItemDataBound event.  Thoughts?
Veli
Telerik team
 answered on 01 Jun 2010
2 answers
192 views
Hi gurus,

Is there a way on how to change the node's ImageUrl or icon thru javascript?

Regards,

Jouie
Veronica
Telerik team
 answered on 01 Jun 2010
1 answer
96 views
Hi,

As per client requirement, we need to give html button in tool bar, And  from that button we can go to html view from design same as html button at bottom side.

How can i do this, what is javascript function to go to html view?

Thanks
Rumen
Telerik team
 answered on 01 Jun 2010
1 answer
84 views
Hi everyone,


I have a calculated column having for expression {0} / 40 *100.

everything works fine if I am under English culture in browser option. But if i switch to French culture in browser option, the grid is empty. I am wondering if the calculation are messed up as decimal symbol are not the same in french and english

the values are from a file and is using "." (dot)  as decimal. None of the value are entrered by user.
I don't how the parse is occuring when applying the calculation provided by the expression.

I don't know if I can set up the culture of the grid regardless of the culture of the request or something like that (if related to culture problem of course)

thank you
Veli
Telerik team
 answered on 01 Jun 2010
1 answer
144 views
I've got a RadGrid inside a RadMultiPageView all inside a RadAjaxPanel, for editing the grid I used a WUC which contains various RadComboBoxes and RadTextBoxes including Numerics. My problem is that on postback, the server side code executes, but the value selected isn't used. Instead the original value is being executed. I've tried removing all the behaviors from the code execept those that actually build the component with the same results. The grid uses an ODS for the data source. The dropdown boxes are built procedurally on page load.

The grid declaration:
                <telerik:RadGrid ID="rgBacteriaWarning" runat="server" ondetailtabledatabind="rgGrid_DetailTableDataBind" onitemupdated="rgBacteria_ItemUpdated">  
                </telerik:RadGrid> 

Code that builds the grid:
                ObjectDataSource ods = new ObjectDataSource();  
                ods.SelectMethod = "GetHoldingTests";  
                ods.SelectParameters.Add("guid", guid.ToString());  
                ods.SelectParameters.Add("type", Enum.GetName(typeof(ValidationType), ValidationType.Warning));  
                ods.TypeName = "CTI.CTCM.Data.Samples.BacteriaODS";  
 
                rgBacteriaWarning.Columns.Clear();  
                rgBacteriaWarning.Skin = SKINNAME;  
                rgBacteriaWarning.AllowAutomaticDeletes = true;  
                rgBacteriaWarning.AllowAutomaticUpdates = true;  
                rgBacteriaWarning.AllowPaging = true;  
                rgBacteriaWarning.AllowSorting = true;  
                rgBacteriaWarning.AutoGenerateColumns = false;  
                rgBacteriaWarning.DataSource = ods.Select();  
                rgBacteriaWarning.MasterTableView.EditFormSettings.EditFormType = GridEditFormType.WebUserControl;  
                rgBacteriaWarning.MasterTableView.EditFormSettings.UserControlName = "VerifyBacteria.ascx";  
                rgBacteriaWarning.MasterTableView.EditMode = GridEditMode.EditForms;  
 
                rgBacteriaWarning.Columns.Add(new GridEditCommandColumn());  
                rgBacteriaWarning.Columns.Add(gb1);  
                rgBacteriaWarning.Columns.Add(gb2);  
                rgBacteriaWarning.Columns.Add(gb3);  
                rgBacteriaWarning.Columns.Add(gb4);  
                rgBacteriaWarning.Columns.Add(gb5);  
                rgBacteriaWarning.Columns.Add(gb6);  
                rgBacteriaWarning.Columns.Add(gb7);  
                rgBacteriaWarning.Columns.Add(gb8);  
                rgBacteriaWarning.Columns.Add(gb9);  
                rgBacteriaWarning.Columns.Add(gb10);  
                rgBacteriaWarning.Columns.Add(gb11);  
                rgBacteriaWarning.Columns.Add(gb12);  
                rgBacteriaWarning.Columns.Add(gb13);  
                rgBacteriaWarning.Columns.Add(gb14);  
                rgBacteriaWarning.Columns.Add(gb15);  
                rgBacteriaWarning.Columns.Add(gb16);  
 
                if (rgBacteriaWarning.MasterTableView.DetailTables.Count < 1)  
                {  
                    GridTableView gtvWarning = new GridTableView(rgBacteriaWarning);  
                    rgBacteriaWarning.MasterTableView.DetailTables.Add(gtvWarning);  
                    gtvWarning.DataMember = "warningDetails";  
                }  
 
                rgBacteriaWarning.DataBind();  

The WIP WUC:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="VerifyBacteria.ascx.cs" Inherits="CTI.CTCM.UI.Upload.VerifyBacteria" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<table border="0" cellspacing="0" cellpadding="0" width="100%">  
    <tr> 
        <td align="right">Field Name :</td> 
        <td align="left">  
            <telerik:RadComboBox ID="rcbField" runat="server" onselectedindexchanged="rcbField_SelectedIndexChanged" NoWrap="True"></telerik:RadComboBox> 
        </td> 
        <td align="right">Monitoring Method :</td> 
        <td align="left">  
            <telerik:RadTextBox ID="rtbMonitoringMethod" runat="server"   
                ontextchanged="rtbMonitoringMethod_TextChanged"></telerik:RadTextBox> 
            <asp:Label ID="lblMonitoringMethod" runat="server"></asp:Label> 
        </td> 
    </tr> 
    <tr> 
        <td align="right">Lease Name :</td> 
        <td align="left">  
            <telerik:RadComboBox ID="rcbLease" runat="server" onselectedindexchanged="rcbLease_SelectedIndexChanged" NoWrap="True"></telerik:RadComboBox> 
        </td> 
        <td align="right">Chloride Percent Range :</td> 
        <td align="left">  
            <telerik:RadNumericTextBox ID="rntbChloridePercentRange" runat="server" ontextchanged="rntbChloridePercentRange_TextChanged"></telerik:RadNumericTextBox> 
            <asp:Label ID="lblChloridePctRange" runat="server"></asp:Label> 
        </td> 
    </tr> 
    <tr> 
        <td align="right">Location Name :</td> 
        <td align="left">  
            <telerik:RadComboBox ID="rcbLocation" runat="server" onselectedindexchanged="rcbLocation_SelectedIndexChanged" NoWrap="True"></telerik:RadComboBox> 
        </td> 
        <td align="right">Media Type :</td> 
        <td align="left">  
            <telerik:RadTextBox ID="rtbMediaType" runat="server" ontextchanged="rtbMediaType_TextChanged"></telerik:RadTextBox> 
            <asp:Label ID="lblMediaType" runat="server"></asp:Label> 
        </td> 
    </tr> 
    <tr> 
        <td align="right">SMI :</td> 
        <td align="left">  
            <telerik:RadComboBox ID="rcbSMI" runat="server" NoWrap="True"   
                onselectedindexchanged="rcbSMI_SelectedIndexChanged"></telerik:RadComboBox> 
            <asp:Label ID="lblSMI" runat="server" ForeColor="Red"></asp:Label> 
        </td> 
        <td align="right">Days Incubated :</td> 
        <td align="left">  
            <telerik:RadNumericTextBox ID="rntbDaysIncubated" runat="server" ontextchanged="rntbDaysIncubated_TextChanged"></telerik:RadNumericTextBox> 
            <asp:Label ID="lblDaysIncubated" runat="server"></asp:Label> 
        </td> 
    </tr> 
    <tr> 
        <td align="right">Date :</td> 
        <td align="left">  
            <telerik:RadDatePicker ID="rdpDate" runat="server" onselecteddatechanged="rdpDate_SelectedDateChanged"></telerik:RadDatePicker> 
            <asp:Label ID="lblDate" runat="server" ForeColor="Red"></asp:Label> 
        </td> 
        <td align="right">Bottles Shot :</td> 
        <td align="left">  
            <telerik:RadNumericTextBox ID="rntbBottlesShot" runat="Server" ontextchanged="rntbBottlesShot_TextChanged"></telerik:RadNumericTextBox> 
            <asp:Label ID="lblBottlesShot" runat="server"></asp:Label> 
        </td> 
    </tr> 
    <tr> 
        <td align="right">Bacteria Aerobe :</td> 
        <td align="left">  
            <telerik:RadComboBox ID="rcbBacteriaAerobe" runat="server" onselectedindexchanged="rcbBacteriaAerobe_SelectedIndexChanged"></telerik:RadComboBox> 
            <asp:Label ID="lblBacteriaAerobe" runat="server"></asp:Label> 
        </td> 
        <td align="right">Bottles Positive :</td> 
        <td align="left">  
            <telerik:RadNumericTextBox ID="rntbBottlesPositive" runat="server" ontextchanged="rntbBottlesPositive_TextChanged"></telerik:RadNumericTextBox> 
            <asp:Label ID="lblBottlesPositive" runat="server"></asp:Label> 
        </td> 
    </tr> 
    <tr> 
        <td align="right">Bacteria Type :</td> 
        <td align="left">  
            <telerik:RadComboBox ID="rcbBacteriaType" runat="server" onselectedindexchanged="rcbBacteriaType_SelectedIndexChanged"></telerik:RadComboBox> 
            <asp:Label ID="lblBacteriaType" runat="server"></asp:Label> 
        </td> 
        <td align="right">Colony Count :</td> 
        <td align="left">  
            <telerik:RadNumericTextBox ID="rntbColonyCount" runat="server"   
                ontextchanged="rntbColonyCount_TextChanged"></telerik:RadNumericTextBox> 
            <asp:Label ID="lblColonyCount" runat="server"></asp:Label> 
        </td> 
    </tr> 
    <tr> 
        <td colspan="4" align="left">  
            Comments :<br /> 
            <telerik:RadTextBox ID="rtbComments" runat="server" Width="100%" Height="100px"   
                ontextchanged="rtbComments_TextChanged"></telerik:RadTextBox> 
        </td> 
    </tr> 
</table> 
 

The WIP Backend Code for the WUC:
namespace CTI.CTCM.UI.Upload  
{  
    public partial class VerifyBacteria : System.Web.UI.UserControl  
    {  
        private const string SKINNAME = "Vista";  
 
        private BacteriaHoldingSample _dataItem = null;  
 
        public object DataItem  
        {  
            get { return _dataItem; }  
            set { _dataItem = (BacteriaHoldingSample)value; }  
        }  
 
        protected void Page_Load(object sender, EventArgs e)  
        {  
            rcbField.Skin = SKINNAME;  
            rcbLease.Skin = SKINNAME;  
            rcbLocation.Skin = SKINNAME;  
            rcbSMI.Skin = SKINNAME;  
            rdpDate.Skin = SKINNAME;  
            rcbBacteriaAerobe.Skin = SKINNAME;  
            rcbBacteriaType.Skin = SKINNAME;  
            rtbMonitoringMethod.Skin = SKINNAME;  
            rntbChloridePercentRange.Skin = SKINNAME;  
            rtbMediaType.Skin = SKINNAME;  
            rntbDaysIncubated.Skin = SKINNAME;  
            rntbBottlesShot.Skin = SKINNAME;  
            rntbBottlesPositive.Skin = SKINNAME;  
            rntbColonyCount.Skin = SKINNAME;  
            rtbComments.Skin = SKINNAME;  
 
            BuildRcbField();  
 
            rdpDate.AutoPostBack = true;  
            try 
            {  
                rdpDate.SelectedDate = Convert.ToDateTime(_dataItem.Date);  
            }  
            catch (System.Exception ex)  
            {  
                lblDate.Text = " * Please select a valid date.";  
            }  
 
            BuildBacteriaAerobe();  
            BuildBacteriaType();  
 
            rtbMonitoringMethod.AutoPostBack = true;  
            if (_dataItem.MonitoringMethod == string.Empty)  
                lblMonitoringMethod.Text = " * No monitoring method entered.";  
            else 
                rtbMonitoringMethod.Text = _dataItem.MonitoringMethod;  
 
            BuildChloridePercentRange();  
 
            rtbMediaType.AutoPostBack = true;  
            if (_dataItem.MediaType == string.Empty)  
                lblMediaType.Text = " * No media type entered.";  
            else 
                rtbMediaType.Text = _dataItem.MediaType;  
 
            BuildDaysIncubated();  
            BuildBottlesShot();  
            BuildBottlesPositive();  
            BuildColonyCount();  
 
            rtbComments.AutoPostBack = true;  
            rtbComments.Text = _dataItem.Comments;  
        }  
 
        private void BuildRcbField()  
        {  
            Boolean validField = false;  
 
            if (rcbField.Items.Count < 1)  
            {  
                SMIDataWrapper sdw = new SMIDataWrapper();  
                SqlDataReader sdr = sdw.GetFieldInfo();  
                //rcbField.Items.Clear();  
 
                while (sdr.Read())  
                {  
                    string fieldName = sdr["FieldName"].ToString();  
                    string value = sdr["FieldID"].ToString();  
                    RadComboBoxItem item = new RadComboBoxItem(fieldName, value);  
                    rcbField.Items.Add(item);  
 
                    if (fieldName == _dataItem.Field)  
                        validField = true;  
                }  
 
                sdr.Close();  
                rcbField.AutoPostBack = true;  
            }  
            else 
                validField = true;  
 
            if (validField)  
            {  
                int validIndex = rcbField.Items.FindItemByText(_dataItem.Field).Index;  
                rcbField.SelectedIndex = validIndex;  
                rcbLease.Enabled = true;  
                rcbLocation.Enabled = false;  
                rcbSMI.Enabled = false;  
                rcbField_SelectedIndexChanged(nullnull);  
            }  
            else 
            {  
                rcbLease.Enabled = false;  
                rcbLocation.Enabled = false;  
                rcbSMI.Enabled = false;  
                lblSMI.Text = " * There is no valid field name selected.\n";  
            }  
        }  
 
        private void BuildBacteriaAerobe()  
        {  
            rcbBacteriaAerobe.Items.Clear();  
 
            foreach (string type in Enum.GetNames(typeof(BacteriaAerobe)))  
            {  
                RadComboBoxItem item = new RadComboBoxItem(type);  
                rcbBacteriaAerobe.Items.Add(item);  
            }  
 
            rcbBacteriaAerobe.AutoPostBack = true;  
 
            switch (_dataItem.BacteriaAerobe)  
            {  
                case "Aerobic":  
                    rcbBacteriaAerobe.SelectedIndex = rcbBacteriaAerobe.FindItemIndexByText("Aerobic");  
                    break;  
                case "Anaerobic":  
                    rcbBacteriaAerobe.SelectedIndex = rcbBacteriaAerobe.FindItemIndexByText("Anaerobic");  
                    break;  
                default:  
                    rcbBacteriaAerobe.SelectedIndex = rcbBacteriaAerobe.FindItemIndexByText("NA");  
                    lblBacteriaAerobe.Text = " * The bacteria can only be aerobic or anaerobic.";  
                    break;  
            }  
        }  
 
        private void BuildBacteriaType()  
        {  
            rcbBacteriaType.Items.Clear();  
 
            foreach (string type in Enum.GetNames(typeof(BacteriaType)))  
            {  
                RadComboBoxItem item = new RadComboBoxItem(type);  
                rcbBacteriaType.Items.Add(item);  
            }  
 
            rcbBacteriaType.AutoPostBack = true;  
 
            switch (_dataItem.BacteriaType)  
            {  
                case "SRB":  
                    rcbBacteriaType.SelectedIndex = rcbBacteriaType.FindItemIndexByText("SRB");  
                    break;  
                case "APB":  
                    rcbBacteriaType.SelectedIndex = rcbBacteriaType.FindItemIndexByText("APB");  
                    break;  
                case "SRBAPB":  
                    rcbBacteriaType.SelectedIndex = rcbBacteriaType.FindItemIndexByText("SRBAPB");  
                    break;  
                case "None":  
                    rcbBacteriaType.SelectedIndex = rcbBacteriaType.FindItemIndexByText("None");  
                    break;  
                default:  
                    rcbBacteriaType.SelectedIndex = rcbBacteriaType.FindItemIndexByText("NA");  
                    lblBacteriaType.Text = " * The bacteria type can only be SRB, APB, SRBAPB, or none.";  
                    break;  
            }  
        }  
 
        private void BuildChloridePercentRange()  
        {  
            rntbChloridePercentRange.AutoPostBack = true;  
            rntbChloridePercentRange.MaxValue = 100;  
            rntbChloridePercentRange.MinValue = 0;  
            rntbChloridePercentRange.NumberFormat.DecimalDigits = 1;  
            rntbChloridePercentRange.ShowSpinButtons = true;  
 
            try 
            {  
                if (_dataItem.ChloridePctRange == string.Empty)  
                    lblChloridePctRange.Text = " * No data in chloride percent range.";  
 
                int cpr = Convert.ToInt32(_dataItem.ChloridePctRange);  
 
                if (cpr > 100)  
                {  
                    lblChloridePctRange.Text = " * Chloride percent range is over 100%.";  
                    rntbChloridePercentRange.Value = 100;  
                }  
                else if (cpr < 0)  
                {  
                    lblChloridePctRange.Text = " * Chloride percent range cannot be negative.";  
                    rntbChloridePercentRange.Value = 0;  
                }  
                else 
                    rntbChloridePercentRange.Value = cpr;  
            }  
            catch (System.Exception ex)  
            {  
                if (_dataItem.ChloridePctRange == string.Empty)  
                    lblChloridePctRange.Text = " * No data in chloride percent range.";  
                else 
                    lblChloridePctRange.Text = " * Incorrect data type in chloride percent range.";  
            }  
        }  
 
        private void BuildDaysIncubated()  
        {  
            rntbDaysIncubated.AutoPostBack = true;  
            rntbDaysIncubated.MinValue = 0;  
            rntbDaysIncubated.NumberFormat.DecimalDigits = 0;  
            rntbDaysIncubated.ShowSpinButtons = true;  
 
            try 
            {  
                if (_dataItem.DaysIncubated == string.Empty)  
                    lblDaysIncubated.Text = " * No data in days incubated.";  
                else 
                    rntbDaysIncubated.Value = Convert.ToInt32(_dataItem.DaysIncubated);  
            }  
            catch (System.Exception ex)  
            {  
                lblDaysIncubated.Text = " * Incorrect data type in days incubated.";  
            }  
        }  
 
        private void BuildBottlesShot()  
        {  
            rntbBottlesShot.AutoPostBack = true;  
            rntbBottlesShot.MinValue = 0;  
            rntbBottlesShot.NumberFormat.DecimalDigits = 0;  
            rntbBottlesShot.ShowSpinButtons = true;  
 
            try 
            {  
                if (_dataItem.BottlesShot == string.Empty)  
                    lblBottlesShot.Text = " * No data in bottles shot.";  
                else 
                    rntbBottlesShot.Value = Convert.ToInt32(_dataItem.BottlesShot);  
            }  
            catch (System.Exception ex)  
            {  
                lblBottlesShot.Text = " * Incorrect data type in bottles shot.";  
            }  
        }  
 
        private void BuildBottlesPositive()  
        {  
            rntbBottlesPositive.AutoPostBack = true;  
            rntbBottlesPositive.MinValue = 0;  
            rntbBottlesPositive.NumberFormat.DecimalDigits = 0;  
            rntbBottlesPositive.ShowSpinButtons = true;  
 
            try 
            {  
                if (_dataItem.BottlesPositive == string.Empty)  
                    lblBottlesPositive.Text = " * No data in bottles positive.";  
                else 
                    rntbBottlesPositive.Value = Convert.ToInt32(_dataItem.BottlesPositive);  
 
                if (rntbBottlesPositive.Value > rntbBottlesShot.Value)  
                    lblBottlesPositive.Text = " * Bottles positive can't be higher than bottles shot.";  
            }  
            catch (System.Exception ex)  
            {  
                rntbBottlesPositive.Text = " * Incorrect data type in bottles positive.";  
            }  
        }  
 
        private void BuildColonyCount()  
        {  
            rntbColonyCount.AutoPostBack = true;  
            rntbColonyCount.MinValue = 0;  
            rntbColonyCount.NumberFormat.DecimalDigits = 0;  
            rntbColonyCount.NumberFormat.GroupSeparator = ",";  
 
            try 
            {  
                if (_dataItem.ColonyCount == string.Empty)  
                    lblColonyCount.Text = " * No data in colony count.";  
                else 
                    rntbColonyCount.Value = Convert.ToInt32(_dataItem.ColonyCount);  
 
                UInt64 calulatedColony = CTI.CTCM.Equations.BacteriaEq.CalcColonyCount(Convert.ToInt32(rntbBottlesPositive.Value));  
 
                if (Convert.ToDouble(calulatedColony) != rntbColonyCount.Value)  
                    lblColonyCount.Text = " * Calculated colony count is " + calulatedColony.ToString() + ".";  
            }  
            catch (System.Exception ex)  
            {  
                lblColonyCount.Text = " * Incorrect data type in colony count.";  
            }  
        }  
 
        protected void rcbField_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)  
        {  
            _dataItem.Field = rcbField.SelectedItem.Text;  
 
            SMIDataWrapper sdw = new SMIDataWrapper();  
            SqlDataReader sdr = sdw.GetFieldInfo();  
 
            sdr = sdw.GetLeaseInfo(Convert.ToInt32(rcbField.SelectedValue));  
            Boolean validLease = false;  
            rcbLease.Items.Clear();  
 
            while(sdr.Read())  
            {  
                string leaseName = sdr["LeaseName"].ToString();  
                string value = sdr["LeaseID"].ToString();  
                RadComboBoxItem item = new RadComboBoxItem(leaseName, value);  
                rcbLease.Items.Add(item);  
 
                if (leaseName == _dataItem.Lease)  
                    validLease = true;  
            }  
 
            sdr.Close();  
 
            rcbLease.AutoPostBack = true;  
 
            if(validLease)  
            {  
                int validIndex = rcbLease.Items.FindItemByText(_dataItem.Lease).Index;  
                rcbLease.SelectedIndex = validIndex;  
                rcbLocation.Enabled = true;  
                rcbSMI.Enabled = false;  
                rcbLease_SelectedIndexChanged(nullnull);  
            }  
            else 
            {  
                rcbLocation.Enabled = false;  
                rcbSMI.Enabled = false;  
                lblSMI.Text = " * There is no valid lease selected.\n";  
            }  
        }  
 
        protected void rcbLease_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)  
        {  
            _dataItem.Lease = rcbLease.SelectedItem.Text;  
 
            SMIDataWrapper sdw = new SMIDataWrapper();  
            SqlDataReader sdr = sdw.GetLocationInfo(Convert.ToInt32(rcbLease.SelectedValue));  
            Boolean validLocation = false;  
            rcbLocation.Items.Clear();  
 
            while(sdr.Read())  
            {  
                string locationName = sdr["LocationName"].ToString();  
                string locationID = sdr["LocationID"].ToString();  
                RadComboBoxItem item = new RadComboBoxItem(locationName, locationID);  
                rcbLocation.Items.Add(item);  
 
                if (locationName == _dataItem.Location)  
                    validLocation = true;  
            }  
 
            sdr.Close();  
            rcbLocation.AutoPostBack = true;  
 
            if (validLocation)  
            {  
                int validIndex = rcbLocation.Items.FindItemByText(_dataItem.Location).Index;  
                rcbLocation.SelectedIndex = validIndex;  
                rcbSMI.Enabled = true;  
                rcbLocation_SelectedIndexChanged(nullnull);  
            }  
            else 
            {  
                rcbSMI.Enabled = false;  
                lblSMI.Text = " * There is no valid location selected.";  
            }  
        }  
 
        protected void rcbLocation_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)  
        {  
            _dataItem.Location = rcbLocation.SelectedItem.Text;  
 
            rcbSMI.Enabled = true;  
            SMIDataWrapper sdw = new SMIDataWrapper();  
            SqlDataReader sdr = sdw.GetSMIInfo(Convert.ToInt32(rcbLocation.SelectedValue));  
            Boolean validSMI = false;  
            rcbSMI.Items.Clear();  
 
            while(sdr.Read())  
            {  
                string SMIName = sdr["SMI"].ToString();  
                RadComboBoxItem item = new RadComboBoxItem(SMIName);  
                rcbSMI.Items.Add(item);  
 
                if (SMIName == _dataItem.SMI)  
                    validSMI = true;  
            }  
 
            sdr.Close();  
            rcbSMI.AutoPostBack = true;  
 
            if (validSMI)  
            {  
                rcbSMI.SelectedIndex = rcbSMI.FindItemIndexByText(_dataItem.SMI);  
                rcbSMI_SelectedIndexChanged(nullnull);  
            }  
            else 
                lblSMI.Text = " * There is no valid SMI selected.";  
        }  
 
        protected void rcbSMI_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)  
        {  
            _dataItem.SMI = rcbSMI.SelectedItem.Text;  
            lblSMI.Text = "";  
        }  
 
        protected void rdpDate_SelectedDateChanged(object sender, Telerik.Web.UI.Calendar.SelectedDateChangedEventArgs e)  
        {  
            _dataItem.Date = rdpDate.SelectedDate.ToString();  
            lblDate.Text = "";  
        }  
 
        protected void rcbBacteriaAerobe_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)  
        {  
            _dataItem.BacteriaAerobe = rcbBacteriaAerobe.SelectedItem.Text;  
 
            if (_dataItem.BacteriaAerobe == "Aerobic" || _dataItem.BacteriaAerobe == "Anaerobic")  
                lblBacteriaAerobe.Text = "";  
            else 
                lblBacteriaAerobe.Text = " * The bacteria can only be aerobic or anaerobic.";  
        }  
 
        protected void rcbBacteriaType_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)  
        {  
            _dataItem.BacteriaType = rcbBacteriaType.SelectedItem.Text;  
 
            if (_dataItem.BacteriaType == "SRB" || _dataItem.BacteriaType == "APB" ||  
                _dataItem.BacteriaType == "SRBAPB" || _dataItem.BacteriaType == "None")  
                lblBacteriaType.Text = "";  
            else 
                lblBacteriaType.Text = " * The bacteria type can only be SRB, APB, SRBAPB, or none.";  
        }  
 
        protected void rtbMonitoringMethod_TextChanged(object sender, EventArgs e)  
        {  
            if (rtbMonitoringMethod.Text == string.Empty)  
                lblMonitoringMethod.Text = " * No monitoring method entered.";  
            else 
            {  
                lblMonitoringMethod.Text = "";  
                _dataItem.MonitoringMethod = rtbMonitoringMethod.Text;  
            }  
        }  
 
        protected void rntbChloridePercentRange_TextChanged(object sender, EventArgs e)  
        {  
            _dataItem.ChloridePctRange = rntbChloridePercentRange.Value.ToString();  
            lblChloridePctRange.Text = "";  
        }  
 
        protected void rtbMediaType_TextChanged(object sender, EventArgs e)  
        {  
            if (rtbMediaType.Text == string.Empty)  
                lblMediaType.Text = " * No media type entered.";  
            else 
            {  
                lblMediaType.Text = "";  
                _dataItem.MediaType = rtbMediaType.Text;  
            }  
        }  
 
        protected void rntbDaysIncubated_TextChanged(object sender, EventArgs e)  
        {  
            _dataItem.DaysIncubated = rntbDaysIncubated.Value.ToString();  
            lblDaysIncubated.Text = "";  
        }  
 
        protected void rntbBottlesShot_TextChanged(object sender, EventArgs e)  
        {  
            _dataItem.BottlesShot = rntbBottlesShot.Value.ToString();  
            lblBottlesShot.Text = "";  
        }  
 
        protected void rntbBottlesPositive_TextChanged(object sender, EventArgs e)  
        {  
            _dataItem.BottlesPositive = rntbBottlesPositive.Value.ToString();  
 
            if (rntbBottlesPositive.Value > rntbBottlesShot.Value)  
                lblBottlesPositive.Text = " * Bottles positive can't be higher than bottles shot.";  
            else 
                lblBottlesPositive.Text = "";  
 
            UInt64 calulatedColony = CTI.CTCM.Equations.BacteriaEq.CalcColonyCount(Convert.ToInt32(rntbBottlesPositive.Value));  
 
            if (Convert.ToDouble(calulatedColony) != rntbColonyCount.Value)  
                lblColonyCount.Text = " * Calculated colony count is " + calulatedColony.ToString() + ".";  
        }  
 
        protected void rntbColonyCount_TextChanged(object sender, EventArgs e)  
        {  
            _dataItem.ColonyCount = rntbColonyCount.Value.ToString();  
 
            UInt64 calulatedColony = CTI.CTCM.Equations.BacteriaEq.CalcColonyCount(Convert.ToInt32(rntbBottlesPositive.Value));  
 
            if (Convert.ToDouble(calulatedColony) != rntbColonyCount.Value)  
                lblColonyCount.Text = " * Calculated colony count is " + calulatedColony.ToString() + ".";  
            else 
                lblColonyCount.Text = "";  
        }  
 
        protected void rtbComments_TextChanged(object sender, EventArgs e)  
        {  
            _dataItem.Comments = rtbComments.Text;  
        }  
    }  
Iana Tsolova
Telerik team
 answered on 01 Jun 2010
1 answer
111 views
Just wondering whether Telerik has developed any controls that can allow developers to easily develop Scheduling or Time tabling apps such as University Class time tables, schools time tables etc.

Does anybody have an idea from where to start?

Trapped in the closet with this.

Thanks in Advance.
Sebastian
Telerik team
 answered on 01 Jun 2010
1 answer
171 views
I was having some trouble with different versions of the AJAX controls, and removed the older assemblies from the GAC.

I now just keep the BIN files in each R&D site.

In order to remove the older assemblies from the GAC, I needed to uninstall the product via Windows Installer.

Assembly/Bin problems now gone.

But so are my Extensions for Visual Studio 2008.

How do I install them "manually", as opposed to the Windows Installer technique?
Sebastian
Telerik team
 answered on 01 Jun 2010
1 answer
138 views
Hi,

I have the editor configured in two environments slightly differently and in one of the two the right-click context menu doesn't appear, I just get a . near the mouse pointer.

Hopefully I'm missing something obvious and there's an easy solution, can you turn the menus off entirely in a single location or is it just a case of removing the <contextMenus> section of the tools.xml file?

Whilst there are subtle differences in the toolbar configurations between the environments, both seem to have the same <contextMenus> section.

My tools.xml is attached below:

<root> 
  <modules> 
    <module name="RadEditorDomInspector" /> 
  </modules> 
   
  <tools name="row1">  
    <tool name="Print" /> 
    <tool name="AjaxSpellCheck" /> 
    <tool name="FindAndReplace" /> 
    <tool separator="true"/>  
    <tool name="Cut" shortcut="CTRL+X" /> 
    <tool name="Copy" shortcut="CTRL+C" /> 
    <tool name="Paste" shortcut="CTRL+V" /> 
    <tool name="PasteFromWord" /> 
    <tool name="PastePlainText" /> 
    <tool name="PasteAsHtml"  /> 
    <tool name="SelectAll"/>    
    <tool separator="true"/>  
    <tool name="Undo" shortcut="CTRL+Z" /> 
    <tool name="Redo" shortcut="CTRL+Y" /> 
    <tool name="StripAll"/>  
    <tool name="StripCss"/>  
    <tool name="StripFont"/>  
    <tool name="StripSpan"/>  
    <tool name="StripWord"/>  
  </tools> 
 
<tools name="row2">  
    <tool name="MOSSLinkManager" shortcut="CTRL+K" /> 
    <tool name="Unlink" shortcut="CTRL+SHIFT+K" /> 
    <tool name="ImageManager" shortcut="CTRL+G" /> 
    <tool name="MOSSTemplateManager" /> 
    <tool separator="true"/>  
 
      <tool name="InsertBreakAtEnd"  /> 
      <tool name="InsertSymbol"  /> 
      <tool name="InsertHorizontalRule"  /> 
      <tool name="InsertDate"  /> 
      <tool separator="true"/>  
    <tool name="MOSSInsertTable" /> 
    <tool name="SetTableProperties" /> 
    <tool name="ToggleTableBorder" /> 
    <tool name="MOSSInsertTableElement">  
      <tool name="InsertRowAbove" /> 
      <tool name="InsertRowBelow" /> 
      <tool name="InsertColumnLeft" /> 
      <tool name="InsertColumnRight" /> 
      <tool name="DeleteRow" /> 
      <tool name="DeleteColumn" /> 
      <tool name="SplitCell" /> 
    </tool> 
    <tool name="MOSSDeleteTableElement">  
      <tool name="DeleteRow" /> 
      <tool name="DeleteColumn" /> 
    </tool> 
    <tool name="MergeColumns" /> 
      <tool separator="true"/>  
    <tool name="InsertOrderedList" /> 
    <tool name="InsertUnorderedList" /> 
    <tool name="Outdent" /> 
    <tool name="Indent" /> 
 
  </tools> 
<tools name="row3">  
    <tool name="JustifyLeft" /> 
    <tool name="JustifyCenter" /> 
    <tool name="JustifyRight" /> 
      <tool separator="true"/>  
    <tool name="Bold" shortcut="CTRL+B" /> 
    <tool name="Italic" shortcut="CTRL+I" /> 
    <tool name="Underline" shortcut="CTRL+U" /> 
    <tool name="StrikeThrough"  /> 
    <tool name="Superscript"  /> 
    <tool name="Subscript"  /> 
      <tool separator="true"/>  
    <tool name="FormatBlock" /> 
  </tools>    
    
  <contextMenus> 
    <contextMenu forElement="*">  
      <tool name="Cut"/>  
      <tool name="Copy"/>  
      <tool name="Paste"/>  
    </contextMenu> 
  </contextMenus> 
<fontNames> 
  <item name="Arial" /> 
</fontNames> 
<colors> 
 <color value="black" /> 
 <color value="#af005f" /> 
 <color value="#990066" /> 
 <color value="#666666" /> 
</colors> 
  <paragraphs> 
    <paragraph name="&lt;P>Normal&lt;/P>" value="&lt;P>" /> 
    <paragraph name="&lt;H2>Head&lt;/H2>" value="&lt;H2>" /> 
    <paragraph name="&lt;H3>Head 1&lt;/H3>" value="&lt;H3>" /> 
    <paragraph name="&lt;H4>Head 2&lt;/H4>" value="&lt;H4>" /> 
    <paragraph name="&lt;H5>Head 3&lt;/H5>" value="&lt;H5>" /> 
  </paragraphs> 
 
 
  <cssFiles> 
    <item name="/_wpresources/RadEditorSharePoint/5.6.0.0__1f131a624888eeed/Resources/IAPage.css" /> 
  </cssFiles> 
  <classes> 
    <class name="Clear Class" value="" /> 
   </classes> 
 
</root> 
Stanimir
Telerik team
 answered on 01 Jun 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?