Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
100 views
We just went through a pretty large codebase migration, and biggest issue we're having is with our RadGrid's AJAX (paging, dragging and dropping cells, etc.). Any attempt by the grid to use AJAX results in this error:

Sys.WebForms.PageRequestManagerParserErrorException: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled. Details: Error parsing near ' <!DOCTYPE html P'.

Now, I know there's a vast array of reasons for this error to appear, but after trying dozens of fixes I'm hoping to get some assistance narrowing it down to the right one. It seems to me that the error is related to the fact that the server is responding to the AJAX POST request with the entire page (beginning with the DOCTYPE declaration you see above), instead of properly responding with just the grid's updated HTML. Is there any obvious reason for this to occur? Are we missing some sort of configuration option that makes sure the AJAX response only contains the updated HTML that's needed?

Thanks, any assistance would be greatly appreciated.
Andrey
Telerik team
 answered on 30 Jul 2013
1 answer
255 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
75 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
213 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
305 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
127 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
177 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
37 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
84 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
153 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?