Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
151 views
I created two new tool buttons to the RadEditor by using this code:

<telerik:EditorToolGroup>
             <telerik:EditorTool Name="RTL"  Text="RTL" ShowText="true" ShowIcon="false" Width="25px" />
               <telerik:EditorTool Name="LTR"  Text="LTR" ShowText="true" ShowIcon="false" Width="25px" />
</telerik:EditorToolGroup>

I am looking for these commands to change the editor style from a Left-To-Right style to Right-To-Left style.
The styles work fine when I change them from C# code behind.
But I am unable to attach code behind events to the new Editor Tools (As there a way to do so???) so I try using the following JavaScript code: (As seen in your samples).
<script type="text/javascript">
            Telerik.Web.UI.Editor.CommandList["RTL"] = function(commandName, editor, args) {
                editor.DialogsCssFile = "Styles/RadEditor_Dialogs_RTL.css";
                editor.ContentAreaCssFile = "Styles/EditorContentArea_RTL.css";
                alert('RTL');
            };

            Telerik.Web.UI.Editor.CommandList["LTR"] = function(commandName, editor, args) {
                editor.DialogsCssFile = "";
                editor.ContentAreaCssFile = "";
                alert('LTR');
            };
 </script>

The code gets called alright, but has no effect on the editor style.
(If I run similar code from the code behind the styles work, but I need the code to execute via the new tool buttons)

I'd appreciate any help you can provide.

Tervel
Telerik team
 answered on 11 Jun 2009
2 answers
128 views
Hi All,

I have a radgrid with datas

I have set the EditMode=Popup

I have set int EditFormSettings (CaptionFormatString="Edit This Record : {0}" )

So that while the edit is clicked, a popup appears with the heading Edit This Record.

But while clicking the add new record, the popup appears without any heading.

Is there any option for setting the heading for add new record also.

Thank you

-Anto


Anto (DLL Version : 2008.3.1314.35)
Top achievements
Rank 2
 answered on 11 Jun 2009
3 answers
85 views
Using Firefox 3.0.10 on Vista x64.

Go to http://demos.telerik.com/aspnet-ajax/editor/examples/filemanagers/defaultcs.aspx.  The dialogs won't open.  Nothing happens.  Any idea?  This also happens with my application.
Lini
Telerik team
 answered on 11 Jun 2009
4 answers
227 views
Hi,

I want to achief the following:
I have a table in SQL server with 2 columns (DateTime column and Value(double) column)
I want to chart this as line-graph in a webpart, wich is placed in a webpartzone and nexted in an ajax updatepanel. The intervals DateTime in the SQL table are not regular based; sometimes I've 2 samples in 1 minute, sometimes 1 sample in 15 minutes or anything between. I want regular X-Axis labels (every 6 hours relative to midnight). I want zooming functionality and would like point-markers with tooltips that show the timestamp and exact value.

Telerik Charts seems to have it all, but can't get it to work together :-(

1.)    I'm trying to get charting work, with on the X-Axis neat timestamps in date-time format. I want to set these timestamp labels in code behind to get nice timestamps in stead of "1/1/2009 13:32:56" witch is real data from the table. For example "1/1/2009 00:00:00", "1/1/2009 06:00:00", "1/1/2009 12:00:00", "1/1/2009 18:00:00", "2/1/2009 00:00:00", "2/1/2009 06:00:00", "2/1/2009 12:00:00", "2/1/2009 18:00:00".  I tried this:

trend.PlotArea.XAxis.Clear();

 

for (int j = 8; j >= 0; j--)

trend.PlotArea.XAxis.AddItem(

DateTime.Now.Subtract(TimeSpan.FromHours(j)).ToOADate().ToString());

 

 

 

The data from sql has to me mapped to the correct position according to the X-Axis labels. I don't know how to do this.  Next problem is, when setting a x-axis series with OADate() elements is to get the trend.PlotArea.XAxis.Appearance.ValueFormat = Telerik.Charting.Styles.ChartValueFormat.LongTime; to Date and time display.

2.)    When I don't set X-axis labels from code-behind (as told above), but just binding the chart to the sql table and mapping the DateTime column to the X-Axis.

 

trend.PlotArea.XAxis.DataLabelsColumn = "DatumTijd";

 

 
It shows the data correctly and I can Zoom in the chart. This feature works great. Except when placing this chart inside an ajax updatepanel. (Actualy I create the whole chart in a code-behind dll wich is actualy a webpart. The webpart is instanciated and placed in a webpartzone and the webpartzone is in an ajax updatepanel, so the rendered content wil be nested inside a div/table inside a webpartzone, inside an ajax updatepanel). Then the X-Axis will be drawn on top of the chart(instead of under). Data(graph-line) is sometimes rendered on the wrong place accoriding to the Y-Axis (looks like the Y-Axis is mirrored)

3.)       Datapoint markers are drawn correctly with:
series.Appearance.PointMark.Visible = _showValues;

 

 

 

 

series.Appearance.PointMark.Border.Width = 2;

 

 

 

 

series.Appearance.PointMark.Border.Color = System.Drawing.Color.Red;

 

 

 

 

