Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
126 views
In my grid if I set the DataKeyName field ReadOnly to "true" so it cannot be edited when I click a row to enter edit mode I get this error,
Unhandled exception at line 885, column 13 in http://localhost:59512/ScriptResource.axd?d=j9g8KwFmyomCksH8Wgu8D921e69mOXBSgcRNM_TYTpo8fsl9bB8knaOk3eJy7i5Vsb6eNonPd3OAqh2MBYPCrNV52HuzPz2Aa-oyIrtDhXd-WOK9m-TImS6nd3inJNNp1xw6jnQGAvJnKfjurTJifqmDUI5njfi6aRYOERJTLDf7VE7Tms_H7Dr6lpjgTT2J0&t=6119e399

0x800a139e - JavaScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Value cannot be null.

Parameter name: g


If I do not set the DataKeyName field ReadOnly="true" I do not get this error, but the field is shown and editable in the edit popup.
Princy
Top achievements
Rank 2
 answered on 28 Nov 2013
0 answers
59 views
Nevermind. Its totally user error.
 
Beth
Top achievements
Rank 1
 asked on 27 Nov 2013
4 answers
109 views
I have a GridTemplateColumn that has a checkbox as a item template.
How can i update a column say "ClassNo" with a value in a textbox on a button click.
Any idea or work around
Thank you
Edd
Top achievements
Rank 1
 answered on 27 Nov 2013
2 answers
121 views
Hi,
I have a following problem. First code:
<telerik:RadPanelBar runat="server" ID="RadPanelBar2" ExpandMode="SingleExpandedItem" Width="100%">
            <Items>
                <telerik:RadPanelItem ImageUrl="~/Images/Att.png" Text="MojAtak" runat="server" Expanded="True">
                    <Items>
                        <telerik:RadPanelItem runat="server">
                            <ItemTemplate>
                                <asp:TextBox ID="ReportBox" class="text" runat="server" Style="height: 99%; width: 98%; font-size: 9px; border-style: none;" TextMode="MultiLine" onkeyup="javascript: czytaj();"></asp:TextBox>
                                <asp:TextBox ID="txtKto" runat="server" class="text" Height="14px" Style="width: 140px;" Font-Size="Small" BackColor="#CCFFFF" Font-Italic="True"></asp:TextBox>
                            </ItemTemplate>
                        </telerik:RadPanelItem>
                    </Items>
                </telerik:RadPanelItem>
 
                <telerik:RadPanelItem ImageUrl="~/Images/Cone.png" Text="Outbox" runat="server">
                    <Items>
                        <telerik:RadPanelItem runat="server">
                            <ItemTemplate>
                                <asp:TextBox ID="txtKogoS" runat="server" class="text" Height="14px" Style="width: 140px;" Font-Size="Small" ReadOnly="True" BackColor="#CCFFFF" Font-Italic="True"></asp:TextBox>
                                <asp:TextBox ID="txtDataS" runat="server" class="text" Height="14px" Style="width: 140px;" Font-Size="Small" ReadOnly="True" BackColor="#CCFFFF" Font-Italic="True"></asp:TextBox>
                            </ItemTemplate>
                        </telerik:RadPanelItem>
                    </Items>
                </telerik:RadPanelItem>
            </Items>
        </telerik:RadPanelBar>
 
        <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
            <script type="text/javascript">
                var ReportBox = '<%=((TextBox)RadPanelBar2.Items[0].Items[0].FindControl("ReportBox")).ClientID%>';
                var KtoBox = '<%=((TextBox)RadPanelBar2.Items[0].Items[0].FindControl("txtKto")).ClientID%>';
                function czytaj() {
 
                    alert($get(ReportBox).value);
 
                    var raport = $get(ReportBox).value;
                    if (raport.search("ygraÅ‚") > 0 || raport.search("z walki:") > 0 || raport.search("Remis") >= 0) {
                        alert("Kto");
                        //kto
                        var k1 = raport.indexOf("w.", 0);
                        var wynikS = raport.substring(k1 + 3);
                        var k2 = wynikS.indexOf("otrzyma", 0);
                        var kto = wynikS.substring(0, k2 - 1);
                        alert(kto);
                        alert(KtoBox);
 
                    } else {
                        alert("!!!!");
                    }
                }
            </script>
        </telerik:RadScriptBlock>

