Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
252 views
Hi,

Is it possible to have bullet symbol as the DisplayMask setting value, so that the masking shows bullet "." symbol instead of masking special character ?

Right now am using "X" as the masking value, by setting RadNumericTextBox.DisplayMask = "XXXX". I tried putting ASCII name for bullet symbol but that didn't work.

Thanks,
Stalin
Shinu
Top achievements
Rank 2
 answered on 30 Jul 2013
1 answer
74 views
Hello

When I accessed my web form in chrome, all the radinputs has a yellow border. I havnt applied any border color and how can I remove this?

Thanks
Dan
Shinu
Top achievements
Rank 2
 answered on 30 Jul 2013
4 answers
208 views

hello 
I have used RadTextbox for which I have applied following css, But the css does not apply to RadTextbox
please help me to solve this problem
waiting for reply
Thanks
Kishor 

<style type="text/css">

      .Radtext

    {

         font-size:12px;

         font-family:Arial, Helvetica, sans-serif;

    }

</style>


<telerik:RadTextBox ID="txtCustomerNo" runat="server"   CssClass ="Radtext"  Skin="Windows7"  >

</telerik:RadTextBox>

Kishor
Top achievements
Rank 2
 answered on 30 Jul 2013
6 answers
300 views
Hi, I have a web page that inside it has a user control where I put RadSiteMap. This user control charge inside another user control that has a radmenu dynamically loaded from sqldatasource.
In the page load event of the user control where I put RadSiteMap I included this
         Try
             Dim UC_text As UserControl = DirectCast (Me.FindControl ("MenuOr1"), UserControl)
             Dim RMenu As RadMenu = CType (UC_text.FindControl ("RadMenu1"), RadMenu)
             Dim CurrentItem As RadMenuItem = RMenu.FindItemByUrl (Request.Url.PathAndQuery)
             If CurrentItem IsNot Nothing Then
                 'Select the current item and his parents
                 currentItem.HighlightPath ()
                 'Update the title of the
                 PageTitleLiteral.Text = currentItem.Text
                 'Populate the breadcrumb
                 DataBindBreadCrumbSiteMap (CurrentItem)
             else
                 RMenu.Items (0). HighlightPath ()
             end If

         Catch ex As Exception

         end Try

As this function Dim CurrentItem RadMenuItem = RMenu.FindItemByUrl (Request.Url.PathAndQuery)

no value.
Can you help?
thanks
Salve!-interiezione
Hello!
Salve!, Ciao!, Pronto?, Pronto!, Piacere!
Hi!
Ciao!, Salve!, Piacere!
Hail!
Salve!, Salute!
Cheers!
Evviva!, Salve!, Cincin!
Hallo!
Ciao!, Salve!, Pronto!
Would you mind answering some questions to help improve translation quality?
Trascina e rilascia il file o il link qui per tradurre il documento o la pagina web.
Trascina e rilascia il link qui per tradurre la pagina web.
Il tipo di file che rilasci non è supportato. Prova altri tipi di file.
Il tipo di link che rilasci non è supportato. Prova altri tipi di link.
Boyan Dimitrov
Telerik team
 answered on 30 Jul 2013
3 answers
117 views
Hello,

i was wondering how can i can access the username of the user who inserted the appointment and perform validation whether that same user is trying to edit or delete the appointment? by means of popup or how? can you please show me. 
Thank you. 

Here is the code: 
<telerik:RadScheduler ID="RadScheduler1" runat="server" OnAppointmentInsert="RadScheduler1_AppointmentInsert" OnClientAppointmentEditing="ClientAppointmentEditing" OnClientAppointmentDeleting="ClientAppointmentDeleting" >
           ....
</telerik:RadScheduler>
 
protected void RadScheduler1_AppointmentInsert(object sender, AppointmentInsertEventArgs e)
   {
       //here you add the username as attribute
       e.Appointment.Attributes.Add("Nick", "Kapanadze");
   }
 
function ClientAppointmentEditing(sender, args) {
    var appointment = args.get_appointment();
    if (appointment.get_attributes().getAttribute("Nick") != "Kapanadze") {
        args.set_cancel(true);
    }
      
}
  
