Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
66 views
Hi Team,
          I want to reorder the grid rows  in client side only , Without server side scripting can i do that,
after drag and drop any number of rows it should be reorder by client side code.

Please reply me as soon as possible.

thanks in advance
Azam
Maria Ilieva
Telerik team
 answered on 24 Feb 2011
3 answers
282 views
Hi,

I am using Rad Ajax Manager and I have added some response scripts in my serverside code. In the response scripts I use $find('...'); to access some telerik controls on the page in the client-side. Each time i try to do this, the $find method returns null. I suppose this is because the corresponding controls are not updated by the ajax manager via the ajax settings. Here is the issue - I do not want them to be updated, there will be no state change to these controls, but I still want to access them after the response (to retrieve or update the selected value of a combobox for instance). Is there a way I can achieve this without adding ajax settings for the controls I want to $find(). The reason for this is to reduce the amount of the response's markup and server-side roundtrips (this also comes as a requirement from our clients). Also, since there has not been any server-side modification on these controls, I consider it unnecessary to update them every time.

Another question - at which state of the client-side lifecycle the response script is called - before or after the load (Sys.Application.add_load) function?. Can I use the response script to hook my logic in the load stage instead of directly calling it?

Thanks in advance
Ivaylo
Top achievements
Rank 1
 answered on 24 Feb 2011
1 answer
63 views
I have a several simple grids of words and comboboxes which lets the user add a word to the respective grid.  Similarly, in the grid, I have an x column to allow the user to delete the word from the grid (and it goes back into the combobox dropdown).

I have this working in the code behind, but it's rather slow.  Each time the user does something, it involves a round-trip to the server.

When the user hits the save button, I get the contents of the grid and save it off, so it seems rather pointless to have all these round-trips to the server just to manipulate the grid!

I'd like to do the add/delete in the client side in javascript.  I'm looking for some easy to understand examples of this.  The reason I'm using a combobox and not 2 lists/grids is that the user can type a new word to add to the list.

I already have the combo box's dropdown list and the grid loaded.  I'm just looking for some javascript that would "move" items back and forth between the dropdown list and the grid.  Ideally some sort of control I could use over and over again!  If anyone has an example of something like this they could share, that would be great.

Michael Grant
Pavlina
Telerik team
 answered on 24 Feb 2011
3 answers
345 views
Hi,

We have implemented date sorting for the RadFileExplorer in the Image Manager tool of RadEditor. With this, the contents of our configured image path are sorted according to the date they were uploaded.  We have also enabled paging for the explorer. Currently we have a problem when the parent 'Images' path has both files and sub folders. In this case, RadFileExplorer seems to be always picking folders first rather than files. So, for example, if my page size was 5 and I have two subfolders and 5 files in my directory, the first page always shows the directories. This has become a problem when a new file is uploaded. We expect to see it at the head of the first page. However, we find that it is the head of a page somewhere down the line. This is happening only when there are subfolders in the parent directory.

Please advise!
Dobromir
Telerik team
 answered on 24 Feb 2011
3 answers
291 views
Hello all,

Is it possible to get and/or set the background color of a radlistbox item in Javascript? 

Thanks!

Eddie
Shinu
Top achievements
Rank 2
 answered on 24 Feb 2011
1 answer
171 views
I have a ListView bind to xmldatasource, but I cannot make it work as the online demo does, it keeps saying "

DataBinding: 'System.Web.UI.WebControls.XmlDataSourceNodeDescriptor' does not contain a property with the name 'Street'.

"..when I changed the syntax from  <%#Eval("Street")%> to <%#XPath("Address/Street")%>, it kinda works but only pull out data under the first child node, the rest never got databinded. The xml file is like below:
<data>
  <Address>
    <Id>1000</Id>
    <Street>1234 S 1st St. </Street>
    <City>LOS ANGELES</City>
    .......
   </Address>
   <Address>
    ......
   </Address>
</data>
 Here is my xmldatasource: 
<asp:XmlDataSource ID="XmlDataSource1" runat="server" 
            DataFile="~/sample1.xml" XPath="data"></asp:XmlDataSource>

Any suggestions?

Thanks a lot!

Shan

Iana Tsolova
Telerik team
 answered on 24 Feb 2011
