Telerik Forums
UI for ASP.NET AJAX Forum
11 answers
322 views
Please, I  am new in telerik. I am excited to learn this framework.

I would like to know how to add a custom save button  to RadWindow (on the Titlebar)

I have a userControl which contain a radgrid. To add new item on the radGrid, I use onColumnClick event to open a radwindow. On the radwindow, I want to add button save on the titlebar.

Is it possible?

Please, I need your help

Thank you in advance
Hiba
Top achievements
Rank 1
 answered on 03 Apr 2014
1 answer
159 views
I have a radgrid with CommandItemTemplate that contains tooltip,
inside tooltip i've a raddatepicker.

how to access this raddatepicker control from itemcommand event ?

aspx code :
<CommandItemTemplate>
                  <asp:LinkButton runat="server" ID="SaveTableLB" Visible="false">Save</asp:LinkButton>
                    <telerik:RadToolTip runat="server" ID="SaveToolTip" TargetControlID="SaveTableLB" ShowEvent="OnClick" HideEvent="ManualClose">
                     date: <telerik:RadDatePicker runat="server" ID="DateTable" ></telerik:RadDatePicker>
                         <asp:LinkButton runat="server" ID="SaveNewTable" CommandName="SaveTable" >Save </asp:LinkButton>
                      </telerik:RadToolTip>
              </CommandItemTemplate>


aspx.cs code :
foreach (GridDataItem di in TableGrid.Items)
          {
 
              RadTextBox degreeValueTxt = (RadTextBox)(di.FindControl("degreeValueTxt"));
              string degreeValue = degreeValueTxt.Text;
             .......... 
            // how to access radadatepicker from here
     
          }


Princy
Top achievements
Rank 2
 answered on 03 Apr 2014
1 answer
108 views
Hello,

I am dynamically adding a GridTemplateColumn to a radgrid but the problem is that on each postback a new empty column is added to the grid with header "Action". Any help?

 protected void Page_Init(object sender, EventArgs e)
        {
   
              var col = this.requestGrid.MasterTableView.Columns.FindByUniqueNameSafe("ActionId");
               
                GridTemplateColumn actionColumn = new GridTemplateColumn();
                this.requestGrid.MasterTableView.Columns.Add(actionColumn);
                actionColumn.ItemTemplate = new ActionTemplate("actionID");                                
                actionColumn.DataField = "ActionID";                
                actionColumn.HeaderText = "Action";
        }
Shinu
Top achievements
Rank 2
 answered on 03 Apr 2014
8 answers
174 views

Hi,

Scenario:
1. Set to the editor the "<ul><li>1</li><li>2</li><li>3</li></ul>" value in the HTML mode.
2. Place the cursor exact after the second element of the list in the Design mode.
3. Click the Indent button.
4. Choose again the HTML mode.

Result:
<ul>
    <li>1</li>
    <ul>
        <li>2</li>
    </ul>
    <li>3</li>
</ul>

It is invalid HTML as the ul tag may contain only the il child tags.  

Expected result:
<ul>
    <li>1</li>
    <li>
      <ul>
        <li>2</li>
      </ul>
    </li>
    <li>3</li>
</ul>

or 

<ul>
    <li>1
       <ul>
         <li>2</li>
       </ul>
    </li>
    <li>3</li>
</ul>


Do you have a workaround for the issue? 

Thanks,
Ivan
Ianko
Telerik team
 answered on 03 Apr 2014
1 answer
74 views
We were using this code to set a value in the editor from a custom dialog:

Telerik.Web.UI.Editor.CommandList["BackgroundImage"] = function (commandName, editor, commandArgs) {
        var argument = Telerik.Web.UI.Editor.CommandList._getLinkArgument(editor);
        Telerik.Web.UI.Editor.CommandList._getDialogArguments(argument, "A", editor, commandName);
        var callbackFunction = Telerik.Web.UI.Editor.CommandList.getCallbackFunction(commandArgs, function (sender, args) {
            if (!args) {
                //alert("No args!");
                return false;
            }
 
            var selectedItem = args.get_value();
 
            var path = args.value.getAttribute("src", 2);
            var style = editor.get_contentArea().style;
            style.backgroundImage = 'url(' + path + ')';
            document.getElementById('<%=hdnBackgroundImage.ClientID %>').value = path;
 
        });
        editor.showDialog("backgroundImageManager", argument, callbackFunction);
        return false;
    };

We upgraded to the latest Rad tools and now get an error on "args.value.getAttribute is not a function".

What can we change to get that path value from the dialog?
Ianko
Telerik team
 answered on 03 Apr 2014
3 answers
211 views
Hi All

I've a radgrid displaying a list of customers. In the grid, I have a command button that's supposed to open a popup editor to add new customers. For some reason, the popup does not open. It shows a small flicker and nothing happens. Strangely enough, if I go into the database, manually add a customer record and refresh the grid, I'm able to open the editor.

Any help is most welcome!