series.Appearance.PointMark.Dimensions.AutoSize = false;

 

 

 

 

series.Appearance.PointMark.Dimensions.Height = 5;

 

 

 

 

series.Appearance.PointMark.Dimensions.Width = 5;

 

 

 

 

 

 

Except for the tooltips wich are generated in:
void RadChart2_ItemDataBound(object sender, Telerik.Charting.ChartItemDataBoundEventArgs e)

{

 

if (_showValues)

 

 

e.SeriesItem.ActiveRegion.Tooltip =

DateTime.FromOADate(e.SeriesItem.XValue).ToString();

 

 

}

 

 

 

Tooltips are never displayed (will tooltips work with zooming enabled???)

4.)    How to turn off the values inside the graph that display next to the data-points.

I hope someone can put me on the right track and I still hope that all requested features can be compined together.

Thanks for your help,

Arno

Vladimir Milev
Telerik team
 answered on 11 Jun 2009
1 answer
67 views
Hello All,

I created generic control which implements load ahead data using telerik:RadComboBox. Everything is working fine as per my requirement.

But there is one issue, When I click on down arrow of combobox I can see the one request comes to server, I strongly believe its not postback, but anyhow I can get new request.

Can anyone come accross this situation? Any help on this?

Regards,
Imran
Princy
Top achievements
Rank 2
 answered on 11 Jun 2009
3 answers
143 views
Hi All,
           I am using Rad grid in order to bind the gird.
I have one Main Grid. Inside the MainGrid there two Tab Controls. One of the TabControl is having Grid and the Other TabControl is having Charts.

The first MainGrid iam binding it in the page_load. And the second Grid  which is inisde the tab, iam binding it in the MainGrid_ItemCreated Event.  It works fine like this, but the problem is the Item_created gets called for event. Because  of this it the grid is getting binded many times.

Can any one pls let me know what is the best way to bind the grid inside the tab. If i wont use Item_created event, then the tab is  not displaying the Grid.

Pls give me suggestions..
Its very very urgent

Regards,

asra
protected void CategoryGrid_ItemCreated(object sender, GridItemEventArgs e)  
    {  
 
if (e.Item is GridNestedViewItem)  
            {  
                  //Find the RadGrid  
                radProdGrid = e.Item.FindControl("radProdutsGrid") as RadGrid;  
                // Find the chart  
                rcProduct = e.Item.FindControl("RadChart2") as RadChart;  
 radProdGrid.DataSource = productInfoView;  
 
}  
} 
Asra
Top achievements
Rank 1
 answered on 11 Jun 2009
3 answers
163 views
Hello,

I have a page that has a RadGrid in it. The grid uses the NeedDataSource to load the data.
The NeedDataSource calls a method on the page that returns a DataTable. This method is using a parameter that is retrieved from a property in a base page. Lets say that the property name is ParameterName. The value of this property is saved in the ViewState.

Most of the time everything is working fine; but sometimes the The ParameterName property is null. I have checked and saw that the NeedDataSource is called before the Page LoadViewState method. Is this normal?

How can I obtain the ViewState data before the NeedDataSource is called?

Thanks,

Oded
Tsvetoslav
Telerik team
 answered on 11 Jun 2009
1 answer
74 views
I have a server control which uses a RadGrid. It doesn't do anything particularly special but clicking on a row causes it to raise an event on the server side updating certain elements of the page. It is also inside an AJAX update panel. This has always worked fine using version 2008.1.515.20.

Recently we upgraded to 2009.1.527.20, and since we've noticed that loading up the page instantly causes a "Handler should be a function." javascript error, and upon jscript debug it appears that it's complaining about a "rowClick" handler/event belonging to the RadGrid within the AJAX generated scripts.

After the javascript error the page works fine except for the RadGrid, and nothing happens when it is clicked.

Thanks
Andy
Veli
Telerik team
 answered on 11 Jun 2009
1 answer
381 views
Here's my situation.  I have a RadToolbar, a RadComboBox, & a RadGrid on a page.  When the page loads initially, the inputbox color in the combobox is white and there is no data in the grid.  If the user selects an item from the combobox, clicks a button on the toolbar, the grid gets populated with data and everything is fine.  If the user clicks the button on the toolbar before selecting an item from the combobox, the the backgroundcolor of the inputbox needs to turn pink. 

If handled on the server side, in the Grid_NeedDatasource event, I check the selected value of the combobox and try to set the backgroundcolor if nothing is selected.  Could use some help here.

If handled no the client side, the AJAX call would need to be canceled as well as setting the color.

I'm lost.  All help is appreciated.

Thanks,
Rob
Shinu
Top achievements
Rank 2
 answered on 11 Jun 2009
5 answers
217 views
Hi,

I am developing an Mp3 Player for my site, using telerik rad ajax controls. A requirement I have is to bind the song titles and their paths (They are dictionary <TKey, TString> collection). However, I need to get the clicked row's song path title to pass to the mp3 player code to then play that song.

I have used the API quite heavily and I know how to do this (get value of a cell on clicking a row), but with the client side API, I can't pass the value of a cell to a C# function - or can I?

Thanks
Princy
Top achievements
Rank 2
 answered on 11 Jun 2009
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?