Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
101 views
I have a used one of your chart demonstrations and require a little help.

DataTable table = PageAccess.CountOfEnquiriesBetweenDates(startDate, endDate);
 
        var c = table.Rows.Count;
         
 
        RadChart radChart = new RadChart();
        radChart.ChartTitle.TextBlock.Text = "Enquiries";
        radChart.Skin = "DeepGray";
 
         
        var chartSeries = new ChartSeries {Name = "Enquiries", Type = ChartSeriesType.Bar};
        //It works when I just put in a value
        chartSeries.AddItem(c, "Enquiries");
from the code above I have executes a stored procedure retruned as a DataTable and I am then counting the number of rows in the table.  I need this value to be in the graph data. I have tried Convert.ToDouble(c), I am using VS 2010.  Can someone shed any light on what I have done wrong?

Many thanks

Simon
Simon
Top achievements
Rank 1
 answered on 20 May 2011
3 answers
111 views

Hello,

Imagine two tables, each with two columns.

Operations
 UserId
 StartedBy

 

Users 
 Id 
 UserName

Operations.UserId is a FK to Users.Id. All columns are integers.

This works:

<telerik:GridDropDownColumn 
    DataField="UserId" 
    DataSourceID="UsersDataSource" 
    HeaderText="UserId"
    ListTextField="UserName" 
    ListValueField="Id"  
    UniqueName="UserId">
</telerik:GridDropDownColumn>

 

This doesn't:

<telerik:GridDropDownColumn 
    DataField="StartedBy" 
    DataSourceID="UsersDataSource" 
    HeaderText="Started By"
    ListTextField="UserName" 
    ListValueField="Id"  
    UniqueName="StartedBy">
</telerik:GridDropDownColumn>

Here's the DataSource:

<asp:EntityDataSource 
    ID="UsersDataSource" 
    runat="server" 
    ConnectionString="name=MyEntities" 
    DefaultContainerName="MyEntities" 
    EnableFlattening="False" 
    EntitySetName="Users" 
    EntityTypeFilter="User" 
    OrderBy="it.[UserName]">
</asp:EntityDataSource>

I know the UserId works because it is a foreign key but the second "StartedBy" is just a normal Int32 column in the Db that I have no control over (i.e. no relationship is or will be defined).

Normally, I'd just shrug and roll some code-behind but I'd much rather solve this in the declarative manner.

What is the simplest way I can get my StartedBy dropdown to bind via the value recorded in Operations.StartedBy?

 
Richard

Mira
Telerik team
 answered on 20 May 2011
4 answers
259 views

hi all

i have a little problem with radlistbox, already i add items from a radcombobox, this function run correctly, but radlistbox accept repeated items, i want to know how i can validate with client side code if items on list do repeated before to add new item

thanks in advance for read this thread and for all answers

Regards!

arturo
Top achievements
Rank 1
 answered on 20 May 2011
5 answers
134 views
The latest controls build seems to break the old solution to the 100% height update panel issue (that of finding the update panel id server-side and setting its height explicitly cliient-side). This breakage is no big deal since I'd like to switch to using the relatively new UpdatePanelHeight property instead of the old hack. However, I have run into an issue. I have a MasterPAge and Contentpage and the latter has two Content Areas. Various controls in each Content are need to ajaxify eachother.

1) I'd like to place an AjaxManagerProxy declaration on the ContentPage so I can make use of the UpdatePanelHeight property, however, I'm not sure how to reference controls in the two contentAreas in the AjaxSettings.
 
2) OR, I can also set the ajaxSettings server-side, but then I don't know how to set the UpdatePanelHeight property.

Can someone let me know how to do either of these.. though #1 is preferrable.

P.S., it would be nice if you could extend the AddAjaxSetting Method to include a parameter for the UpdatePanelHeight.
Tsvetina
Telerik team
 answered on 20 May 2011
2 answers
120 views
Hi,

Can anyone please help me with an example to bind a chart in the runtime using code behind?
I have stored procedures and .Net class files, with Datatable as output, ready with me.

I need a simple example to bind the chart with these classes' objects in the c# file.

Thanks...
Simon
Top achievements
Rank 1
 answered on 20 May 2011
3 answers
118 views
Simple situation.

In the web page:

<telerik:RadWindowManager ID="RWMan" runat="server">

 

   <Windows>

 

    <telerik:RadWindow ID="RWITaskView" runat="server" Width="400" Height="200" BorderColor="Blue"

 

      DestroyOnClose="true" VisibleTitlebar="true" VisibleStatusbar="false"
 
     NavigateUrl ="MemberITaskView.aspx"

 

      VisibleOnPageLoad="false" AutoSize="true" AutoSizeBehaviors="Height, Width"
      KeepInScreenBounds
="false" Behaviors ="Close,Move"

 

      EnableShadow="true" EnableEmbeddedSkins ="false">

 

    </telerik:RadWindow >

 

    <telerik:RadWindow ID="RWITaskEdit" runat="server" Width="400" Height ="200"

 

      DestroyOnClose="true" VisibleTitlebar="true" VisibleStatusbar="false"
      NavigateUrl
="MemberITaskEdit.aspx"

 

      VisibleOnPageLoad="false" AutoSize="true" AutoSizeBehaviors="Height, Width"
      KeepInScreenBounds
="false" Behaviors ="Close,Move"

 

      EnableShadow="true" EnableEmbeddedSkins ="false">

 

    </telerik:RadWindow >

 

  </Windows >

 

</telerik:RadWindowManager >


In databind event for a grid:

 

 

(e.Item.Cells[ViewPos].Controls[1]

 

as HyperLink).Attributes["onclick"] = "ShowITaskView('" + ky + "');" ;

 

 

 

 

 
In webpage script:

 

 

function ShowITaskView(id) {  

 

var Wnd = radopen("MemberITaskView.aspx?itid=" + id, "RWITaskView" );

 

 

 

 

 return false  

 

 

}

 

 

PROBLEM:
1. On the first click on a hyperlink in the RadGrid control,
    The autosize and everything works fine EXCEPT that the title bar and boundaries have opacity 0 somehow
2. On subsequent clicks on hyperlinks in same or other rows,
    Autosize and everything does NOT work, AND the title bar and boundaries are normal.

See the two screen shots.

Any ideas?

Thanks.

Svetlina Anati
Telerik team
 answered on 20 May 2011
5 answers
119 views
Hi,

     i am using rad scheduler in my application. i want to increase the appointment size based on number of appointment.
if only one appointment is available for a day that appoint ment region should be big. 
please refer my screen shot which i attached.
Peter
Telerik team
 answered on 20 May 2011
2 answers
71 views
Is there a way to define a hierarchy grid, but when I expand a particular row (too see its nested item) to hide all the cells in that row?

Something like here: http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/declarativerelations/defaultcs.aspx
But when the first row is expanded and I see the inner grid, I want to have the cells that contain: "ALFKI", "Maria Anders" and "Alfreds Futterkiste" hidden. And when I collapse the first row to have that cells displayed.

If there is no way to do that feel free to offer another solution.

Thanks,
Kamen
Kamen
Top achievements
Rank 1
 answered on 20 May 2011
3 answers
136 views
hi,
iam using radscheduler with Entity DataSource iam encountered with following errors.

1).Item has already been added. Key in dictionary: 'Reminder' Key being added
this error is only getting  when iam using Entity Data source 

2).when using Customized Advance Form Template(given Example) iam able to get  the given user control values i.e boolean attribute.ascx,ResourceControl.ascx,MultipleResourcevalues.ascx   values but unable to set them ...when trying to set them....iam getting :"object referrence  not set to an instance "Error ...
iam not using provider using entity datasource  and SQldatasource... 
 iam annoying with these problems from so many days... 
Hope i will get  solution for those problems as soon as possible ....


thanking you 
Rajesh 
Veronica
Telerik team
 answered on 20 May 2011
3 answers
125 views
I've got a radgrid in a dnn module/user control and I want to add exporting to pdf. The module is ajax enable via dnn and I'm pretty sure my problem is related to not doing a full postback. Nothing happens when you click the export to pdf button. I'm trying to register the export to pdf button to postback on the page load with no luck. For some reason I can't find the control.

Any help is appreciated, thanks.
protected void Page_Load(System.Object sender, System.EventArgs e)
{
    RadGrid InventoryGrid = (RadGrid)InventoryRadGrid;
    Control pdfExportButton = (Control)InventoryRadGrid.MasterTableView.FindControl("ExportToPdfButton");
    if (pdfExportButton != null)
        ScriptManager.GetCurrent(Page).RegisterPostBackControl(pdfExportButton);
    else messageLabel.Text = "Export to PDF Control Not Found";
    if (!IsPostBack)
    {
    }
}

Daniel
Telerik team
 answered on 20 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?