Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
166 views

It's as the title says.  I can't figure out what is causing this to occur.  The page in question has minimal changes made the past month, and these revolve around the addition of a new lookup control (based on RadComboBox) and some internal system logic unrelated to UI.  My understanding is that if ViewState is enabled on the control, then PageIndexChanged should fire before NeedDataSource, but it does not.

 

The end result is paging on a grid that worked a month ago no longer works.  It continues to load the first 15 records every time the page is changed.

 

Any thoughts?  I'm sorry, I can't provide code, because this issue isn't from a simple solution.  I'm mainly looking for ideas on how to debug/correct this that I haven't thought of.

Eyup
Telerik team
 answered on 11 Jul 2017
0 answers
109 views

I have a problem when i try to load my data after choosing one item from my features list, i'm using Ajax and my Jsonresult is fine, after a few debugging tests, but how can i tell the grid to load my data correctly, i'm using code instead of the filter Junction.
Here is my Controller :
public JsonResult OptionData(Features Option)
        {
            try
            {
                List<Data> ls = new List<Data> { };
                foreach (var item in db.Data.ToList())
                {
                    if (item.Feature_ID== Option.Feature_ID)
                        ls.Add(item);                
                }
                return new JsonResult()
                {
                    Data = ls,
                    MaxJsonLength = Int32.MaxValue,
                    JsonRequestBehavior = JsonRequestBehavior.AllowGet
                };
                
            }
            catch (Exception e)
            {
                return Json(e.Message);
            }
        }

And my Dropdown List in View 