function ClientAppointmentDeleting(sender, args) {
    var appointment = args.get_appointment();
    if (appointment.get_attributes().getAttribute("Nick") != "Kapanadze") {
        args.set_cancel(true);
    }
}
Plamen
Telerik team
 answered on 30 Jul 2013
1 answer
173 views
I have a problem, I would like to change the font color dynamically:

<telerik:RadSiteMap ID="BreadCrumbSiteMap" runat="server" DataTextField="Text"

DataNavigateUrlField="NavigateUrl">

<DefaultLevelSettings ListLayout-RepeatDirection="Horizontal" SeparatorText="/" Layout="Flow" />

</telerik:RadSiteMap >

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

     BreadCrumbSiteMap.Style.Add("color", "#000000")
End Sub

 not  Work
how can I do?
Kate
Telerik team
 answered on 30 Jul 2013
2 answers
36 views
Hello Everyone,

Has anyone here ever successfully implement the scenario I stated above? I have tried several ways accomplish this starting from using the grid's OnPreRender Event to intercept values down to the more conventional FilterExpression method. Unfortunately Telerik has been extremely rigid in this area. I've scoured (practically) all over the web to find viable solution for this to no avail. It seems that telerik control do have some dead ends.
Bernard
Top achievements
Rank 2
 answered on 30 Jul 2013
1 answer
82 views

