Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
162 views
Hello Expert Team,

I am developing a web application using c# ,asp.net,telerik and sqlserver 2008.

Actually i have developed a ​text file , in this text file (.txt) data is comming from database.

Now problem is that how to bind this text file to our xtrareport​, means finally i want to display this text file in xtrareport .

Is there any control to bind our text file to xtrareport or any telerik control ?

Please help me.
Slav
Telerik team
 answered on 24 Jan 2013
4 answers
198 views
Hi,

I have a RadGrid in my ASP.Net web form.
Now i want to bind this on client-side through a AjaxEnabledWCFService.
After all the implementations done it seems the data is being retrieved through the response
but rather than showing it in the grid it shows an message like "Method not allowed.".

I could not able to find the actual reason behind this error, and what is the cause for dat not being populated.

Here are the details of my implementations :-
I have added the particular service to the Script manager like below :-

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
         <Services>
                <asp:ServiceReference Path="~/services/CustomerListService.svc" />
         </Services>
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>


Then added the service to the RadGrid ClientEvents - DataBindings tag like below :-

 
<DataBinding SelectMethod="GetCustomers" Location="~/services/CustomerListService.svc"
                     SortParameterType="Linq" FilterParameterType="Linq">
                </DataBinding>


I have a service named CustomerListService with DataContract as order,
ServiceContract as GetCustomers() as below codes :-

Ex:

   
[ServiceContract(Namespace = "")]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public class CustomerListService
    {
         
        [OperationContract]
        public List<Customer> GetCustomers()
        {
            CustomerData CustData = new CustomerData();
            System.Data.DataTable dt = CustData.GetCustomersList(1, 1, "");
 
            List<Customer> Customerist = new List<Customer>();//Here Customer is DataContract
            foreach (System.Data.DataRow dr in dt.Rows)
            {
                Customer cust = new Customer();
                SetPropertiesFromOrderRow(cust, dr);//set all the property values from DataRow to Order
                CustomerList.Add(cust);
            }
 
            return CustomerList;
        }
    }


The settings in the configuration file are like below :-  

<endpointBehaviors>
   <behavior name="ClientSideBindingTest.services.CustomerListServiceAspNetAjaxBehavior">
    <enableWebScript />
   </behavior>
  </endpointBehaviors>
 
 <services>
  <service name="ClientSideBindingTest.services.CustomerListService">
   <endpoint address="" behaviorConfiguration="ClientSideBindingTest.services.CustomerListServiceAspNetAjaxBehavior"
    binding="webHttpBinding" contract="ClientSideBindingTest.services.CustomerListService" />
  </service>
 </services>

Please let me know if anyone having any suggestions here and also i need to know how to pass the parameter to the service method to
get the values as per the parameter supplied.

Thanks in advance.
Antonio Stoilkov
Telerik team
 answered on 24 Jan 2013
3 answers
214 views

hi
i've this object:

<telerik:RadAutoCompleteBox ID="RadAutoCompleteBox1" Runat="server"
Delimiter="" DropDownHeight="150px" DropDownWidth="270px" Filter="StartsWith"
InputType="Text" Width="270px" EmptyMessage="Inserisci la tua città"
Skin="Sunset">
<WebServiceSettings Method="Getcity" Path="index.aspx" />
</telerik:RadAutoCompleteBox>

I have three questions to ask:

1)

i've this code into vbnet:

<WebMethod()>
Public Shared Function Getcity(context As Object) As AutoCompleteBoxData
Dim searchString As String = DirectCast(context, Dictionary(Of String, Object))("Text").ToString()
Dim data As DataTable = Getcomuni(searchString)
Dim result As New List(Of AutoCompleteBoxItemData)()
For Each row As DataRow In data.Rows
Dim childNode As New AutoCompleteBoxItemData()
childNode.Text = row("descrizione").ToString()
childNode.Value = row("id").ToString()
result.Add(childNode)
Next
Dim res As New AutoCompleteBoxData()
res.Items = result.ToArray()
Return res
End Function
Private Shared Function Getcomuni(ByVal text As String) As DataTable
Dim adapter As New SqlDataAdapter("SELECT * from Tab_comuni WHERE descrizione LIKE @text + '%'", ConfigurationManager.ConnectionStrings("TrycontactString").ConnectionString)
adapter.SelectCommand.Parameters.AddWithValue("@text", text)
Dim data As New DataTable()
adapter.Fill(data)
Return data
End Function

but when I try to search for a city, nothing shows the dropdown does not appear.

2)
Why having the object raddecoration and thus eliminating any entry in AutoCompleteBox propriotà skin object, you can not see the edges of the round?

3)
How come when the focus is on the AutoCompleteBox, the edges of the object are not shown

Thanks you



Nencho
Telerik team
 answered on 24 Jan 2013
3 answers
85 views
Good day

Is there anyway I can modify this demo: http://demos.telerik.com/aspnet-mvc/grid/customcommand
to export the grid to PDF or Excel format?

Thank you.
Kostadin
Telerik team
 answered on 24 Jan 2013
2 answers
170 views
I use a RadWindow to add a new row in a RadGrid. The content of this 'add new record' window is nothing much..  a RadComboBoxes and a few RadNumericTextBoxes and two buttons: Add and Close.

