Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
111 views
Hi

I am using RadDatePicker in my web application and I am using the following code snippet to execute database operation while selecting a date.   

<telerik:RadDatePicker runat="server"  ID="targetDatePicker" DbSelectedDate='12\2\2008' AllowEmpty="true" RadControlsDir="~/Control/RadControls/" OnDateSelected='<%#CreateCompleteDateRequest(123)%>'>

Note: Function CreateCompleteDateRequest(123) handle ajax code that updates the database.

However, it worked in OnClick() event. But we require the operation in OnDateSelected (after selecting a date from date picker).

Could you please share if you happen to know any resolution.

Thanks,
Dipankar Shakya
Dipankar
Top achievements
Rank 1
 answered on 23 Dec 2008
1 answer
185 views
Hi,
I need help in implementing telerik bar chart (Horizontal). 
Chart Details : 
1. I have horizontal bar charts with bars on both the sides +Ve X Axis and -Ve X Axis. Bars are overlapping in center. i.e. I am graphically representing the negative as well as positive values.
2. Only X axis values are concerned for plottinfg the chart.
3. Bar length is nothing but the -X position in left side and +X position in right side.
4. I dont want any caption\interval on Y Axis.
5. Instead of captions\Intervals I want name of the bars e.g. Sunday, Monday.....aligned properly

Following are the Code\ Markup I am using for generating the Bar Chart. Also I have attached the screen shot of my bar chart with explanation of desired look.

1. Markup :
<telerik:RadChart Skin="Hay" ID="barChart1" runat="server" SeriesOrientation="Horizontal"  Width="600px" Height="2000px" AutoLayout="true">                                                                
                                        <PlotArea >
                                            <YAxis >                                                
                                                <Items></Items>
                                                <AxisLabel>
                                                    
                                                </AxisLabel>
                                                <ScaleBreaks></ScaleBreaks>
                                                <Appearance></Appearance>
                                                
                                            </YAxis>
                                            <XAxis ></XAxis>
                                        </PlotArea>
                                        </telerik:RadChart>                                                                                                                    

2. C# Code :
A. I am creating three Arrays
a. Array containing name of each horizontal bars
b. Array containg the yValues for the Left hand Side of the Bars (-VE X Axis)
c. Array containg the yValues for the Right hand Side of the Bars (+VE X Axis)

B. I have written a method which returns RadChartSeries and takes Name of the Seies, yValues (Array), Caption for Bars (Array), Color
    private ChartSeries GetChartSeries(string titleText, string[] blockName, double[] yValues, Color color,bool displayCaption)
    {
        ChartSeries chartSeries = new ChartSeries();
        chartSeries.Appearance.FillStyle.MainColor = color;        
        chartSeries.Appearance.FillStyle.FillType = Telerik.Charting.Styles.FillType.Solid;                                
        chartSeries.Name = titleText;       
        chartSeries.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.SeriesName;
        chartSeries.Appearance.ShowLabels = true;
        chartSeries.Appearance.LabelAppearance.Visible = true;
        chartSeries.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.SeriesName ;
        chartSeries.Appearance.LabelAppearance.LabelLocation = Telerik.Charting.Styles.StyleSeriesItemLabel.ItemLabelLocation.Auto;
        int items = blockName.Length;
        ChartSeriesItem[] chartSeriesItems = new ChartSeriesItem[items];
        for (int i = 0; i < items; i++)
        {      
            chartSeriesItems[i] = new ChartSeriesItem();            
            chartSeriesItems[i].Name = blockName[i];
            
            if(displayCaption)
                chartSeriesItems[i].Label.TextBlock.Text = blockName[i] + "(" + yValues[i].ToString() + " % )";

            //chartSeriesItems[i].Label.TextBlock.Text = yValues[i].ToString() + " %";               
            chartSeriesItems[i].YValue = yValues[i];
          
            chartSeries.Items.Add(chartSeriesItems[i]);
        }        
        return chartSeries;        
    }

C. Now the ChartSeries obtained from above method I am adding to my Rad Chart
        barChart1.Appearance.FillStyle.MainColor = Color.White;
        barChart1.Appearance.ImageQuality = Telerik.Charting.Styles.ImageQuality.None;
        barChart1.ChartTitle.TextBlock.Text = "Original TCO = " + Math.Round(tcoBaseValue, 2).ToString();
        barChart1.Appearance.BarOverlapPercent = 100;
        barChart1.AddChartSeries(GetChartSeries("-5% Change", blockCaption, yValuesL, Color.Yellow, true));
        barChart1.AddChartSeries(GetChartSeries("+5% Change", blockCaption, yValuesR, Color.Blue, false));

D. I am getting the bar chart (Attached). I want the captions to be moved into Left most side where Graph Scale\ Intervals used to be displayed.

Thanks and Regards...
Ashish Tripathi..

Ves
Telerik team
 answered on 23 Dec 2008