I am dynamically creating a Grid in Page_Init. I have set Edit Mode to equal Batch.  When the user hits the save changes button, I display a window which allows the user to capture some additional data and which point the user can save the changes or cancel. This part of my program works fine.  My problem occurs when I want to refresh the Grid after the user has applied the changes and closed the window.  I have tried adding the following javascript and code to my program which I execute it when the window closes. Works fine but the Grid does not refresh.

 

              function refreshGrid(arg) {

                  if (!arg) {

                      $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");

                  }

                  else {

                      $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("RebindAndNavigate");

                  }

              }

    protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)

    {

        if (e.Argument == "Rebind")

        {

            RadGrid1.Rebind();

        }

        else if (e.Argument == "RebindAndNavigate")

        {

            DirectoryRefresh();

        }

    }

    void grid_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)

    {

        RadGrid grid = (RadGrid)sender;

        if (SessionManager.GetCache().MarketChannels != null)

        {

            grid.DataSource = SessionManager.GetCache().MarketChannels;

        }

    }

    protected void DirectoryRefresh()

    {

        SessionManager.SetChangedValues(null);

        MarketDirectory directory = SessionManager.GetCurrentMarketDirectory();

        directory = null;

        LoadMarketChannelTable();

        //RadGrid1.DataSource = SessionManager.GetCache().MarketChannels;

        RadGrid1.Rebind();

    }

 

 

  I assumed that this was because my grid was not a control in the AjaxManager to update. Because I create my Grid in the program, I added my Grid to the Ajaxmanager in the PageLoad.  When I do this, the script I use to pop the window when the user hits the Save Changes Button does not execute. See highlighted code.

 

   protected void Page_Init(object sender, System.EventArgs e)

    {

        PopulateGridOnPageInit();

    }

    protected void Page_Load(object sender, EventArgs e)

    {

        RadGrid1 = (RadGrid)PlaceHolder1.FindControl("grdMarkets");

        RadAjaxManager1.AjaxSettings.AddAjaxSetting(RadAjaxManager1, RadGrid1);

        RadAjaxManager1.AjaxSettings.AddAjaxSetting(RadGrid1, RadGrid1);

    }

    protected void PopulateGridOnPageInit()

    {

        RadGrid grid = new RadGrid();

        //grid.ClientIDMode = System.Web.UI.ClientIDMode.Static;

        RadGrid1 = grid;

        string selectedValue = Master.Request.Form.Get(RadComboBox1.ClientID.Replace('_', '$'));

        grid.ID = "grdMarkets";

        grid.Width = Unit.Percentage(100);

        grid.AllowSorting = true;

        grid.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric;

        grid.AllowPaging = true;

        grid.Skin = "Web20";

        grid.MasterTableView.AutoGenerateColumns = false;

        grid.MasterTableView.EnableColumnsViewState = false;

        grid.MasterTableView.EditMode = GridEditMode.Batch;

        grid.MasterTableView.CommandItemTemplate = new MyCommandItemTemplate("gridCommands");

        grid.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top;

        grid.MasterTableView.CommandItemSettings.ShowCancelChangesButton = true;

      

        grid.MasterTableView.DataKeyNames = new string[] { "Id" };

        grid.MasterTableView.CommandItemSettings.ShowSaveChangesButton = true;

        grid.MasterTableView.BatchEditingSettings.EditType = GridBatchEditingType.Cell;

        grid.NeedDataSource += new GridNeedDataSourceEventHandler(grid_NeedDataSource);

        grid.BatchEditCommand += new GridBatchEditEventHandler(grid_BatchEditCommand);

        grid.AllowFilteringByColumn = true;

        if (selectedValue != null)

        {

            if ((SessionManager.GetCurrentMarket() == null) ||

                (selectedValue != SessionManager.GetCurrentMarket().Name))

            {

                SessionManager.SetCurrentMarket(selectedValue);

                hdMarket.Value = selectedValue;

                LoadMarketChannelTable();

            }

            DataTable dt = SessionManager.GetCache().MarketChannels;

            foreach (DataColumn dc in dt.Columns)

            {

                if (dc.ColumnName == "group")

                {

                    GridTemplateColumn boundColumn = new GridTemplateColumn();

                    boundColumn.ItemTemplate = new LabelTemplate(dc.ColumnName);

                    boundColumn.EditItemTemplate = new ComboBoxTemplate(dc.ColumnName);

                    boundColumn.DataType = dc.DataType;

                    boundColumn.HeaderText = dc.ColumnName;

                    boundColumn.SortExpression = dc.ColumnName;

                    boundColumn.DataField = dc.ColumnName;

                    grid.MasterTableView.Columns.Add(boundColumn);

                }

                else

                {

                    if (dc.DataType == typeof(bool))

                    {

                        GridCheckBoxColumn boundColumn = new GridCheckBoxColumn();

                        boundColumn.DataType = dc.DataType;

                        boundColumn.HeaderText = dc.ColumnName;

                        boundColumn.DataField = dc.ColumnName;

                        grid.MasterTableView.Columns.Add(boundColumn);

                        if ((dc.ColumnName == "id") || (dc.ColumnName == "channelID"))

                        {

                            boundColumn.Visible = false;

                        }

                    }

                    else

                    {

                        GridBoundColumn boundColumn = new GridBoundColumn();

                        boundColumn.DataType = dc.DataType;

                        boundColumn.HeaderText = dc.ColumnName;

                        boundColumn.DataField = dc.ColumnName;

                        grid.MasterTableView.Columns.Add(boundColumn);

                        if ((dc.ColumnName == "id") || (dc.ColumnName == "channelID"))

                        {

                            boundColumn.Visible = false;

                        }

                    }

                }

            }

           

 

        }

        PlaceHolder1.Controls.Add(grid);

        string script = "<script language='javascript' type='text/javascript'>function SaveChangesInGrid(sender, args) { " +

                "var grid = $find('" + grid.ClientID + "'); " +

                    "grid.get_batchEditingManager().saveChanges(grid.get_masterTableView());" +

                    "}</script>";

        ClientScript.RegisterStartupScript(this.GetType(), "SaveChanges", script);

    }

    void grid_BatchEditCommand(object sender, GridBatchEditingEventArgs e)

    {

       List<string> changedValues = new List<string>();

       SessionManager.SetChangedValues(null);

       DataTable dt = SessionManager.GetCache().MarketChannels;

       bool updateNeeded = false;

        foreach(GridBatchEditingCommand cmd in e.Commands)

        {

             if(cmd.Type == GridBatchEditingCommandType.Update)

             {

                // int editRowIdx = Int32.Parse(e.Item.ItemIndexHierarchical);

                 foreach(string columnName in cmd.NewValues.Keys)

                 {

                     int key = Convert.ToInt32(cmd.Item.GetDataKeyValue("Id"));

                     DataRow row = dt.Rows.Find(key);

                    

                     if((cmd.NewValues[columnName] != null) && (cmd.NewValues[columnName].ToString().Trim() != row[columnName].ToString().Trim()))

                     {

                         changedValues.Add(row["channelID"].ToString() + ";"  + columnName + ";" + cmd.NewValues[columnName].ToString());

                         row[columnName] = cmd.NewValues[columnName];

                         updateNeeded = true;

                        

                     }

                 }

             }

        }

        if (updateNeeded)

        {

            SessionManager.SetChangedValues(changedValues);

           string script = "<script language='javascript' type='text/javascript'>Sys.Application.add_load(showBatchChangeWindow);</script>";  // Doesn’t execute

            ClientScript.RegisterStartupScript(this.GetType(), "showWindow", script);

   

        }

    }

 

 

