Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
101 views
Hi,
Is it possible to display a tree view inside a raddropdown list?

Thank you,
Ben
Princy
Top achievements
Rank 2
 answered on 15 Mar 2013
1 answer
113 views
Hi, I was wondering how I could use one grid, or maybe some master/detail grid to update/insert records from four tables at once.

Here are the four tables:
Users
Roles
Permissions
Accounts

Those are all related and need to all have records for the app to work.

I was hoping that this already has been done, and that there is a nice way to achieve that.

Thank you for your help.
Shinu
Top achievements
Rank 2
 answered on 15 Mar 2013
1 answer
82 views
HI,


    i have the date format like 2/8/2013 from this i want only 8 how can i get it.
    that means i want to get particular part from the date format.




 Thanking You,
 P.Mugil
Princy
Top achievements
Rank 2
 answered on 15 Mar 2013
2 answers
200 views
Hi,

I have the need to make a combobox witth a treeview in it, and have looked at the example given in the live samples.
However the samples use a hardcoded id when referencing the combobox in the NodeClicking handler.

function nodeClicking(sender, args)
{
            var comboBox = $find('RadComboBox1');
            var node = args.get_node()
            
            comboBox.set_text(node.get_text());
            
            comboBox.hideDropDown();
}

This is not usable for a real world control as one might want multiple such controls on the same page.
So I need to be able to send the nodeClicking handler the id of the combobox, so that I can register the javascript on the page once.

Thanks in advance,
Thomas Scheelhardt
msigman
Top achievements
Rank 2
 answered on 15 Mar 2013
6 answers
182 views
Here is my scenario:

 - The user is on an order page - enters a new order
 - Upon completion, a RadWindow is displayed confirming your order was entered
 - From this first RadWindow you can click on a button to apply payment
 - This opens a second RadWindow which asks for Payment Information
 - If you select to pay via Credit Card, this opens a third RadWindow to collect the CC details from an external site inside an iFrame

At this point all is good.

Now, when you are done processing the CC payment in the third RadWindow
, the processor's page fires a refresh target=_self, which ends up being the third RadWindow, appending a value to the query string to indicate that it has finished.  I then can read out some variables from Request.Params to see if the payment took, etc.

The Problem:

When I first open the RadWindow, I can call the GetRadWindow() function and I get the reference to the Third RadWindow.  BUT when the processor page (which is in an iFrame) refreshes the RadWindow --  GetRadWindow() goes null.  This is a problem, because now I cannot close the Window!  

Any ideas on how to persist or re-initiate the RadWindow object so that I can close my popup? 

John
Top achievements
Rank 1
 answered on 15 Mar 2013
4 answers
270 views
Hello,

I have a RadGrid, used for data entry that has a DatePicker column and a TimePicker column, each having the associated icon to click for the correct pop-up Picker.  There are several rows, so that the grid has to be scrolled vertically on occasion. When this is the case, the calendar and clock icons do not scroll correctly in IE6. See attached images of the grid scrolled up and scrolled down.

I am using the latest version of the ASP.NET AJAX controls: 2013.1.220.40

I have seen some older forum threads mention similar problems can be fixed by adding "position: relative" to the style of the container of the problem elements.  The icons are in RadGrid generated table cells with no class definition (second td in code below), so I'm not sure how to add the relative position style to that cell. I've tried setting position:relative for class rcCalPopup. I've tried setting position:relative for rcTable td. Neither worked. 

Could you please tell me how to fix the problem?
<table cellspacing="0" class="rcTable rcSingle" summary="Table holding date picker control for selection of dates." style="width:100%;">
                <caption style="display:none;">
                    RadDatePicker
                </caption><thead style="display:none;">
                    <tr>
                        <th scope="col"></th>
                    </tr>
                </thead><tbody>
                    <tr>
                        <td class="rcInputCell" style="width:100%;"><span id="ctl00_BC_G1_GD_ctl00_ctl06_RDIPDate_dateInput_wrapper" class="riSingle RadInput " style="display:block;width:100%;"><input id="ctl00_BC_G1_GD_ctl00_ctl06_RDIPDate_dateInput" name="ctl00$BC$G1$GD$ctl00$ctl06$RDIPDate$dateInput" class="riTextBox riEnabled" type="text" /><input id="ctl00_BC_G1_GD_ctl00_ctl06_RDIPDate_dateInput_ClientState" name="ctl00_BC_G1_GD_ctl00_ctl06_RDIPDate_dateInput_ClientState" type="hidden" /></span></td>
                        <td><a title="Open the calendar popup." href="#" id="ctl00_BC_G1_GD_ctl00_ctl06_RDIPDate_popupButton" class="rcCalPopup">Open the calendar popup.</a></td>
                    </tr>
                </tbody>
            </table>
Kya
Top achievements
Rank 1
 answered on 14 Mar 2013
4 answers
174 views
Hi all,

