Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
536 views

Hi, I have grouping enabled on my grid and I show my grid as collapsed on the first load.

If my column value is null I show a 'n/a' but it shows a blank value in the group footer. Is it possible to show the n/a in the group footer as well? 

<telerik:GridTemplateColumn HeaderText="Jan" UniqueName="Jan" DataField="Jan" Aggregate="Sum" FooterAggregateFormatString="{0:c2}">
<ItemTemplate>
<%#(String.IsNullOrEmpty(Eval("Jan").ToString()) ? "n/a" : Eval("Jan", "{0:c2}"))%>
</ItemTemplate>
 </telerik:GridTemplateColumn>

 

Attila Antal
Telerik team
 answered on 26 Mar 2018
1 answer
148 views

Hey, I've noticed what seems to be a bug in the telerik editor when it comes to changing font styles of text in a list, which can even be re-produced on the track changes demo at https://demos.telerik.com/aspnet-ajax/editor/examples/trackchanges/defaultcs.aspx.

The steps to reproduce are as follows:

1. Copy a list from word (Bullet or numbered doesn't matter, but numbered is more problematic)

2. Paste into the telerik editor with track changes turned on

3. Apply Bold, Underline or Italics to the pasted list

Result:

The list seems to break itself into 3 separate lists all spaced further apart than initially. Numbered lists will go from 1,2,3 to having 1,1,1. I notice that creating a list through the telerik controls allow for font styling to be applied without error and yet pasted content is causing issues, is there anything that can be done to fix this?

 

Kind Regards,

Aidan

Rumen
Telerik team
 answered on 26 Mar 2018
0 answers
110 views

Hi

In the NeedDataSource event i am binding a table to the grid. I need to get all values from all rows (one column) after binding. 

Today i use this simple code

grid.DataSource = _searchResult;  //DataTable
List<string> activitiesList = new List<string>();
foreach (DataRow row in _searchResult.Rows)
  activitiesList.Add(row["ActivityNumber"].ToString());

But this only gets me an unsorted list.

I have tried to get values from mastertableview:

grid.DataSource = _searchResult;  //DataTable
List<string> activitiesList = new List<string>();  
foreach (GridDataItem item in grid.MasterTableView.Items)
activitiesList.Add(item.GetDataKeyValue("ActivityNumber").ToString());

 

But since i use paging i only get the first 50.

So how can i get all values from all rows after binding a table to the grid. I need the entries in the way the grid is sorted .

 

Thank you

Lars E.

 

 

Lars
Top achievements
Rank 1
 asked on 26 Mar 2018
1 answer
95 views

Hi,

A root node is added to the treeview with expandmode ServerSideCallback. When clicked then server call is processed and child nodes are retrieved.

When the checked property on the root node is set to true, then no server call is triggered and loading image is shown. Do you need to preload child nodes of checked nodes or can't the checked be used with ServerSideCallback expandmode?

Peter Milchev
Telerik team
 answered on 23 Mar 2018
0 answers
152 views

I am new to Ajax. I want to retrieve the transaction details from the merchant website after payment processing. My ajax call script is not working. Please help.

C# Method:

public class RetrieveCache{[WebMethod]public string RetrieveTransactionData(string ID){

ChannelFactory<ServiceSoap> PayChannelFactory = new ChannelFactory<ServiceSoap>("ServiceSoap12");

ServiceSoap Paychannel = PayChannelFactory.CreateChannel();

XmlNode node = Paychannel.RetrieveCachedData(ID);return node.InnerXml;

}}

 

Ajax call Script in HTML Page to call the above c# method

 

Html Page URL: http://localhost:55014/SuccessPage.html?id=29473740923

 

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js" type="text/javascript">

</script><script type="text/javascript"> $(document).ready(function () {

var url = window.location.search; debugger;var token = (url.replace("?", "").split("=")[1]).toString(); debugger;var dataval = JSON.stringify({ token: token }); $.ajax({ url: "http://localhost:55014/RetrieveCache.cs/RetrieveTransactionData", type: 'post', data: JSON.stringify({ token: token }), contentType: 'application/json; charset=utf-8', dataType: 'json', success: function(data){ alert(data);}, error: function (err) { alert(err)}});});

</script>

This is the error message in console: localhost:55014/RetrieveCache.cs/RetrieveTransactionData 404 (Not Found)

ABC
Top achievements
Rank 1
 asked on 22 Mar 2018
3 answers
271 views
Hello

When using the  RadFilterSqlQueryProvider and using a datetime field in the Radfilter the result of the provider.Result call is for example:

([date)] >= '23-11-2011 16:00:00')