Here is the grid definition in my ascx:
========================================
<telerik:RadGrid ID="CustomerList" runat="server"
    GroupingEnabled="False" ShowStatusBar="True" OnPreRender="CustomerList_PreRender"
    DataSourceID="CustomerDataSource"
    OnItemCommand="CustomerList_ItemCommand" OnItemDataBound="CustomerList_ItemDataBound"
    OnInsertCommand="CustomerList_InsertCommand" OnItemInserted="CustomerList_ItemInserted"
    OnItemEvent="CustomerList_ItemEvent" >
 
    <MasterTableView DataKeyNames="CustomerId" DataSourceID="CustomerDataSource" 
        AllowPaging="true" AutoGenerateColumns="False"
        GridLines="None" EditMode="PopUp" ShowFooter="True"
        InsertItemDisplay="Bottom" CommandItemDisplay="TopAndBottom" >
        <CommandItemSettings  AddNewRecordText="Add Customer" />
        <Columns>
            <telerik:GridBoundColumn DataField="CustomerId" DataType="System.Int32" FilterControlAltText="Filter CustomerId column" HeaderText="CustomerId" ReadOnly="True" SortExpression="CustomerId" UniqueName="CustomerId">
                <ColumnValidationSettings>
                    <ModelErrorMessage Text="" />
                </ColumnValidationSettings>
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="CustomerName" FilterControlAltText="Filter CustomerName column" HeaderText="CustomerName" SortExpression="CustomerName" UniqueName="CustomerName">
                <ColumnValidationSettings>
                    <ModelErrorMessage Text="" />
                </ColumnValidationSettings>
            </telerik:GridBoundColumn>
 
 
            <telerik:GridEditCommandColumn UniqueName="EditCommandColumn">
                <ItemStyle Width="20px" Font-Underline="true" />
            </telerik:GridEditCommandColumn>
 
        </Columns>
        <NoRecordsTemplate>
            No customers have been created yet.
        </NoRecordsTemplate>
        <EditFormSettings EditFormType="WebUserControl" CaptionDataField="CustomerName"
            UserControlName="~/UserControls/CustomerEditor.ascx"
            >
            <EditColumn UniqueName="EditCommandColumn" HeaderButtonType="TextButton">
            </EditColumn>
            <PopUpSettings ScrollBars="None" Width="581"/>
        </EditFormSettings>
        <PagerStyle Mode="NextPrevAndNumeric" Position="Bottom" />
    </MasterTableView>
</telerik:RadGrid>
Viktor Tachev
Telerik team
 answered on 03 Apr 2014
1 answer
80 views
Hi All,
I am completely new to AJAX.
This is the first program I have come across and I must say I am confused..

Few of my queries are below:

I wrote below code in a notepad and saved as html. But I don't know where to place the "ajax_info.txt" file. It dint work when I placed it in the same folder as the .html file
Also I don't understand and which response are we collecting through xmlhttp.responseText. Because its only on the next line (xmlhttp.open("GET","ajax_info.txt",true) that we actually mention the url/path to which we are trying to connect. So whom are we trying to get response from in : xmlhttp.open("GET","ajax_info.txt",true

I know its tooooo basic but just cant get a hold of it.



<!DOCTYPE html>
<html>
<head>
<script>
function loadXMLDoc()
{
var xmlhttp;
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById("myDiv").innerHTML=xmlhttp.responseText;
    }
  }
xmlhttp.open("GET","ajax_info.txt",true);
xmlhttp.send();
}
</script>
</head>
<body><div id="myDiv"><h2>Let AJAX change this text</h2></div>
<button type="button" onclick="loadXMLDoc()">Change Content</button></body>
</html>
Konstantin Dikov
Telerik team
 answered on 03 Apr 2014
6 answers
205 views
I have a master page with many pages and usercontrols.

I have made great use of RadAjaxManager & proxies on my pages and user controls, however, there are a few events in the master page itself.  Since we can only have a single RadAjaxManager on a given rendered page, I cannot place a RadAjaxManager on the master page or I will have to move up all the RadAjaxManager and the OnAjaxRequest events up as well, which is not doable.  Further, the OnAjaxRequest needs to be placed in the Manager and not the proxy, which further makes moving to a single manager on the master page not achievable.

How can I leverage a RadAjaxLoadingPanel on the master page for it's events based on this scenario

Thanks in advance 
Daniel
Top achievements
Rank 1
 answered on 03 Apr 2014
0 answers
90 views
Hi
I use DataAccess 2014 in my project. In Controller everythning is ok but when I want show data in view I get this error:

Compiler Error Message: CS0012: The type 'Telerik.OpenAccess.SPI.dataobjects.PersistenceCapable' is defined in an assembly that is not referenced. You must add a reference to assembly 'Telerik.OpenAccess, Version=2014.1.225.2, Culture=neutral, PublicKeyToken=######'.

I added <assemblies> in web.config but can't solve my problem.
Saeid
Top achievements
Rank 1
 asked on 03 Apr 2014
1 answer
208 views
I have a radcombobox CheckBoxes="True" and AutoPostBack="True" because I need server side code to execute after the user makes her selections. However, the postback is occurring every time a user checks a box and then it closes the combobox. The user wants the combobox to stay open and I don't want the postback to occur until the user is finished and clicks off of the combobox. I am experimenting with using the combobox's OnClientBlur event and then doing a postback like this:                 __doPostBack(objName, "ItemChecked"); But I'm struggling to get it to work and not confident that's the right path.
Princy
Top achievements
Rank 2
 answered on 03 Apr 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?