I have a RadGrid1_ItemCommand where at an e.CommandName == "PerformInsert" after inserting I use the e.Canceled = true to hide the insert template, but it nevers hide. What I'm doing wrong please. Here is the code. The update part does work and hides the <EditFormSettings EditFormType="Template">

protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
        {
            if (e.CommandName == "PerformInsert" || e.CommandName == "Update")
            {
                //some code block
                    if (Session["idSess"] == null)
                    {
                        objBz.Insert(objEntity);
                        e.Canceled = false;
                    }
                    else
                    {
                        objBz.Update(objEntity);
                        RadGrid1.MasterTableView.ClearEditItems();
                    }
            }

Rawl
Top achievements
Rank 1
 answered on 14 Mar 2013
5 answers
439 views
I have a grid which has the CarrierID specified as the "DataKeyNames" which is also an invisible property in the grid.

I have a hyperlink column that when clicked should pass the value of the CarrierNetID (the keyvalue for that dataitem) into my codebehind so I can then pass it to another page to bring up a record for editng based on that key value.

I'm having trouble getting the attached error:

My markup is as follows: You can see that the lnkPLMN is the hyperlink. Everything is coming out on the grid just fine, I just can't seem to pass the value.
<telerik:RadGrid ID="RadGrid1" DataSourceID="SqlDataSource1" ShowStatusBar="true"
        runat="server" AllowPaging="True" AllowSorting="True" AllowFilteringByColumn="True"
        AutoGenerateColumns="false" ClientSettings-Resizing-AllowColumnResize="true"
        DataKeyNames="CarrierNetID" OnItemDataBound="RadGrid_ItemDataBound">
        <MasterTableView PageSize="10" Width="100%">
            <Columns>
                <telerik:GridBoundColumn DataField="CarrierNetID" Visible="false" UniqueName="CarrierNetID" ItemStyle-HorizontalAlign="Left"
                    HeaderStyle-HorizontalAlign="Left">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Name" HeaderText="Carrier Name" UniqueName="Name"
                    SortExpression="Name" ReadOnly="true" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Region" HeaderText="Region" UniqueName="Region"
                    AllowFiltering="true" SortExpression="Region" ReadOnly="true" ItemStyle-HorizontalAlign="Left"
                    HeaderStyle-HorizontalAlign="Left">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Country" HeaderText="Country" UniqueName="Country"
                    SortExpression="Country" ReadOnly="true" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left">
                </telerik:GridBoundColumn>
                <telerik:GridTemplateColumn HeaderText="PLMN" UniqueName="PLMN">
                    <ItemTemplate>
                        <asp:HyperLink ID="lnkPLMN" runat="server" Target="_blank" ForeColor="Blue">
                        </asp:HyperLink>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridBoundColumn DataField="TechnologyTypeCode" HeaderText="Technology" UniqueName="TechnologyTypeCode"
                    SortExpression="TechnologyTypeCode" ReadOnly="true" ItemStyle-HorizontalAlign="Left"
                    HeaderStyle-HorizontalAlign="Left">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="SMSMORate" HeaderText="SSMSO Rate" UniqueName="SMSMORate"
                    AllowFiltering="false" SortExpression="SMSMORate" ReadOnly="true" ItemStyle-HorizontalAlign="Right"
                    HeaderStyle-HorizontalAlign="Right" DataFormatString="{0:G}">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="SMSMTRate" HeaderText="SMSMT Rate" UniqueName="SMSMTRate"
                    AllowFiltering="false" SortExpression="SMSMTRate" ReadOnly="true" ItemStyle-HorizontalAlign="Right"
                    HeaderStyle-HorizontalAlign="Right" DataFormatString="{0:G}">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="DataRate" HeaderText="Data Rate" UniqueName="DataRate"
                    AllowFiltering="false" SortExpression="DataRate" ReadOnly="true" ItemStyle-HorizontalAlign="Right"
                    HeaderStyle-HorizontalAlign="Right" DataFormatString="{0:G}">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="MOCRate" HeaderText="MOC Rate" UniqueName="MOCRate"
                    AllowFiltering="false" SortExpression="MOCRate" ReadOnly="true" ItemStyle-HorizontalAlign="Right"
                    HeaderStyle-HorizontalAlign="Right" DataFormatString="{0:G}">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="MTCRate" HeaderText="MTC Rate" UniqueName="MTCRate"
                    AllowFiltering="false" SortExpression="MTCRate" ReadOnly="true" ItemStyle-HorizontalAlign="Right"
                    HeaderStyle-HorizontalAlign="Right" DataFormatString="{0:G}">
                </telerik:GridBoundColumn>
                <telerik:GridCheckBoxColumn DataField="FlatRate" HeaderText="Flat Rate" UniqueName="FlatRate"
                    SortExpression="FlatRate" ReadOnly="true" ItemStyle-HorizontalAlign="Center"
                    HeaderStyle-HorizontalAlign="Center">
                </telerik:GridCheckBoxColumn>
                <telerik:GridCheckBoxColumn DataField="Discount" HeaderText="Discount" UniqueName="Discount"
                    SortExpression="Discount" ReadOnly="true" ItemStyle-HorizontalAlign="Center"
                    HeaderStyle-HorizontalAlign="Center">
                </telerik:GridCheckBoxColumn>
                <telerik:GridCheckBoxColumn DataField="ActiveFlag" HeaderText="Active" UniqueName="ActiveFlag"
                    SortExpression="ActiveFlag" ReadOnly="true" ItemStyle-HorizontalAlign="Center"
                    HeaderStyle-HorizontalAlign="Center">
                </telerik:GridCheckBoxColumn>
            </Columns>
        </MasterTableView>
        <ClientSettings EnableRowHoverStyle="true">
        </ClientSettings>
        <PagerStyle Mode="NumericPages"></PagerStyle>
    </telerik:RadGrid>


Here is my codebehind which gets the attached error on the following line:
HyperLink link = (HyperLink)item["PLMN"].Controls[0]; 


protected void RadGrid_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridDataItem)
        {
            GridDataItem item = (GridDataItem)e.Item;
            HyperLink link = (HyperLink)item["PLMN"].Controls[0];
            string value = item.GetDataKeyValue("CarrierNetID").ToString();
            link.NavigateUrl = "~/CarrierLaunchStatusForm.aspx?addRecord=0&ID=" + value;
        }
    }