1 answer
173 views
We are building a CMS type application and using Route handling to map attractive paths. This was causing a problem for lots of Telerik dialogs until the Q3 version. I've wired up the DialogHandler.axd (per directions in various postings) and its working well. However, I'm now having a problem with the SpellCheckHandler.axd. Specifically if the page request references subdirectories then those subdirectories appear in the requst for the axd component. I've handled it so far by including the following in my route modifications

        routes.Add(new Route("{resource}.axd/{*pathInfo}", new StopRoutingHandler()));
        routes.Add(new Route("{path}/{resource}.axd/{*pathInfo}", new StopRoutingHandler()));
        routes.Add(new Route("{path}/{subpath}/{resource}.axd/{*pathInfo}", new StopRoutingHandler()));

This remaps it for one or two levels but I thinking there should be away around this. The DialogHandler is taken care of with the folowing
        base.DialogHandlerUrl = "~/Telerik.Web.UI.DialogHandler.axd";
but I don't see anything similar for the SpellCheckHandler which is loaded via paths such as
        ~/PODS/page/Telerik.Web.UI.SpellCheckHandler.axd

Is there a way to handle this other than with my additional route handles above?




Tervel
Telerik team
 answered on 23 Dec 2008
3 answers
111 views
Hi,

Could you use Map Editor standalone like ImageManager and return the definition of Map client side?
Some tip!
regards


Tervel
Telerik team
 answered on 23 Dec 2008
2 answers
101 views
Hello Telerik,

When I post a message to a thread that is several months old (in this case, it was 8 months old), it told me to verify that the version I'm using is the same as the one being addressed in the thread - since it was an old thread.

Should this prompt be removed?  First, I've no way of knowing which version was being used at the time.  Second, the problem/issue may very well persist over releases.  Even if it wasn't a problem, but instead something like a "how to", then the version doesn't really matter.

I've always pretty much ignored this for these reasons, but I thought I'd point it out.

Thank you.
LeBear
Top achievements
Rank 1
 answered on 23 Dec 2008
1 answer
120 views
Hi,

I'm using the RadGrid control on my search page and  have SEO paging enabled. I've noticed a weird behaviour that the SEO pager does automatically. It seems if you enter a single letter, say "p" it will cutoff the url.

For Example: I set the SEOPagingQueryStringKey = "p" and the page url of my page is Test.aspx. In the paging links it shows "Test.as?p=1".

Its seems if you enter a single letter or even a phrase that is contained in the actual page url it stops at the first index of that letter, removes what comes after it and then appends the page number query string.

I've overcome this problem by using a paging query string variable that isn't found in my page url, but I think it could be a problem for those who use a letter or word that is contained in their url and then breaks the paging for them.

The version I'm using is 3.1125.20 and I have noticed that this problem also occurs in later versions as well.
Georgi Krustev
Telerik team
 answered on 23 Dec 2008
4 answers
423 views
I have a grid with the following GroupByexpressions. Instead of the group header showing "State: XX; Count: YYY" as it does now, I would like for it to simply show "State: XX (YYY)". Can anyone give me a hand in modifying the expressions to achieve this?

<

GroupByExpressions>

<telerik:GridGroupByExpression>

<SelectFields>

<telerik:GridGroupByField FieldAlias="State" FieldName="GroupState"></telerik:GridGroupByField>

<telerik:GridGroupByField FieldAlias="Count" Aggregate="Count" FieldName="ID" />

</SelectFields>

<GroupByFields>

<telerik:GridGroupByField FieldName="GroupState" HeaderText="State"></telerik:GridGroupByField>

</GroupByFields>

</telerik:GridGroupByExpression>

</GroupByExpressions>

Dhawal
Top achievements
Rank 1
 answered on 23 Dec 2008
1 answer
129 views
Hi,
    How can I paste the image contents from PDF file in the rad editor as it is done in the MS Word document.
Thanks
Vikram Kumar
Rumen
Telerik team
 answered on 23 Dec 2008
1 answer
92 views
Hello,

I'm using the telerik rotator to show content i bind manualy (using the asp binding syntax).
The problem is that i get JS error when my data source has no element and the rotator is loaded empty.
The error is thrown from the rotator scripts, on a method called "needsShift". It tries to get the size of the "_currentElement", and since this is "undefined" it throws an error at some point.

I guess loading an empty rotator is possible, so maybe i am doing something wrong...
What could be the problem?

Thanks,

Nimrod Ben-Yaakov.
Fiko
Telerik team
 answered on 23 Dec 2008
6 answers
159 views
I have a couple of dynamic RadGrids generated in Page_load(). The Grids have GridEditCommandColumn, which turned the rows to edit mode when the edit button was clicked. The problem was when I tried to update the items in the row, the e.CommandName always equaled to "Delete", and UpdateCommand event hanlder was never fired.

So the RadGrid actually performed row delete function instead. Can anyone help me sovle the problem?

Thanks a lot in advance! 

RadGrid1.UpdateCommand += new GridCommandEventHandler(RadGrid1_UpdateCommand);

RadGrid1.ItemCommand +=

new GridCommandEventHandler(RadGrid1_ItemCommand);

protected
void RadGrid1_UpdateCommand(object sender, GridCommandEventArgs e)

 

 

{
    ........

}

 

 

protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)

{

 

 

    if (e.CommandName == RadGrid.DeleteCommandName)
    {
        .......
    }
}

 

 

 

 

 

 

 

 

 

Sebastian
Telerik team
 answered on 23 Dec 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?