Color Picking making menu diappear

9 posts, 0 answers
  1. ajit
    ajit avatar
    46 posts
    Member since:
    Jun 2009

    Posted 09 Oct 2009 Link to this post

    Hi ,
                 I am using the rad color picker in the grid. As the grid is bound the picker behaves properly. The user should not be able to change the color in any row so i have made the color picker enabled as false. Now what is happening is when the color picker is diabled and the user clicks on it, the menus disappear and the page jumps like a post back. it works fine if i dont diable the picker at the time of binding. Ideally i would like to disable it  and enable it when the user clicks on row edit button. Please could you provide me a solution to this issue.

    Thank you

    Regards,
    Ajit
  2. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 14 Oct 2009 Link to this post

    Hi Ajit,
    I suppose you are not using the latest version of the Telerik.Web.UI assembly. Indeed, there was such a problem with the RadColorPicker control, but we fixed it for the 2009.2 826 version. In case you update the Telerik.Web.UI.dll file in your application, you should no longer experience this problem.

    Regards,
    Tsvetie
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. ajit
    ajit avatar
    46 posts
    Member since:
    Jun 2009

    Posted 14 Oct 2009 Link to this post

    hi Tsvetie ,
                            Thank  you for the reply. I noticed that your suggestion does solve the issue but now the color picker icon is not showing up properly in the grid. What I am trying to say is if you show the icon, it appears with a color and  drop down arrow. So i am using asp.net grid view and a certain part where is the arrow appears on the icon is getting cut off so its not looking elegant in the grid rows. Please let me know if i am able to explain my problem.

    Regards,
    Ajit
  5. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 19 Oct 2009 Link to this post

    Hello ajit,
    I am not quite sure I understand the problem. Could you please send me an image of the problem as well as the code of your test page?

    Kind regards,
    Tsvetie
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  6. ajit
    ajit avatar
    46 posts
    Member since:
    Jun 2009

    Posted 20 Oct 2009 Link to this post


    Hi Tsvetie ,
                              i have attached a view of the problem i am facing. Please let me know if you have any other questions.






  7. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 21 Oct 2009 Link to this post

    Hi ajit,
    You are the first to report such a problem and I am not quite sure how I can reproduce it locally. Could you please post the code of a simple test page that demonstrates the problem here as well?

    Kind regards,
    Tsvetie
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  8. ajit
    ajit avatar
    46 posts
    Member since:
    Jun 2009

    Posted 21 Oct 2009 Link to this post

    Hi Tsvetie,
                          I am posting my aspx and .cs code here. All you have to do is create an apx called EventsColor.aspx and paste this code, it should work for you. Then when u run the page click on menu item "Rx Power" and you should be able to replicate the issue i am talking about here. Let me know if you have any questions.


    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EventsColor.aspx.cs" Inherits="CommonMapModule.EventsColor" %>
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head id="Head1" runat="server">
        <title></title>
        <link href="../Map/styles/LayerControl.css" type="text/css" rel="stylesheet" />
        <link href="../Skins/MySkin/ComboBox.MySkin.css" rel="Stylesheet" type="text/css" />
        <link href="../Skins/MySkin/Input.MySkin.css" rel="Stylesheet" type="text/css" />
        <link href="../Skins/MySkin/Menu.MySkin.css" rel="Stylesheet" type="text/css" />
    </head>
    <body>
        <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
        <table id="Table1" style="font-size: 8pt; border-right: #7F9DB7 1px solid; border-top: #7F9DB7 1px solid; padding-bottom: 6px;
             border-left: #7F9DB7 1px solid; padding-top: 6px; border-bottom: #7F9DB7 1px solid; font-family: Verdana, 'MS Reference Sans Serif', Tahoma, Arial"
            cellspacing="0" cellpadding="0" width="99%" border="0">
            <tr>
                <td>
                    <table id="Table2" style="font-size: 8pt; font-family: Verdana" cellspacing="0" cellpadding="2"
                        width="99%" align="center" border="0">
                        <tr>
                            <td align="left" background="../Images/titleBg.jpg" height="25">
                                <table id="Table6" cellspacing="0" cellpadding="0" width="99%" border="0">
                                    <tr>
                                        <td valign="middle">
                                            &nbsp;
                                            <asp:Label ID="Label1" runat="server" BorderStyle="None" Font-Size="8pt" Font-Names="Verdana"
                                                Font-Bold="True">Metric Legend List</asp:Label>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td>
                    <table width="90%" align="center" class="TextNormal">
                       <tr>
                            <td align="right" style="width:120px">
                                Technology:&nbsp;
                            </td>
                           <td align="left" style="width:120px">
                               <telerik:radcombobox id="cboTechnology" enableembeddedskins="false" skin="MySkin" cssclass="TextNormal"
                                   allowcustomtext="false" runat="server" AutoPostBack="true" OnSelectedIndexChanged= "cboTechnology_SelectedIndexChanged">
                               </telerik:radcombobox>
                           </td>
                        
                            <td align="left" colspan="2">
                               <telerik:RadMenu ID="RadMenu1" runat="server" Skin="MySkin" EnableEmbeddedSkins="false"
                                   CollapseDelay="0" ExpandDelay="0" OnItemClick="RadMenu1_ItemClick">
                                   <Items>
                                       <telerik:RadMenuItem Text="Rx Power" Value="RxPower">
                                       </telerik:RadMenuItem>
                                       <telerik:RadMenuItem Text="Tx Power" Value="RxPower">
                                       </telerik:RadMenuItem>
                                   </Items>
                               </telerik:RadMenu>
                           </td>
                        </tr>
                   </table>
                </td>
            </tr>
            <tr>
                <td align="center">
                   <asp:Label ID="lblMenuItem" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td align="center">
                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" ControlStyle-Font-Size="8pt"
                        ControlStyle-Font-Names="Verdana" FooterStyle-Font-Names="Verdana" FooterStyle-Font-Size="8pt"
                        HeaderStyle-Font-Names="Verdana" HeaderStyle-Font-Size="8pt" ItemStyle-Font-Names="Verdana"
                        ItemStyle-Font-Size="8pt" CellPadding="1"
                        ShowFooter="True" ForeColor="#333333" Font-Names="Verdana" DataKeyNames=""
                        HorizontalAlign="center" Width="99%" OnSelectedIndexChanged="GridView1_SelectedIndexChanged">
                        <FooterStyle Font-Names="Verdana" Font-Size="8pt"></FooterStyle>
                        <Columns>
                            <asp:TemplateField HeaderText="Min Threshold">
                                <EditItemTemplate>
                                    <asp:TextBox ID="txtmin_value" runat="server" Text='<%# Bind("min") %>' Width="50px"
                                        Font-Names="Verdana" Font-Size="8pt"></asp:TextBox>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="lblmin_value" runat="server" Text='<%# Bind("min") %>' Width="50px"
                                        Font-Names="Verdana" Font-Size="8pt"></asp:Label>
                                </ItemTemplate>
                                <FooterTemplate>
                                    <asp:TextBox ID="txtmin_value" runat="server" Text='<%# Bind("min") %>' Width="50px"
                                        Font-Names="Verdana" Font-Size="8pt"></asp:TextBox>
                                </FooterTemplate>
                            </asp:TemplateField>
                             <asp:TemplateField HeaderText="Max Threshold">
                                <EditItemTemplate>
                                    <asp:TextBox ID="txtmax_value" runat="server" Text='<%# Bind("max") %>' Width="50px"
                                        Font-Names="Verdana" Font-Size="8pt"></asp:TextBox>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="lblmax_value" runat="server" Text='<%# Bind("max") %>' Width="50px"
                                        Font-Names="Verdana" Font-Size="8pt"></asp:Label>
                                </ItemTemplate>
                                <FooterTemplate>
                                    <asp:TextBox ID="txtmax_value" runat="server" Text='<%# Bind("max") %>' Width="50px"
                                        Font-Names="Verdana" Font-Size="8pt"></asp:TextBox>
                                </FooterTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Legend Color">
                                 <EditItemTemplate>
                                     <telerik:RadColorPicker ID="RadColorPicker1" runat="server" AutoPostBack="false"
                                         ShowIcon="true" KeepInScreenBounds="false" EnableTheming="true" PreviewColor="False" ShowEmptyColor="False"
                                         OnDataBinding="ColorBind" CurrentColorText='<%#Eval("clr") %>'>
                                     </telerik:RadColorPicker>
                                </EditItemTemplate>
                                <ItemTemplate>
                                     <telerik:RadColorPicker ID="RadColorPicker1" runat="server" AutoPostBack="false"
                                         ShowIcon="true" KeepInScreenBounds="false" PreviewColor="False" ShowEmptyColor="False"
                                         Skin="Office2007" OnDataBinding="ColorBind" CurrentColorText='<%#Eval("clr") %>'>
                                    </telerik:RadColorPicker>
                                </ItemTemplate>
                                <FooterTemplate>
                                    <telerik:RadColorPicker ID="RadColorPicker1" runat="server" AutoPostBack="false"
                                         ShowIcon="true" KeepInScreenBounds="false" PreviewColor="False" ShowEmptyColor="False"
                                         Skin="Office2007">
                                     </telerik:RadColorPicker>
                                </FooterTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <PagerStyle Width="200px" />
                        <HeaderStyle Font-Names="Verdana" Font-Size="8pt" BackColor="#B5E2FD" Font-Bold="False"></HeaderStyle>
                        <FooterStyle BackColor="LightSteelBlue" ForeColor="Black" Font-Bold="False" Font-Names="Verdana"
                            Font-Size="8pt" />
                        <RowStyle ForeColor="#333333" BackColor="#E7EAEF" Font-Names="Verdana" Font-Size="8pt" />
                        <SelectedRowStyle BackColor="#E2DED6" ForeColor="#333333" Font-Names="Verdana"
                            Font-Size="8pt" />
                        <PagerStyle BackColor="LightSteelBlue" ForeColor="White" HorizontalAlign="Center"
                            Font-Names="Verdana" Font-Size="8pt" />
                        <HeaderStyle BackColor="LightSteelBlue" Font-Bold="False" ForeColor="Black" Height="22px"
                            Font-Names="Verdana" Font-Size="8pt" />
                        <EditRowStyle BackColor="Beige" Font-Names="Verdana" Font-Size="8pt" />
                        <AlternatingRowStyle BackColor="White" ForeColor="Black" Font-Names="Verdana" Font-Size="8pt" />
                    </asp:GridView>
                </td>
            </tr>
        </table>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="cboTechnology">
                    <UpdatedControls>
                         <telerik:AjaxUpdatedControl ControlID="RadMenu1"></telerik:AjaxUpdatedControl>
                         <telerik:AjaxUpdatedControl ControlID="GridView1"></telerik:AjaxUpdatedControl>
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RadMenu1">
                    <UpdatedControls>
                         <telerik:AjaxUpdatedControl ControlID="RadMenu1"></telerik:AjaxUpdatedControl>
                         <telerik:AjaxUpdatedControl ControlID="lblMenuItem"></telerik:AjaxUpdatedControl>
                         <telerik:AjaxUpdatedControl ControlID="GridView1"></telerik:AjaxUpdatedControl>
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        </form>
    </body>
    </html>

    --------------------------------------------------------------------------------------------------------------------------
    CS CODE:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Data;
    using Telerik.Web.UI;
    using System.Drawing;

    namespace CommonMapModule
    {
        public partial class EventsColor : System.Web.UI.Page
        {
            protected string custName = string.Empty;
            //protected VxOrchestration.SessionState sState;

            protected void Page_Load(object sender, EventArgs e)
            {
               // VxSystem.Adapter.ConnString = System.Configuration.ConfigurationSettings.AppSettings["OracleConnStr"];
                try
                {
                    //sState = (VxOrchestration.SessionState)Session["SessionSearch"];
                    if (!Page.IsPostBack)
                    {
                       // fillCboTechnology();
                    }
                }
                catch (Exception ex)
                {
                    VxSystem.Logger.LogObj.WriteLog(this, ex);
                }
            }

            /*protected void fillCboTechnology()
            {
                string sql = "select technology_id, technology_name from technology_main where technology_id in (1,4,7) order by technology_id ";
                DataSet ds = VxSystem.Adapter.getDataSet(sql);
                if (ds != null && ds.Tables[0].Rows.Count > 0)
                {
                    cboTechnology.DataTextField = "technology_name";
                    cboTechnology.DataValueField = "technology_id";
                    cboTechnology.DataSource = ds.Tables[0].DefaultView;
                    cboTechnology.DataBind();
                }
                cboTechnology.Items.Insert(0, new RadComboBoxItem("Please Select", "0"));
            }*/

            protected void cboTechnology_SelectedIndexChanged(object o, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
            {
                if (cboTechnology.SelectedIndex != 0)
                {
                    //RadMenu1.Items.Clear();
                    //RadMenu1.Items.AddRange(AddChildren(0, int.Parse(cboTechnology.SelectedItem.Value)));
                    //CorrectCollection(RadMenu1.Items);
                }
            }

            /*private RadMenuItem[] AddChildren(int parentindex, int TechId)
            {
                string sql = string.Empty;
                sql = " SELECT * FROM mapaction_main_dev WHERE technology_id =" + TechId + " AND mapaction_id IN (SELECT DISTINCT mapaction_id FROM mapaction_rel_devicetype WHERE device_type_id in (1,2))";
                sql += " AND mapaction_id NOT IN (SELECT DISTINCT mapaction_id FROM customer_rel_mapaction where customer_id = 4 ) ";
                sql += " AND IS_CROSS_TECH_ACTION = 0";
                sql += " AND IS_CUSTOM_MENU = 0";
                sql += "  AND ((active = 1 AND mapaction_id IN (SELECT mapaction_id FROM mapaction_rel_metric WHERE legend_type_id = 17)) OR (active = 0))";
                sql += " AND mapaction_parent_id = " + parentindex + " order by mapaction_order ";

                DataTable dt = VxSystem.Adapter.getDataTable(sql);
                RadMenuItem[] itemcollection = new RadMenuItem[dt.Rows.Count];
                if (dt != null && dt.Rows.Count > 0)
                {
                    int count = dt.Rows.Count;
                    int i = 0;
                    while (count != 0)
                    {
                        RadMenuItem item = new RadMenuItem();
                        item.Text = dt.Rows[i]["mapaction_name"].ToString();
                        MapMenuTye curMenuType = (MapMenuTye)int.Parse(dt.Rows[i]["Active"].ToString());
                        switch (curMenuType)
                        {
                            case MapMenuTye.Active:
                                item.Value = dt.Rows[i]["mapaction_id"].ToString();
                                break;
                            case MapMenuTye.InActive:
                                item.Value = "-1";
                                break;
                            case MapMenuTye.Interactive:
                                item.Value = dt.Rows[i]["mapaction_id"].ToString() + "," + dt.Rows[i]["mapaction_command"].ToString();
                                break;
                        }

                        item.ToolTip = dt.Rows[i]["mapaction_name"].ToString();
                        RadMenuItem[] tempcollection = AddChildren(int.Parse(dt.Rows[i]["mapaction_id"].ToString()), TechId);
                        if (tempcollection != null)
                        {
                            item.Items.AddRange(tempcollection);
                        }
                        itemcollection[i] = item;
                        i++;
                        count--;
                    }

                    return itemcollection;
                }
                return null;
            }*/

            protected void RadMenu1_ItemClick(object sender, RadMenuEventArgs e)
            {
                lblMenuItem.Text = string.Empty;
                lblMenuItem.Text = RadMenu1.SelectedItem.Text.ToString();
                fillRadgrid(RadMenu1.SelectedItem.Value);
            }

            /*private bool HasNoActiveChildren(RadMenuItem myItem)
            {
                if (myItem.Value == "-1" && myItem.Items.Count == 0)
                {
                    return true;
                }
                else if (myItem.Value != "-1" && myItem.Items.Count == 0)
                {
                    return false;
                }
                else
                {
                    foreach (RadMenuItem myChildItem in myItem.Items)
                    {
                        if (!(HasNoActiveChildren(myChildItem)))
                        {
                            return false;
                        }
                    }
                }
                return true;
            }

            private void CorrectCollection(RadMenuItemCollection rmC)
            {
                for (int index = 0; index < rmC.Count; index++)
                {
                    RadMenuItem rmI = rmC[index];
                    if (!(HasNoActiveChildren(rmI)))
                    {
                        CorrectCollection(rmI.Items);
                    }
                    else
                    {
                        rmC.RemoveAt(index);
                    }
                }
            }*/

            protected void fillRadgrid(string metric)
            {
                //string sql = "select max,min,clr,legtext,leg_identifier,legend_order from mapaction_rel_legend where technology_id=1";
                //sql += " and mapaction_id = 5000 and customer_id = 4 order by max";

                //DataSet ds = VxSystem.Adapter.getDataSet(sql);

                DataSet ds = new DataSet();
                DataTable cTable = ds.Tables.Add();
                //-- Add columns to the data table
                cTable.Columns.Add("Min", typeof(string));
                cTable.Columns.Add("Max", typeof(string));
                cTable.Columns.Add("clr", typeof(string));
                //-- Add rows to the data table
                cTable.Rows.Add("", "-99.4", "gray");
                cTable.Rows.Add("-99.4 ", "-90.8", "Orange");
                cTable.Rows.Add("-90.8", "-83.7", "Blue");
                cTable.Rows.Add("-83.7", "-73.7 ", "Red");
                cTable.Rows.Add("-73.7", "-68.7", "Yellow");
                cTable.Rows.Add("-68.7", "", "Green");

                if (ds != null && ds.Tables[0].Rows.Count > 0)
                {
                    GridView1.DataSource = ds.Tables[0].DefaultView;
                    GridView1.DataBind();
                }
                else
                {
                    GridView1.DataSource = null;
                    GridView1.DataBind();
                }
            }

            /*protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
            {
                //RadColorPicker1.SelectedColor = ColorTranslator.FromHtml((DataBinder.Eval(e.Row.DataItem, "clr").ToString()));   
            }

            protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
            {
                try
                {
                    string sql = string.Empty;
                    string key1 = GridView1.DataKeys[0].Value.ToString();
                    string key2 = GridView1.DataKeys[e.RowIndex]["legend_order"].ToString();
                    if (key1 != "" && key2 != "")
                        sql = "delete from mapaction_rel_legend where legend_order = " + key2 + " and leg_identifier = '" + key1 + "' ";
                    VxSystem.Adapter.executeNonQuery(sql);
                    fillRadgrid(RadMenu1.SelectedItem.Value);
                }
                catch (Exception ex)
                {
                    VxSystem.Logger.LogObj.WriteLog(this, ex);
                }
            }

            protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
            {
                try
                {
                    string sql = string.Empty;
                    string key1 = GridView1.DataKeys[0].Value.ToString();
                    string key2 = GridView1.DataKeys[e.RowIndex]["legend_order"].ToString();
                    string tvalue1 = ((TextBox)GridView1.Rows[e.RowIndex].FindControl("txtmax_value")).Text;
                    string tvalue2 = ((TextBox)GridView1.Rows[e.RowIndex].FindControl("txtmin_value")).Text;
                    //string tvalue3 = ((RadComboBox)GridView1.Rows[e.RowIndex].FindControl("cboColor1")).SelectedItem.Value;
                    string tvalue3 = ColorTranslator.ToHtml(((RadColorPicker)GridView1.Rows[e.RowIndex].FindControl("RadColorPicker1")).SelectedColor);
                    string tvalue4 = ((TextBox)GridView1.Rows[e.RowIndex].FindControl("txtlegend_text")).Text;

                    if (tvalue1 == "")
                        tvalue1 = "null";
                    if (tvalue2 == "")
                        tvalue2 = "null";

                    if (tvalue3 != "")
                        sql = "update mapaction_rel_legend set max=" + tvalue1 + ",min=" + tvalue2 + ",clr='" + tvalue3 + "' ,legtext='" + tvalue4 + "' where legend_order = " + key2 + " and leg_identifier = '" + key1 + "' and mapaction_id = " + RadMenu1.SelectedItem.Value;
                    VxSystem.Adapter.executeNonQuery(sql);
                    GridView1.EditIndex = -1;
                    fillRadgrid(RadMenu1.SelectedItem.Value);
                }
                catch (Exception ex)
                {
                    VxSystem.Logger.LogObj.WriteLog(this, ex);
                }
            }

            protected void GridView1_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
            {
                GridView1.EditIndex = -1;
                fillRadgrid(RadMenu1.SelectedItem.Value);
            }

            protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
            {
                GridView1.EditIndex = e.NewEditIndex;
                RadColorPicker rc = (RadColorPicker)GridView1.Rows[e.NewEditIndex].FindControl("RadColorPicker1");
                rc.Enabled = true;
                fillRadgrid(RadMenu1.SelectedItem.Value);
            }

            protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
            {
                if (e.CommandName.Equals("AddNew"))
                {
                    try
                    {
                        GridViewRow row = GridView1.FooterRow;
                        string key1 = GridView1.DataKeys[0].Value.ToString();
                        //string key2 = ((TextBox)row.FindControl("txtlegend_order")).Text;
                        string tvalue1 = ((TextBox)row.FindControl("txtmax_value")).Text;
                        string tvalue2 = ((TextBox)row.FindControl("txtmin_value")).Text;
                        //string tvalue3 = ((RadComboBox)row.FindControl("cboColor2")).SelectedItem.Value;
                        string tvalue3 = ColorTranslator.ToHtml(((RadColorPicker)row.FindControl("RadColorPicker1")).SelectedColor);
                        string tvalue4 = ((TextBox)row.FindControl("txtlegend_text")).Text;

                        string sql = "insert into mapaction_rel_legend(customer_id,technology_id,leg_identifier,max,min,clr,legtext,legend_order,mapaction_id)";
                        sql += "values(4,";
                        if (cboTechnology.SelectedIndex != 0)
                            sql += cboTechnology.SelectedItem.Value + ",'" + key1 + "',";
                        if (tvalue1 != "")
                            sql += tvalue1 + ",";
                        else
                            sql += "null,";
                        if (tvalue2 != "")
                            sql += tvalue2 + ",";
                        else
                            sql += "null,";
                        if (tvalue3 != "")
                            sql += "'" + tvalue3 + "',";
                        sql += "'" + tvalue4 + "',";
                        sql += DateTime.Now.Ticks + ",";
                        sql += RadMenu1.SelectedItem.Value + ")";
                        VxSystem.Adapter.executeNonQuery(sql);
                        fillRadgrid(RadMenu1.SelectedItem.Value);
                    }
                    catch (Exception ex)
                    {
                        VxSystem.Logger.LogObj.WriteLog(this, ex);
                    }
                }
            }*/

            protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
            {
                string mid1 = GridView1.DataKeys[0].Value.ToString();
            }

            protected void ColorBind(object sender, EventArgs e)
            {
                RadColorPicker rc = (RadColorPicker)sender;
                if (rc.CurrentColorText != "(Current Color is {0})")
                {
                    rc.SelectedColor = System.Drawing.ColorTranslator.FromHtml(rc.CurrentColorText);
                    //rc.Enabled = false;
                }
            }
        }
    }






    Regards,
    Ajit

  9. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 26 Oct 2009 Link to this post

    Hello Ajit,
    The problem comes from the following setting:
    <table width="90%" align="center">

    In order to fix it, you can add the following style to the HEAD of your page:
    <style type="text/css">
    .RadColorPicker
    {
        text-align:left;
    }
    </style>

    Kind regards,
    Tsvetie
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  10. ajit
    ajit avatar
    46 posts
    Member since:
    Jun 2009

    Posted 27 Oct 2009 Link to this post

    Hi Tsvetie,

                            Thanks a lot, it solved the problem but I wonder why the problem occurred because of the table property.

    Regards,

    Ajit
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017