When the windows closes (add button is clicked, close button is clicked or I close it with the upper-right X), an error appears:
Microsoft JScript runtime error: Can't execute code from a freed script

This is the javascript code used to show 'add new record' window from the main window where the grid is:
function DisplayAddWindow() {
   var parentPage = GetRadWindow().BrowserWindow;
   var parentRadWindowManager = parentPage.GetRadWindowManager();
   var oWnd2 = parentRadWindowManager.open("AddNewRecordWindow.aspx", "rwAddWindow");
   window.setTimeout(function () {
      oWnd2.set_title("Add new record");
      oWnd2.setActive(true);
      oWnd2.set_modal(true);
      oWnd2.setSize(370, 240);
      oWnd2.set_behaviors(Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Close);
      oWnd2.set_visibleStatusbar(false);
      oWnd2.set_showContentDuringLoad(false);
      oWnd2.center();
      oWnd2.add_close(RefreshGrid);
   }, 0);
   return false;
}
 
function RefreshGrid(oWnd, eventArgs) {
   $find("<%= RadAjaxManager1.ClientID%>").ajaxRequest("RefreshGrid");
}

To rebind the grid, after the 'add new record' windows closes, I use an ajaxRequest (RefreshGrid function).

This is where I think the problem lies: If I remove theoWnd2.add_close(RefreshGrid); statement the problem dissapears but the ajaxRequest doesn't fire (the grid doesn't refresh).

I've read a few posts about this error, but I can't get it to work.

Please help! Thank you!
Emil
Top achievements
Rank 2
 answered on 24 Jan 2013
1 answer
140 views
Hi all, is there a way to set the radWindow scrolled to a certain position of the content upon load? This is because I am opening a .aspx page which have a master page. I do not want to show user the MasterPage headers. Therefore, I want to set it so that when radWindow loads, it is scrolled to below the headers and disable/hide the scrollbars. Is this possible? or is there a way around if there's a limitation?
Marin Bratanov
Telerik team
 answered on 24 Jan 2013
1 answer
112 views
is there any way to include table inside radchart based on y axis value
Yavor
Telerik team
 answered on 24 Jan 2013
2 answers
101 views
Hi,

I want the chart information left side, not right side,( BUTCE , SATIS , ESATIS)  and I need it on the chart, not near.
Can I do it ?

Thanks

Ali
Top achievements
Rank 1
 answered on 24 Jan 2013
1 answer
78 views
Hi

I have a grid.  Inside that I have added radTooltip inside GridTemplateColumn.  I am binding the grid at client side.  Everything is working fine.  The problem here is based on one condition I need to hide/show the tooltip.
 
In the RowDatabound event I am doing the following:

function

 

 

RadGrid1_RowDataBound(sender, args) {

 

 

 

// debugger;

 

 

 

var image = args.get_item().get_cell("Barcode").getElementsByTagName('img')[0];

 

 

 

var tooltipDiv = args.get_item().get_cell("Barcode").getElementsByTagName('Div')[0];

 

 

 

var invalidText = args.get_dataItem().InValidText;

 

$(

 

'#' + tooltipDiv.id).hide();

 

 

 

} //RadGrid1_RowDataBound

But on hover over the image I still see a small box coming as a tooltip.

Your help is greatly appreciated.

Thanks
Sohan Kumar Agarwal

 

Marin Bratanov
Telerik team
 answered on 24 Jan 2013
1 answer
111 views
hey, it seems doesn't support Chinese, I tried seaching both English and Chinese Name from MSSQL 2008 DB. Only English name could be listed in dropdownlist. Is that possible to fix it? thanks

<code>
                    <telerik:RadAutoCompleteBox runat="server" ID="RadAutoCompleteBox1" Width="155" DataSourceID="SqlDataSource1"
                      AllowCustomEntry="false" DataTextField="txtName" datatextvalue="txtMobileOne"  DropDownHeight="100" DropDownWidth="275">
                        <DropDownItemTemplate>
                            <table cellpadding="0" cellspacing="0">
                                <tr>
                                    <td align="left" style="width: 25%; padding-left: 10px;">
                                         <%# DataBinder.Eval(Container.DataItem, "txtName")%>
                                      
                                    </td>
                                    <td align="left" style="width: 25%; padding-left: 10px;">
                                        <%# DataBinder.Eval(Container.DataItem, "txtMobileOne")%>

                                    </td>
                                  <td align="left" style="width: 25%; padding-left: 10px;">
                                        <%# DataBinder.Eval(Container.DataItem, "txtMobileTwo")%>

                                    </td>
                                </tr>
                            </table>
                        </DropDownItemTemplate>
                    </telerik:RadAutoCompleteBox>


            <asp:SqlDataSource ID="SqlDataSource1" runat="server"  ConnectionString="<%$ ConnectionStrings:sqlConn %>"
        ProviderName="System.Data.SqlClient" SelectCommand="SELECT [txtMobileOne],  [txtMobileTwo], [txtName] FROM UserProfile">
    </asp:SqlDataSource>

</code>
Nencho
Telerik team
 answered on 24 Jan 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?