onkeyup - I can access whatever user entered in the ‘ReportBox’ but I can’t update ‘txtKto’.

If anyone have any suggestion please go ahead. Oh and please keep in mind I'm a rookie.

Thank you

John
Top achievements
Rank 1
 answered on 27 Nov 2013
1 answer
49 views
Hello Support,

We have been using Rad Async upload control for file uploading in ASP.NET Web application for one of our clients. Rad Async upload control works fine for Chrome, Firefox and IE10. But with IE9 or below a strange javascript error is encountered saying

"DOM Script bridge is disabled".


This happens while uploading the file to the server. Can you please guide me through this issue?


Thanks
Dimitar Terziev
Telerik team
 answered on 27 Nov 2013
2 answers
120 views
The load on demand for the combobox is not working once I move the page to the shared host. It works fine while testing it in Visual Studio.
Up on the shared host, when I click on the combobox, it drops down showing the items in the box. But, as soon as I type a single letter, the "Loading..." message appears and it just sits there. Even if I type the first letter of the first item in the box, it will show the loading message and then do nothing.

I tried both loading from server side, and also by setting the EnableAutomaticLoadOnDemand="true". The latter doesn't even load the list.

This will at least display the list:

<telerik:RadComboBox ID="CustomerSearch" runat="server" Width="180" Height="160"
    MarkFirstMatch="true"  AllowCustomText="true" CssClass="CustomerSearch"
    EnableLoadOnDemand="true" EnableVirtualScrolling="true" OnItemsRequested="CustomerSearch_ItemsRequested"
     OnClientSelectedIndexChanged="searchnav" EmptyMessage="Select a customer" DataSourceID="dsCustomer" DataTextField="CustomerName"
    DataValueField="NavPath" BackColor="White" Skin="Forest" />
  
<asp:SqlDataSource ID="dsCustomer" runat="server"
    SelectCommand="CustomerSearchName" SelectCommandType="StoredProcedure">
</asp:SqlDataSource>
 
 
<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
    <script type="text/javascript">
        function searchnav(sender, args) {
            var iframe = document.getElementById('ctl00_iMainPages');
            iframe.src = sender.get_value();
        }
 
    </script>
</telerik:RadScriptBlock>


This is the code-behind:

Protected Sub CustomerSearch_ItemsRequested(sender As Object, e As RadComboBoxItemsRequestedEventArgs)
    Dim dal As New Customer
 
    Dim data As DataTable = dal.CustomerSearchName(Session("StoreID"), e.Text).Tables(0)
 
    Dim itemOffset As Integer = e.NumberOfItems
    Dim endOffset As Integer = Math.Min(itemOffset + 10, data.Rows.Count)
    e.EndOfItems = endOffset = data.Rows.Count
 
    For i As Integer = itemOffset To endOffset - 1
        CustomerSearch.Items.Add(New RadComboBoxItem(data.Rows(i)("CustomerName").ToString(), data.Rows(i)("NavPath").ToString()))
    Next
 
    e.Message = GetStatusMessage(endOffset, data.Rows.Count)
End Sub
Private Shared Function GetStatusMessage(ByVal offset As Integer, ByVal total As Integer) As String
    If total <= 0 Then
        Return "No matches"
    End If
 
    Return [String].Format("Items <b>1</b>-<b>{0}</b> out of <b>{1}</b>", offset, total)
End Function
Steve
Top achievements
Rank 1
 answered on 27 Nov 2013
19 answers
924 views
Is it possible using RadFileExplorer to customize the upload window with controls to specify additional fields (i.e. description) to be passed to StoreFile(...)? The last parameter of this method is a string array called "arguments", which I assume is for this purpose.
G
Top achievements
Rank 1
 answered on 27 Nov 2013