For SQL however one expects:
([date)] >= CONVERT(DATETIME, '2011-11-23 16:00:00', 102))

The other providers of the Radfilter also don't give a result that could be used in a where clause of an SQL statement. Do you have a solution to this?
One would expect that a custom sqlprovider (with base class RadFilterSqlQueryProvider) would be available for e.g. ms-sql and mysql.

Thanks
Piet

Eyup
Telerik team
 answered on 21 Mar 2018
1 answer
484 views

I have two RadListBox. Data in first box is populated from database using RadListBoxItem and I have set an attribute for each item. In the second box, I've created custom context menu. After I adding the item from first box to second box, user can select some option using the context menu. On context menu selection, I need to get the Attribute I set before and update the attribute value according to the context menu selection so I can used it for later process.Currently, I unable to even the attributes I set previously using the context menu's javascript. Please guide how to read ListItem's attribute and update the attribute to a new value.

 

This is how I add the item to the first box with attribute.

this._sortingList = new List<Sorting>();
this._sortingList = DBConnection.getSortingList();
 
foreach (var s in this._sortingList)
 {
        RadListBoxItem item = new RadListBoxItem();
        item.Text = s.Description;
        item.Value = s.Id.ToString();
        item.Attributes["myorder"] = "0";
        this.RadListBox1.Items.Add(item);
}

 

Thus custom context menu javascript.

    function showContextMenu(sender, e) {
    var menu = $find("<%= cm1.ClientID %>");
    var rawEvent = e.get_domEvent().rawEvent; menu.show(rawEvent);
    e.get_item().select();
    $telerik.cancelRawEvent(rawEvent);
 
}
function onItemClicked(sender, e) {
    var listBox = $find("<%= RadListBox1.ClientID %>");
    var listItem = listBox.get_selectedItem();
    var menuItem = e.get_item();
    if (menuItem.get_text() == "Ascending"){
        alert(listItem.get_attributes().getAttribute("myorder"));
    }
    else if (menuItem.get_text() == "Descending") {
        alert(listItem.get_attributes().getAttribute("myorder"));
    }
}
Gangatharan
Top achievements
Rank 1
 answered on 21 Mar 2018
0 answers
183 views

I have two RadListBox. Data in first box is populated from database using RadListBoxItem and I have set an attribute for each item. In the second box, I've enabled custom context menu. After I adding the item from first box to second box, user can select some option using the context menu. On context menu selection, I need to get the Attribute I set before and update the attribute value according to the context menu selection so I can used it for later process.Currently, I unable to even the attributes I set previously using the context menu's javascript. Please guide how to read ListItem's attribute and update the attribute to a new value.

 

This is how I add the item to the first box with attribute.

this._sortingList = new List<Sorting>();
this._sortingList = DBConnection.getSortingList();
  
foreach (var s in this._sortingList)
 {
        RadListBoxItem item = new RadListBoxItem();
        item.Text = s.Description;
        item.Value = s.Id.ToString();
        item.Attributes["myorder"] = "0";
        this.RadListBox1.Items.Add(item);
}

 

This is custom context menu javascript.

function showContextMenu(sender, e) {
    var menu = $find("<%= cm1.ClientID %>");
    var rawEvent = e.get_domEvent().rawEvent; menu.show(rawEvent);
    e.get_item().select();
    $telerik.cancelRawEvent(rawEvent);
  
}
function onItemClicked(sender, e) {
    var listBox = $find("<%= RadListBox1.ClientID %>");
    var listItem = listBox.get_selectedItem();
    var menuItem = e.get_item();
    if (menuItem.get_text() == "Ascending"){
        alert(listItem.get_attributes().getAttribute("myorder"));
    }
    else if (menuItem.get_text() == "Descending") {
        alert(listItem.get_attributes().getAttribute("myorder"));
    }
}
Gangatharan
Top achievements
Rank 1
 asked on 21 Mar 2018
2 answers
342 views

Hi,

Sorry if this has been asked elsewhere, I cannot find any answers on this topic..

I am using a media player in a dockzone control which works great.  The only issue I have is the player, which is set to autoplay, shows the titlebar and play controls automatically on start and only disappears when the user hovers over the control and then off it.  I would like the player ONLY to show the controls when the user hovers over it (ie do not show it until they want to control the video).

Thanks!

Eyup
Telerik team
 answered on 21 Mar 2018
4 answers
262 views
I have tasks in my current implementation that run to 6pm but the timeline only shows 8am to 4pm. How do I go about adjusting the Gantt to show 7am to 6pm?
Kasim
Top achievements
Rank 2
 answered on 21 Mar 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?