var dropdown = grid.find("#Feature).kendoDropDownList({
               dataTextField: "Feature_Name",
               dataValueField: "Feature_ID",
               autoBind: false,
               optionLabel: "All",
               dataSource: Shared_Data,           
               change: function () {
                   var value = this.value();
                   if (value) {
                       Selected_Data = value;
                           $.ajax({
                               data: {"Feature_ID":Selected_Data },
                               url: "/KhachHang/DanhSachKhachTheoLoai",
                               type: "GET",
                               dataType: "json",
                               success: function()
                               {
                                   
                               }
                           });
                     
                      
                   } else {
                       Selected_Data = value;
                       grid.data("kendoGrid").dataSource.filter({});
                   }
               }

Redfield
Top achievements
Rank 1
 asked on 11 Jul 2017
2 answers
119 views

Hi,

In the Week View, I can't resize the appointments that are All-day. Is it possible to get this functionality somehow?

This can be seen in your demo:
http://demos.telerik.com/aspnet-ajax/scheduler/examples/overview/defaultvb.aspx

The all-day appointments can be resized in the month view, but not in the week-view!

Regards
Andreas

Andreas
Top achievements
Rank 1
 answered on 10 Jul 2017
2 answers
131 views

Hi,

I have 2 listbox controls on my web page.  I have one on the left that is populated from a SQL table in my database.  I can then select one or more row from the left listbox and then click the right-arrow button to move the row to the right-side listbox.  But I do not want to allow the right-side listbox items to be moved to the left-side listbox.  So I want to know if there is a way to not display the left arrow button when items are selected on the right-side listbox.  

Thanks in advance!

Here is the code for each listbox:

<telerik:RadListBox ID="lstAvailable"
    runat="server"
Width="270px"
Height="200px"
SelectionMode="Multiple"
AllowTransfer="true"
TransferToID="lstMapped"
ButtonSettings-AreaWidth="40px"
AutoPostBackOnTransfer="true"
DataTextField="ReportName"
DataValueField="ReportID"
OnTransferring="lstAvailable_Transferring">
</telerik:RadListBox>
                        <telerik:RadListBox ID="lstMapped"
runat="server"
Width="270px"
Height="200px"
SelectionMode="Multiple"
AllowDelete="true"
AllowReorder="true"
AllowTranfer="false"
ButtonSettings-AreaWidth="40px"
AutoPostBackOnTransfer="false"
DataTextField="ReportName"
DataValueField="ReportID"
OnDeleting="lstMapped_Deleting">
                        </telerik:RadListBox>

Bob
Top achievements
Rank 1
 answered on 10 Jul 2017
7 answers
651 views
Hi everyone,


I have a very stupid question. How do you delete a record in a grid and also delete this record from the database. I read a lots of examples, but they only delete the item from the grid. I read a interesting example where they were using a SessionDataSource, but my IDE (visual studio with Telerik, of course) didn't recognize the tag. I was thinking about simply had a column with the primary key and take the primary key to make a delete statement, but I don't want to show my primary key (cause it is a guid and it's not really pretty to show). So, is to possible to have a hidden column in a grid. If yes, just tell me how and my problem is solved. 


Thank you in advance for your answer.  


David
iqra
Top achievements
Rank 1
 answered on 10 Jul 2017
2 answers
164 views

Hello,

I am working with a RadTreeView using a node template. It is databound against a datatable.

<TELERIK:RadTreeView ID="tvOrgChart" runat="server"
    DataValueField="staffmemberid" DataTextField="title" DataFieldID="staffmemberid" DataFieldParentID="supervisor">
    <NodeTemplate>
        <strong><%# Eval("casualname") %>,</strong> <em><%# Eval("title") %></em> <small>[<%# Eval("staffclassname") %>]</small>
    </NodeTemplate>
</TELERIK:RadTreeView>

 

My initial question was supposed to be how can I enable editing on this tree so that only the "title" attribute is edited. It turns out that by adding DataTextField="title", that this functionality is built in!! Pretty cool!

But I do have a problem. When the edit is complete, the node still displays the original text of the template, without any of the updates to the title field. There is a great Outlook-like example showing how to implement ClientNodeEditStart and ClientNodeEdited to restore a message counter after a rename.I attempted to use this pattern.

I want to get the original displayed text, save it, and, after the edit, replace the old title with the new title. Here is the problem... in the ClientNodeEditStart event, the .get_text() does not actually return the text that is displayed on the node! With DataTextField defined, it returns the value of the specified column. Without a text value defined, it returns "System.Data.DataRowView".

How can I get the HTML that is displayed by the node??

Joel

Joel Kraft
Top achievements
Rank 2
 answered on 07 Jul 2017
1 answer
131 views
I'm working on an asp.net project where i have a master page and content pages. Im getting an exception message when i place a timer on one of the content page which is ticking at a certain interval and rebinding the grid using rebind method. I have got  a RadScripManager placed on my master page. Im also using radajaxmanager for the timer.
Im using latest 2017 telerik controls and browser is IE version 11. i have tested my code with chrome and Firefox and no exception is occurring with the browsers,.
When i get an exception my page is zoom in automatically. Can you please guide me. Details of an exception is below

Unhandled exception at line 17198, column 28 in http://localhost:60682/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=;;System.Web.Extensions,+Version=4.0.0.0,+Culture=neutral,+PublicKeyToken=31bf3856ad364e35:en-US:b59ca51d-6c90-4be1-88fb-6dda83097045:ea597d4b:b25378d2:76254418;Telerik.Web.UI,+Version=2016.2.607.45,+Culture=neutral,+PublicKeyToken=121fae78165ba3d4:en-US:fb63f838-b932-4810-8e72-f1ca43eff960:16e4e7cd:f7645509:33715776:7c926187:8674cba1:88144a7a:b7778d6c:c08e9f8a:59462f1:a51ee93e:58366029:24ee1bba:f46195d3:ed16cbdc

0x80070057 - JavaScript runtime error: Invalid argument.

The line where im getting an exception 
Telerik.Web.UI.RadAjaxControl.prototype.updateHeadStyles [Telerik.Web.UI.WebResource.axd] Line 17198 Script
and exception line is 
}if(e[c].indexOf("{")!=-1){f.insertRule(e[c]+"}",f.cssRules.length);
Vessy
Telerik team
 answered on 07 Jul 2017
1 answer
272 views

I'm working on an asp.net project where i have a master page and content pages. Im getting an exception message when i place a timer on one of the content page which is ticking at a certain interval and rebinding the grid using rebind method. I have got  a RadScripManager placed on my master page. Im also using radajaxmanager for the timer.

Im using latest 2017 telerik controls and browser is IE version 11. i have tested my code with chrome and Firefox and no exception is occurring with the browsers,.

When i get an exception my page is zoom in automatically. Can you please guide me. Details of an exception is below

 

Unhandled exception at line 17198, column 28 in http://localhost:60682/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=;;System.Web.Extensions,+Version=4.0.0.0,+Culture=neutral,+PublicKeyToken=31bf3856ad364e35:en-US:b59ca51d-6c90-4be1-88fb-6dda83097045:ea597d4b:b25378d2:76254418;Telerik.Web.UI,+Version=2016.2.607.45,+Culture=neutral,+PublicKeyToken=121fae78165ba3d4:en-US:fb63f838-b932-4810-8e72-f1ca43eff960:16e4e7cd:f7645509:33715776:7c926187:8674cba1:88144a7a:b7778d6c:c08e9f8a:59462f1:a51ee93e:58366029:24ee1bba:f46195d3:ed16cbdc

0x80070057 - JavaScript runtime error: Invalid argument.

 

The line where im getting an exception 

Telerik.Web.UI.RadAjaxControl.prototype.updateHeadStyles [Telerik.Web.UI.WebResource.axd] Line 17198 Script

and exception line is 

}if(e[c].indexOf("{")!=-1){f.insertRule(e[c]+"}",f.cssRules.length);

 

Vessy
Telerik team
 answered on 07 Jul 2017
0 answers
127 views

I have attached a sample layout of a scheduler that i want to show the status change line and summary based on a SQL database table.

On the top is the timeline for one day.

left side are 4 status.

right side shows the summary for each status of on day.

The status change line is in  the center of this chart.

 

If Telerik scheduler can do it , or other controller which may able to do it?

 

Thanks,

Steve

Steve
Top achievements
Rank 1
 asked on 07 Jul 2017
5 answers
107 views
In order to create a new Local Resource file (RESX), I navigate to the Designer, and use the Tools --> Generate Local Resource option.  

The problem is that many of my telerik tags are getting rewritten during this process.  Is there a way to stop this?  

No standard ASP controls demonstrate this behavior - so I am wonder if this is something on the Telerik side?  

We do not use the designer view - except for this purpose - and I understand that it may just be inserting default attributes and tags that we did not write - but this adds to our code, and sometimes messes things up.

Is there a way to disable this - or a workaround?

For example, this:

<telerik:RadTextBox runat="server" ID="tCurrentAgency"  Width="200px" ReadOnly="True" SkinID="defaultText">
</telerik:RadTextBox>

becomes this:

<telerik:RadTextBox runat="server" ID="tCurrentAgency"
    Width="200px" ReadOnly="True" SkinID="defaultText" LabelCssClass="" LabelWidth="64px" meta:resourcekey="tCurrentAgencyResource1" Resize="None">
    <EmptyMessageStyle Resize="None" />
    <ReadOnlyStyle Resize="None" />
    <FocusedStyle Resize="None" />
    <DisabledStyle Resize="None" />
    <InvalidStyle Resize="None" />
    <HoveredStyle Resize="None" />
    <EnabledStyle Resize="None" />
</telerik:RadTextBox>


Ian
Top achievements
Rank 1
 answered on 06 Jul 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?