8 answers
629 views
**UPDATE** Doesn't seem to work when adding it into a MasterPage Content page in IE7 only in FireFox it works??
I'm trying to get the RadSlider drag handle to move when clicking on it and dragging it horizontally either direction with no luck.  Using the side arrows or clicking on the slider bar will move the handle, but dragging the handle itself doesn't work.  Not sure what I'm missing here or if I'm supposed to implement some javascript here to allow for that functionality?


 

<telerik:RadSlider ID="RadSlider0" runat="server" ItemType="None" MinimumValue="0" MaximumValue="100" SelectionEnd="100" Value="0" OnClientSlide="clientSlide()"

 

 

ShowDragHandle="true" AnimationDuration="300" Height="20px" Width="106px" Skin="Telerik" OnClientValueChange="HandleValueChange">

 

 

</telerik:RadSlider>

 

RadSlider0.Value = (

Int32)dr[3];

 

RadSlider0txt.Visible =

true;

 

RadSlider0.Visible =

true;

 

Svetlina Anati
Telerik team
 answered on 24 Feb 2011
11 answers
221 views
I have an app wherein I store appointments in a DB.

I - normally - show the appointments in RadScheduler. However, there are occasions when using the scheduler is not the most appropriate too, for example, when the use queries the data base for a period covering more than 1 month.

In these cases, I use RadGrid to display the results of the query and this works just fine.

[wait for it]

But, I now have recurring appointments and these are stored using the recurrence rule in the master appointment. Is there a way for me to show the occurrences of these recurring appointments in a grid?

I can think of doing it:
  1. Read the DB and set the DataSource of the Scheduler to the query result and then use the Scheduler's Appointments property as a DataSource for the grid.
  2. Read the DB and set the DataSource of the Scheduler to the query result and use the AppointmentDataBound event to create a new List<> to use as the DataSource of the grid.
I haven't yet tried either of these, 'cos I'm sure I've seen an demo, or Code Library article on this very subject, but I'll be damned if I can find it.

FWIW, I prefer the idea of the 2nd of the 2 options above as the AppointmentDataBound event gices me access to the DataItem used to create the appointment in the first place, can I have a lot of extra data in that object that I would, otherwise, have to query the DB again for.

-- 
Stuart
Peter
Telerik team
 answered on 24 Feb 2011
2 answers
88 views
Hi All,


I am using radgrid having nested RadListView.


On click of (+) any row in the grid, the radlsitview shows
records specific to that row.


Recently i added paging to my radlistview,but due to that i have issues.


1st time it shows proper items, but whenever i select any next or previous or page size
from dropdown,the behaviour gets change.
Now it shows records in thousand, even i know the record is only 1 for that row.

1st time:
 Page: of 1 Items 1 to 1 of 1

After choosing from dropdown or clicking any pager button
1 2 3 4 5 6 7 8 9 10...  Page size: 
 select Page: 1 of 2569 Items [Go]        Item 3 to 4 of 5138

Any help is greatly apreciated.
Vasil
Telerik team
 answered on 24 Feb 2011
1 answer
72 views
Hello,

I have a custom ascx controls contains RadGrid and RadChart.

The control is loaded into ajax panel using ajax request
protected void RadAjaxPanel2_AjaxRequest(object sender, AjaxRequestEventArgs e)
{
if (e.Argument == "InitialLoad")
{
var auctionTotals = LoadControl("~/core/Informers/CurrencyRates.ascx");
auctionTotals.ID = "CurrencyRates";
panel2.Controls.Add(auctionTotals);
}
}
Inside the user control every grid row has a related chart dislayed when this row is selected.
function <%=ClientID%>_grid_OnRowSelected(sender, args) {
<%=ClientID%>_selectChart(parseInt(args._itemIndexHierarchical));
}

Here is how the event handler is added

var events = grid.ClientSettings.ClientEvents;
events.OnRowSelected = ClientID + "_grid_OnRowSelected";

Everything works just fne if the control is used on the aspx page (like a normal aspx control). But as soon as I try to load this control dynamically using ajax panel (using the first code snapshot), I get a javascript error: content_CurrencyRates_grid_OnRowSelected is not defined

I am a bit confused why the event handler is not binded to the grid in this scenario. Should this function be placed in some other part of the ascx control?

Thanks,
Andrei
Vasil
Telerik team
 answered on 24 Feb 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?