3 answers
363 views
I have a user control with some RadTextboxes, RadNumericTextboxes, RadComboBoxes. I have this usercontrol on an aspx page which has the RadAjaxManager. I have a requirement to maintain if the controls in the usercontrol have changes, so, I have set the AutoPostBack property to true and on postback, I set ViewState["NameIsDirty"]=true; But my problem is, when the user updates the Name and clicks on tab, the cursor goes to the next control and immediately disappears! Seems like it is getting focussed on the first control on the page. If I dont have the AutoPostBack property set to true, the focus is on the next control and everything is fine. How do I make the focus stay on the control on which it is supposed to be. I searched the forums and tried a few solutions, but they did not work.
I have tried this and it doesnt work:
protected void rdtCCno_TextChanged(object sender, EventArgs e)
    {
        ViewState["NumberIsDirty"] = true;
        string script =string.Format(@"window.setTimeOut(function(){{$find('{0}').Focus();}},10);",rdtCvv2.ClientID);
        ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "mykey", script,true);
        
    }
    protected void rdcExpMonth_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
    {
        ViewState["ExpMonthIsDirty"] = true;
        var rdAjaxManager = RadAjaxManager.GetCurrent(this.Page);
        if (rdAjaxManager != null)
        {
            rdAjaxManager.FocusControl(rdtAddr1);
        }
    }
Viktor Tachev
Telerik team
 answered on 27 Nov 2013
1 answer
90 views

Hi, 

I've got below error on tring RadFileExplorer with this demo. the error details as below.

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: The base class includes the field 'RadScriptManager1', but its type (Telerik.Web.UI.RadScriptManager) is not compatible with the type of control (Telerik.Web.UI.RadScriptManager).


My Project details:
Target Framework: .net Framework 3.5
version of Telerik.Web.UI.dll : 2013.1111.35
Version of System.Web.Extensions : 3.5.0.0

Please kindly advise what should i do? 

Regards

Kate
Telerik team
 answered on 27 Nov 2013
1 answer
152 views
I am trying to create an ASP.NET page to allow basic CRUD operations using Entity Framework. Using Telerik's RadListView, I have the following HTML:
<telerik:RadListView ID="RadListView1" runat="server" OnNeedDataSource="RadListView1_NeedDataSource">
<ItemTemplate>
    <table>
        <tr>
            <td>First Name: 
                <%#Eval("FirstName")%>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Button ID="btnEdit" runat="server" Text="Edit" CommandName="Edit" Width="70px"></asp:Button>
            </td>
        </tr>
    </table>
</ItemTemplate>
<EditItemTemplate>
    <table>
        <tr>
            <td>First Name:
                <asp:TextBox ID="txtFirstName" runat="server" Text='<%#Bind("FirstName")%>'></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Button ID="btnUpdate" runat="server" Text="Update" CommandName="Update" Width="70px"></asp:Button>
            </td>
        </tr>
    </table>
</EditItemTemplate>

And here is the code behind:

protected void Page_Load(object sender, EventArgs e)
{
    if (!Page.IsPostBack)
    {
         RadListView1.DataSource = GetData();
    }
}
 
protected void RadListView1_NeedDataSource(object sender, Telerik.Web.UI.RadListViewNeedDataSourceEventArgs e)
{
    RadListView1.DataSource = GetData();
}
 
private List<Person> GetData()
{
    using (BuildingAccessEntities ctx = new BuildingAccessEntities())
    {
        var query = from a in ctx.People
                    orderby a.FirstName
                    select a;
 
        return query.ToList();
    }
}

So far, this code properly displays the populated RadListView. When I click the Edit button, the RadListView switches to Edit mode and allows me to Edit the selected record; however, when I click the Update button to save the record, the changes are not saved.

I have not yet tried to see if inserts and deletes behave this same way.

I'm sure 2-way binding should be something very simple with the RadListView, but I am new to this and have not been able to find many examples to make this work other than by using data source controls (SqlDataSource, EntityDataSource, etc.).

Any assistance will be greatly appreciated!


Konstantin Dikov
Telerik team
 answered on 27 Nov 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?