Can someone please help?
Code behind:



Bill
Top achievements
Rank 2
 answered on 14 Mar 2013
1 answer
62 views
I am pretty new to the Telerik stuff (and ASP.net)... but from what I've read and seen I think what I want to do is possible... I just can't seem to make it work... 

Here is what I'm working with.. wthin my database I have a table with company information on various companies that we do business with... I also have another table for people that is basically a list of all of the people that we do business with at the various companies.  These two tables are joined together on a 1 to many relationship based on companyid.  In the companies table is a column for the primary contact.. which holds the personId of the person from the people table that is the primary contact for that company (pretty basic stuff... nothing fancy here)

What I would like to do is have a grid that list all of the companies... within that grid have a couple of columns that lists the primary contact's name and email address... and when I edit the company record, in the edit template, have a drop down list that is filtered to just show the people from the person table that are affiliated with the company record that I am editing, then when I update it, have it update the person ID of the primary contact for the company, but in the grid, update the grid row to show the new person's name and email address... 

I am stuck on the best way to accomplish this.. I hope someone can help... 

Thanks in advance.

And I almost forgot... in the drop down list in the edit template, I would like to show the people's names rather than just a personID.. 
Kostadin
Telerik team
 answered on 14 Mar 2013
1 answer
390 views

Iv'e seen examples of the telerik:AjaxSetting and telerik:RadAjaxLoadingPanel so I thought I would try it out in stead of using the standard Ajax update panel.

For the most part it works ok, even mixing it up with standard Ajax like collapse panels. I came across an issue where setting up a Control to be updated by its own onTextChanged Event,  I got a funky java script error. It doess't prevent the control form being updated it just throws an exception.

here is the tag in question:

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1" >
        <AjaxSettings>
  <telerik:AjaxSetting AjaxControlID="TextBox_capacity">
                <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="TextBox_capacity" />
                </UpdatedControls>
             </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />       </telerik:AjaxSetting>

I have others of course but this one throws the exception. Not Sure why. It works just fine once you click past the exception.
Line: 157
Error: Sys.ArgumentNullException: Value cannot be null.
Parameter name: panelsCreated[12]

And when  I debug:

$type.registerClass('Sys.WebForms.InitializeRequestEventArgs', Sys.CancelEventArgs);
$type = Sys.WebForms.PageLoadedEventArgs = function PageLoadedEventArgs(panelsUpdated, panelsCreated, dataItems) {
    /// <summary locid="M:J#Sys.WebForms.PageLoadedEventArgs.#ctor">The arguments for the PageRequestManager's pageLoaded event. The pageLoaded event is raised after the DOM has been updated.</summary>
    /// <param name="panelsUpdated" type="Array">An array of UpdatePanels that were updated.</param>
    /// <param name="panelsCreated" type="Array">An array of UpdatePanels that were created.</param>
    /// <param name="dataItems" type="Object" mayBeNull="true"></param>
    var e = Function._validateParams(arguments, [
        {name: "panelsUpdated", type: Array},
        {name: "panelsCreated", type: Array},
        {name: "dataItems", type: Object, mayBeNull: true}
    ]);
    if (e) throw e;
    Sys.WebForms.PageLoadedEventArgs.initializeBase(this);

    this._panelsUpdated = panelsUpdated;
    this._panelsCreated = panelsCreated;
    this._dataItems = dataItems || new Object();
}

I'm sure I'm missing something simple...........






Pablo
Top achievements
Rank 1
 answered on 14 Mar 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?