Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
159 views
I have a master page with an AJAXManager on it, then in a contents page I have a RadManagerProxy

<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server"> 
    <AjaxSettings> 
        <telerik:AjaxSetting AjaxControlID="RadGridSecondaryCategories"> 
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="RadGridSecondaryCategories"  
                    LoadingPanelID="RadAjaxLoadingPanel1" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
    </AjaxSettings> 
</telerik:RadAjaxManagerProxy> 

I then have some javascript that initiates an ajax request, but when I load the page I get this compiler error

Compiler Error Message: CS0104: 'RadAjaxManager' is an ambiguous reference between 'Telerik.WebControls.RadAjaxManager' and 'Telerik.Web.UI.RadAjaxManager' 
 
Source Error: 
 
  
 
Line 107:                 
Line 108:                if (!arg) { 
Line 109:                    $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("SubCategoryRebind"); 
Line 110:                } 
Line 111:                else { 

Both the RADManager and RadProxy are asp.net AJAX versions, so why am I getting this error ?
Missing User
 answered on 22 Oct 2008
1 answer
91 views
I have a page containing a copy the following demo;

http://demos.telerik.com/ASPNET/Prometheus/TreeView/Examples/Functionality/CheckBoxes/DefaultCS.aspx

This works fine, only after adding the formdecorator control to my form the CheckChildNodes property stays unchanged after postback.

Are those controls not compatible or is there a way to fix this?


Georgi Tunev
Telerik team
 answered on 22 Oct 2008
1 answer
104 views
Is there a client event that gets fired when an item gets focus or when the row changes?  I'm not referring to events tied to mouse clicks but rather to keyboard use (e.g., tabbing from textbox to textbox).  I want to update a label on the webpage as the cursor moves from field to field.
Missing User
 answered on 22 Oct 2008
2 answers
294 views
Hello,

I have an ASP.NET application written in C# in which I have a RadDatePicker object on the form.  When the user selects a particular menu option the resulting function should get the date from the DatePicker, and pass that date in the URL to the next screen, which is invoked using the RadWindow component.

The problem is that the date being passed contains the following:

"Fri Oct 17 00:00:00 EDT 2008"

This cannot be converted to a DateTime object correctly.

The code within my RadCodeBlock is as follows:

<telerik:RadCodeBlock ID="cb1" runat="server">
    <script language="javascript" type="text/javascript">
         function DisplayStatistics() {
            var picker = $find("<%= RadDatePicker1.ClientID %>");
            var selectedDate = picker.get_selectedDate();
            var oManager = GetRadWindowManager();
            var oWnd = oManager.open("./TradeBlotterStats.aspx?ID=" + selectedDate, "rwBlotterStatistics");
        }
    </script>        
</telerik:RadCodeBlock>

Thanks in advance for any help you can provide,

David Nowak.
Shinu
Top achievements
Rank 2
 answered on 22 Oct 2008
1 answer
108 views
Hi All,

I just have an issue with the RadWindow not opening ffrom a linkbutton inside a datagrid, here is the HTML:
 

<

 

radG:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" EnableAJAX="True"  GridLines="None" Skin="Blue">

 

 

<MasterTableView>

 

 

<Columns>

 

 

<radG:GridTemplateColumn UniqueName="TemplateColumn">

 

 

<ItemTemplate>

 

 

<asp:LinkButton ID="btnViewCard" runat="server" OnClick="OpenCard">Show Card</asp:LinkButton>

 

 

</ItemTemplate>

 

 

</radG:GridTemplateColumn>

 

 

<radG:GridBoundColumn DataField="CardID" Display="False" HeaderText="CardID"

 

 

ReadOnly="True" UniqueName="CardID">

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn DataField="Sender" HeaderText="Sender" UniqueName="Sender" ReadOnly="True">

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn DataField="SenderPhone" HeaderText="Sender Phone" UniqueName="SenderPhone">

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn DataField="SenderEmail" HeaderText="Sender Email" UniqueName="SenderEmail">

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn DataField="PatientName" HeaderText="Patient Name" UniqueName="PatientName">

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn DataField="PatientRoom" HeaderText="Patient Room" UniqueName="PatientRoom">

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn DataField="HospitalName" HeaderText="Hospital Name" UniqueName="HospitalName">

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn DataField="Message" HeaderText="Message" UniqueName="Message">

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn DataField="SubmitDate" HeaderText="Submit Date" UniqueName="SubmitDate">

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn DataField="Notes" HeaderText="Notes" UniqueName="Notes">

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn DataField="imgURL" HeaderText="imgURL" UniqueName="imgURL" Display="False">

 

 

</radG:GridBoundColumn>

 

 

</Columns>

 

 

<RowIndicatorColumn Visible="False">

 

 

<HeaderStyle Width="20px" />

 

 

</RowIndicatorColumn>

 

 

<ExpandCollapseColumn Visible="False">

 

 

<HeaderStyle Width="19px" />

 

 

</ExpandCollapseColumn>

 

 

</MasterTableView>

 

 

</radG:RadGrid>

And here is the vb.net:
Protected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As Telerik.WebControls.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource

 

 

Dim getDS As New DataSet

 

 getDS = dataConn.GetAllNewCards()

RadGrid1.DataSource = getDS.Tables(0).DefaultView

 

End Sub

 

 

 

Public Sub OpenCard(ByVal sender As Object, ByVal e As System.EventArgs)

 

 RadWindow1.VisibleOnPageLoad =

True

 

 

 

RadWindow1.NavigateUrl = "CardEditor.aspx"

 

 

 

End Sub

 

 

What am I doing wrong,

 

 

Thank,
Shehab

 

Princy
Top achievements
Rank 2
 answered on 22 Oct 2008
3 answers
193 views
Hi,
Iam trying to include the add,edit and delete functionality using the CommandItemItemplate to all the Details Table view in a hierachial grid.
SO I create the CommandItemTemplate class extending from ITemplate and set the commandItemTemplate property during the creation of each level.

But Iam not able to see the CommandItemTemplate on the child table grids..
Only the one set during design tiimje for mastertableview is visisble.

Below is the code with jsut the Delete Command

private

class ProductCommandItemTemplate : ITemplate

 

{

 

protected LinkButton deleteButton;

 

 

public ProductCommandItemTemplate()

 

{

deleteButton =

new LinkButton();

 

}

 

public void InstantiateIn(Control container)

 

{

deleteButton =

new LinkButton();

 

deleteButton.ID =

"deleteButton";

 

deleteButton.Text =

"Delete record";

 

deleteButton.CommandName =

"InitDelete";

 

container.Controls.Add(deleteButton);

}

 

}




private

void CreateHierarchyTableTemplates(int noOfLevels)

 

{

 

GridTableView parentTableView = radGridProducts.MasterTableView;

 

parentTableView.DetailTables.Clear();

 

for (int i = 0; i < noOfLevels; i++)

 

{

 

GridTableView newParentTableView = CreateProductChildGrid(parentTableView);

 

parentTableView = newParentTableView;

}

}

 

private GridTableView CreateProductChildGrid(GridTableView parentGridTableView)

 

{

 

GridTableView tableViewChildProduct = new GridTableView(radGridProducts);

 

parentGridTableView.DetailTables.Add(tableViewChildProduct);

tableViewChildProduct.DataSource =

new List<InstrProduct>();

 

AddProductChildGridAttributes(tableViewChildProduct);

tableViewChildProduct.EnableColumnsViewState =

true;

 

 

return tableViewChildProduct;

 

}

 

private void AddProductChildGridAttributes(GridTableView tableViewChildProduct)

 

{

tableViewChildProduct.PageSize = 100;

tableViewChildProduct.Width =

Unit.Percentage(100);

 

tableViewChildProduct.SkinID =

"Office2007";

 

tableViewChildProduct.AutoGenerateColumns =

false;

 

tableViewChildProduct.AllowPaging =

true;

 

tableViewChildProduct.EnableViewState =

true;

 

tableViewChildProduct.HierarchyLoadMode =

GridChildLoadMode.ServerOnDemand;

 

tableViewChildProduct.BorderColor =

Color.Blue;

 

tableViewChildProduct.PagerStyle.AlwaysVisible =

true;

 

tableViewChildProduct.PagerStyle.Position =

GridPagerPosition.TopAndBottom;

 

AddProductChildGridBoundColumns(tableViewChildProduct);

tableViewChildProduct.EnableColumnsViewState =

true;

 

tableViewChildProduct.AllowAutomaticDeletes =

true;

 

tableViewChildProduct.CommandItemTemplate =

new ProductCommandItemTemplate();

 

}

 

private void AddProductChildGridBoundColumns(GridTableView tableViewChildProduct)

 

{

 

GridClientDeleteColumn col1 = new GridClientDeleteColumn();

 

tableViewChildProduct.Columns.Add(col1);

col1.ConfirmText =

"Delete this product?";

 

col1.ButtonType =

GridButtonColumnType.ImageButton;

 

col1.ImageUrl =

"../images/Delete.gif";

 

col1.CommandName =

"Delete";

 

col1.UniqueName =

"DeleteColumn";

 

 

GridClientSelectColumn col2 = new GridClientSelectColumn();

 

tableViewChildProduct.Columns.Add(col2);

 

GridBoundColumn col3 = new GridBoundColumn();

 

tableViewChildProduct.Columns.Add(col3);

col3.DataField =

"Tag";

 

col3.UniqueName = tableViewChildProduct.Name +

"_colTag";

 

col3.HeaderText =

"Tag";

 

 

GridBoundColumn col4 = new GridBoundColumn();

 

tableViewChildProduct.Columns.Add(col4);

col4.DataField =

"ShortDescription";

 

col4.UniqueName = tableViewChildProduct.Name +

"_colShortDescription";

 

col4.HeaderText =

"Short Description";

 

 

GridBoundColumn col5 = new GridBoundColumn();

 

tableViewChildProduct.Columns.Add(col5);

col5.DataField =

"LongDescription";

 

col5.UniqueName = tableViewChildProduct.Name +

"_colLongDescription";

 

col5.HeaderText =

"Long Description";

 

 

 

GridHyperLinkColumn col6 = new GridHyperLinkColumn();

 

tableViewChildProduct.Columns.Add(col6);

col6.UniqueName = tableViewChildProduct.Name +

"_colCharacteristics2";

 

col6.HeaderText =

"Characteristics";

 

col6.DataNavigateUrlFormatString =

"javascript:ShowEditForm('{0}');";

 

col6.DataNavigateUrlFields =

new string[] { "Id" };

 

col6.Text =

"View";

 

}



protected

void Page_Load(object sender, EventArgs e)

 

{

 

if (!this.IsPostBack)

 

{

 

int noOfproductLevels = _presenter.GetNoOfProductLevels();

 

radGridProducts.MasterTableView.Width =

Unit.Percentage(100);

 

radGridProducts.MasterTableView.DataKeyNames =

new String[] { "Tag", "ParentTag", "Id" };

 

CreateHierarchyTableTemplates(noOfproductLevels);

}

 

}


We just create the child tables dynamically

 

Sebastian
Telerik team
 answered on 22 Oct 2008
5 answers
79 views
Hello

I was wondering if you could help me - I've got a really strange problem that I haven't had before with the same version of Rad Controls.

When I add the script manager to my master page, I start to get three javascript errors:

http://cardealeroldham.autofantastic.co.uk/

I've no idea how or why this is happening - can anybody shed any light?

Many thanks in advance for your help    

Darren

P.S. Please excuse the site, it is very much work in progress!!!!!!!
Paul
Telerik team
 answered on 22 Oct 2008
4 answers
124 views
Hi,

I have a treeview with Radcontextmenu, and itemplate contains other control..., when i make button_click that is a button into a itemplate.., i can't accessing control into itemplate..for example for set visible = false the controls that are inside the itemplate..
Shinu
Top achievements
Rank 2
 answered on 22 Oct 2008
7 answers
216 views
Hi,

How can I trap/catch an unknown upload failure on client side and display custom error message/feedback to the user?

I'm using RadUpload And RadProgressArea controls. I display progress bars.
I don't have exact error details, but I remember when an upload failed, a huge javascript alert box was displayed with all technical jargons.
I want to catch that and display custom/user-friendly error message to user.

We can assume we are talking about timeout. I know I can set the maxrequestlength and session time limit in web config.

Thanks,
Chirag
Veselin Vasilev
Telerik team
 answered on 22 Oct 2008
2 answers
203 views
Hello,
I am using codebehind to add items to the chart because I can't make it group the items the way I want it to when using a LINQ query. I attempted to use your "Dynamic Databinding" example on the website to try and help me accomplish what I need to but found it utterly confusing (would be nice if you would comment your examples).

Anyway, my chart has 2 series - 1 for open orders and 1 for in progress. The chart works fine in the aspect of displaying bars however I would like to see the customer names below the bars on the X axis and I can't for the life of me figure out how to do this. I tried using ChartAxisItem and adding to the collection but it doesn't do anything.

Please help.

My grid aspx code:
    <telerik:RadChart ID="rcOrders" runat="server" Skin="LightBlue"  
        Width="710px" SeriesOrientation="Vertical" AutoLayout="false"> 
        <Series> 
            <telerik:ChartSeries Name="Open"> 
            </telerik:ChartSeries> 
        </Series> 
        <Series> 
            <telerik:ChartSeries Name="WIP"> 
            </telerik:ChartSeries> 
        </Series> 
        <PlotArea> 
            <XAxis> 
                <AxisLabel> 
                    <Appearance RotationAngle="270"> 
                    </Appearance> 
                </AxisLabel> 
            </XAxis> 
            <YAxis> 
                <AxisLabel> 
                    <Appearance RotationAngle="0"> 
                    </Appearance> 
                </AxisLabel> 
            </YAxis> 
            <YAxis2> 
                <AxisLabel> 
                    <Appearance RotationAngle="0"> 
                    </Appearance> 
                </AxisLabel> 
            </YAxis2> 
        </PlotArea> 
        <ChartTitle TextBlock-Visible="false"></ChartTitle> 
    </telerik:RadChart> 

My codebehind code which adds the values to the chart:
var orderStatusesByCompanyQuery = from o in database.Orders 
                                  join c in database.Companies on o.CompanyId equals c.CompanyId 
                                  join os in database.OrderStatuses on o.StatusId equals os.StatusId 
                                  where o.Active == true && c.Active == true && os.Active == true && os.StatusId != 3 
                                  group o 
                                    by new { CompanyId = o.CompanyId, CompanyName = c.ShortDisplayName, StatusId = os.StatusId, StatusDisplayName = os.ShortDisplayName } 
                                    into grouping 
                                  orderby grouping.Key.CompanyName 
                                  select new 
                                  { 
                                      CompanyId = grouping.Key.CompanyId, 
                                      CompanyName = grouping.Key.CompanyName, 
                                      StatusId = grouping.Key.StatusId, 
                                      StatusDisplayName = grouping.Key.StatusDisplayName, 
                                      StatusCount = grouping.Count() 
                                  }; 
 
foreach (var orderStatusByCompany in orderStatusesByCompanyQuery) 
{ 
    // adding this ChartAxisItem does nothing 
    ChartAxisItem chartAxisItem = new ChartAxisItem(); 
    chartAxisItem.Value = orderStatusByCompany.CompanyId; 
    chartAxisItem.TextBlock.Text = orderStatusByCompany.CompanyName; 
    rcOrders.PlotArea.XAxis.Items.Add(chartAxisItem); 
 
    ChartSeriesItem chartSeriesItem = new ChartSeriesItem(); 
    chartSeriesItem.Label.TextBlock.Text = orderStatusByCompany.StatusCount.ToString(); 
    chartSeriesItem.XValue = orderStatusByCompany.CompanyId; 
    chartSeriesItem.XValue2 = orderStatusByCompany.StatusId; 
    chartSeriesItem.YValue = orderStatusByCompany.StatusCount; 
    rcOrders.Series.GetByName(orderStatusByCompany.StatusDisplayName).Items.Add(chartSeriesItem); 
} 
Nate Pinchot
Top achievements
Rank 1
 answered on 22 Oct 2008
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?