Any help would be appreciated.

 

Thanks!

 

Jayesh Goyani
Top achievements
Rank 2
 answered on 30 Jul 2013
2 answers
148 views
Hello to all,

My customer wants in timeline-view a change of background color behind die Group-Headers (at the left side of the Scheduler).
In the attached picture its the area which the arrows on top and bottom.

The resourcetype depends to a SqlDatasource and my idea was a own field in this SqlDataSource with die color-value as Integer.

Is this possible?
I'm writing in VB.

I've just implemented coloring of appointments based on values of a SqldataSource.

Thank to all!
Jürgen
Jürgen
Top achievements
Rank 1
 answered on 30 Jul 2013
3 answers
419 views
Hi All,

 I have an issue here . I have a datatable as datasource for a radgrid. I have faced issue with the border for the radgrid as some cell borders are not displayed. Refer 1.jpg file i have attached
 
I have changed my SQL query to handle the Null case.
SELECT
.....ISNULL
(KP.dbo.PH.qc,'') as qc,ISNULL(KP.dbo.PH.di,' ') as di
.....
.....
FROM KP.dbo.PH

But for my surprise when i remove the alias name cell border is coming up. But i need the alias name, since by adding ISNULL check the column header will go blank.


<telerik:RadGrid ID="RadGridInspection" CssClass="RadGridCustomClass" AllowSorting="false" AllowPaging="true" AllowFilteringByColumn="false"
                                                AutoGenerateColumns="false" runat="server" ClientSettings-EnableAlternatingItems="False" AlternatingItemStyle-BorderStyle="Solid" BorderStyle="Solid" EditItemStyle-BorderStyle="Solid" ItemStyle-BorderStyle="Solid">
                                                     <MasterTableView AutoGenerateColumns="False" >
                                                        <Columns >
                                                           <telerik:GridBoundColumn DataField="di" UniqueName ="di" HeaderText="DI"  ItemStyle-BorderColor="Gray" ItemStyle-BorderStyle="Solid">
                                                            </telerik:GridBoundColumn>
                                                            <telerik:GridBoundColumn DataField="ai" UniqueName ="ai" HeaderText="AI"  ItemStyle-BorderColor="Gray" ItemStyle-BorderStyle="Solid">
                                                            </telerik:GridBoundColumn>
                                                            <telerik:GridBoundColumn DataField="qc" UniqueName ="qc" HeaderText="QC"  ItemStyle-BorderColor="Gray" ItemStyle-BorderStyle="Solid">
                                                            </telerik:GridBoundColumn>
</Columns>
                                                    </MasterTableView>
                                                </telerik:RadGrid>
 

EVEN i have used prerender code in codebehind to handle if there is any blank cells.

Protected Sub RadGridInspection_PreRender(sender As Object, e As EventArgs) Handles RadGridInspection.PreRender
        For Each dataItem As GridDataItem In RadGridInspection.Items
            For Each col As GridColumn In RadGridInspection.Columns
                'If dataItem(col.UniqueName).Text = String.Empty Then
                If String.IsNullOrEmpty(dataItem(col.UniqueName).Text) Or dataItem(col.UniqueName).Text = " " Then
                    dataItem(col.UniqueName).Text = " "
                End If
            Next
        Next
    End Sub


Kindly let me know how to handle this scenario..

Thanks in advance



Suresh Krishna
Top achievements
Rank 1
 answered on 30 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?