Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
178 views

Hi guys!

I have the following scenario .
[
I use RadControls for ASP.NET AJAX Q1 2012
Visual Studio 2010
C# & Asp
 
]

1 Aspx
5 User Controls
    UserControlCatalogo
    UserControlDetalle
    UserControlDetalleInterno1
    UserControlDetalleInterno2
    UserControlDetalleInterno3

The aspx page contains a call to " UserControlCatalogo " contains a RadGrid with this data, choose "edit " or "new " in this open RadGrid PopUp containing at UserControlDetalle .

The UserControlDetalle contains a set of RadTextBox and RadTabStrip ( tab panel ) which contains three tabs .

Tab 1 -> contains UserControlDetalleInterno1
Tab 2 -> contains UserControlDetalleInterno2
Tab 3 -> contains UserControlDetalleInterno3

UserControlDetalleInterno1 contains another RadGrid you want to do the following : By clicking on "new" or "edit " expands to display fields and add new data.

The problem is that when I use the "edit" or "new" function from radgrid, the template is not opened to fill data only "flashes" the popup and the table does nothing * in debuging enters the post back , refresh bd updates, the radgrid  datasourse * ... and ends ... * if I remove "ObtenerDatos", the table does not appear *

i cant add or edit my radgrid items :C

UserControlDetalleInterno1 ASPCode (yes, other name)
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="OrdenServicioCU.ascx.cs"
    Inherits="Presentation.Web.Catalogos.Cat_Contratos.OrdenServicioCU" %>
<telerik:RadGrid ID="rgOrdenServicio" runat="server" AllowMultiRowEdit="true" Visible="true"
    AllowPaging="True" GridLines="None" AllowAutomaticUpdates="true" AutoGenerateColumns="false"
    AllowAutomaticInserts="true" AllowAutomaticDeletes="true" AllowSorting="true">
    <MasterTableView CommandItemDisplay="Top" DataKeyNames="ID" NoMasterRecordsText="No hay datos a mostrar.">
        <PagerStyle Mode="NumericPages"></PagerStyle>
        <Columns>
            <telerik:GridEditCommandColumn ButtonType="ImageButton">
            </telerik:GridEditCommandColumn>
            <telerik:GridBoundColumn DataField="ID" HeaderText="ID" Visible="false">
                <HeaderStyle Width="1px" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="OrdenServicio" HeaderText="Orden de Servicio"
                ReadOnly="True">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="FechaInicio" DataType="System.DateTime" HeaderText="Fecha de Inicio"
                SortExpression="FechaInicio" UniqueName="FechaInicio" DataFormatString="{0:D}">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="FechaTermino" DataType="System.DateTime" HeaderText="Fecha de Termino"
                SortExpression="FechaTermino" UniqueName="FechaTermino" DataFormatString="{0:D}">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="MontoAsignado" DataType="System.Decimal" HeaderText="Monto Asignado"
                SortExpression="MontoAsignado" UniqueName="MONTO_ASIGNADO">
            </telerik:GridBoundColumn>
            <telerik:GridButtonColumn CommandName="Delete" ButtonType="ImageButton">
            </telerik:GridButtonColumn>
        </Columns>
        <EditFormSettings EditFormType="Template">
            <EditColumn UniqueName="EditCommandColumn1">
            </EditColumn>
            <FormTemplate>
                <table cellspacing="2" cellpadding="1" width="100%" border="0">
                    <tr style="visibility: hidden">
                        <td colspan="2">
                            <b>ID:
                                <%# Eval("ID")%>
                            </b>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Orden de Servicio:
                        </td>
                        <td>
                            <asp:TextBox Width="200px" ID="TextBox1" runat="server" Text='<%# Bind("OrdenServicio") %>'></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Fecha de Inicio:
                        </td>
                        <td>
                            <asp:TextBox Width="200px" ID="TextBox2" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.FechaInicio" )%>'></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Fecha de Termino:
                        </td>
                        <td>
                            <asp:TextBox Width="200px" ID="TextBox3" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.FechaTermino" )%>'></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Monto Asignado:
                        </td>
                        <td>
                            <asp:TextBox Width="200px" ID="TextBox4" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.MontoAsignado" )%>'></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <asp:Button ID="Button1" runat="server" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'
                                OnClick="btnInsertOrden_clic"></asp:Button>
                            <asp:Button ID="Button2" runat="server" Text="Cancel" CausesValidation="false" CommandName="Cancel">
                            </asp:Button>
                        </td>
                    </tr>
                </table>
            </FormTemplate>
        </EditFormSettings>
    </MasterTableView>
</telerik:RadGrid>

UserControlDetalleInterno1.cs CodeBehind (yes, other name)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ServicesReferencesCore.CatalogoService;
using Telerik.Web.UI;
 
namespace Presentation.Web.Catalogos.Cat_Contratos
{
    public partial class OrdenServicioCU : System.Web.UI.UserControl
    {
        CatalogoServiceClient CatClient = new CatalogoServiceClient();
        public ContratoDTO Contrato = new ContratoDTO();
        List<OrdenServicioDTO> lstOrdenServicio;
 
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Contrato.Id > 0)
            {
                ObtenerDatos();
                Session["contrato"] = Contrato;
            }
            else
            {
                if (Session["contrato"] != null)
                    Contrato = Session["contrato"] as ContratoDTO;
            }
        }
 
        private void ObtenerDatos()
        {
            if (Contrato != null)
            {
                if (Contrato.Id > 0)
                {
                    CatClient = new CatalogoServiceClient();
 
                    lstOrdenServicio = new List<OrdenServicioDTO>();
                    lstOrdenServicio = CatClient.ObtenerOrdenServicioContrato(Contrato.Id);
 
                    rgOrdenServicio.DataSource = lstOrdenServicio;
                    rgOrdenServicio.DataBind();
                }
                else
                {
                    lstOrdenServicio = new List<OrdenServicioDTO>();
                    rgOrdenServicio.DataSource = lstOrdenServicio;
                    rgOrdenServicio.DataBind();
                }
            }
            else
            {
                lstOrdenServicio = new List<OrdenServicioDTO>();
                rgOrdenServicio.DataSource = lstOrdenServicio;
                rgOrdenServicio.DataBind();
            }
        }
 
        #region Eventos
        protected void btnInsertOrden_clic(object sender, EventArgs e)
        {
            //codigo para guardar los datos en la bd
        }
        #endregion
    }
}

Thanks All!

PD: im bad on english, but i try it n.nU
Kostadin
Telerik team
 answered on 02 Dec 2013
1 answer
73 views
Hi there i have a  table in which i have a % string symbol stored but  it isnt showing in the grid. i have used htmlencode = true but it isnt working. is there a way to show it in the grid 


thanks
Princy
Top achievements
Rank 2
 answered on 02 Dec 2013
1 answer
137 views
Hi Guys

I have taken one grid and one RadNotification control. And so, When new mail comes, notification works. But Code of refreshing the RadGrid doesn't work properly. I have the following code:

Design:
 
<telerik:RadPane runat="server" ID="RadPane1">
                <telerik:RadToolBar runat="server" ID="RadToolBar1" CssClass="inbox-search-toolbar"
                    OnClientButtonClicked="onButtonClicked" OnButtonClick="RadToolBar1_ButtonClick" EnableViewState="false">
                    <Items>
                        <telerik:RadToolBarButton ImageUrl="~/Images/print.gif" Enabled="false" />
                        <telerik:RadToolBarButton ImageUrl="~/Images/move.gif" Enabled="false" />
                        <telerik:RadToolBarButton ImageUrl="~/Images/delete_inbox.gif" Value="Delete" CommandName="delete" />
                        <telerik:RadToolBarButton IsSeparator="true" />
                        <telerik:RadToolBarButton Text="Reply" ImageUrl="~/Images/reply.gif" Value="Reply" CommandName="reply" />
                        <telerik:RadToolBarButton Value="searchTextBoxButton" CommandName="searchText">
                            <ItemTemplate>
                                <telerik:RadTextBox
                                    runat="server" ID="RadTextBox1"
                                    EmptyMessage="Search Inbox"
                                    CssClass="inbox-search-textbox" Width="300px"
                                    ClientEvents-OnKeyPress="onKeyPress" />
                            </ItemTemplate>
                        </telerik:RadToolBarButton>
                        <telerik:RadToolBarButton ImageUrl="~/Images/search.gif" Value="search" CommandName="doSearch" />
                        <telerik:RadToolBarButton ImageUrl="~/Images/icons/MailSettings.png" CommandName="settings" />
                    </Items>
                </telerik:RadToolBar>
                <telerik:RadGrid runat="server" ID="grdMessage" DataSourceID="LinqDataSource1" AutoGenerateColumns="false"
                    GridLines="None" Height="500px" BorderWidth="0" AllowSorting="true" Style="border: 0; outline: none;"
                    ShowGroupPanel="true" OnItemCommand="grdMessage_ItemCommand" AllowMultiRowSelection="true" OnRowDrop="grdMessage_RowDrop">
                    <ClientSettings EnablePostBackOnRowClick="true" AllowDragToGroup="true" EnableAlternatingItems="false" AllowRowsDragDrop="true">
                        <Selecting EnableDragToSelectRows="true" AllowRowSelect="true" />
                        <ClientEvents OnRowSelected="onGridRowSelected" OnCommand="function(){}"
                            OnRowDblClick="RemoveBold" OnRowClick="RemoveBold" OnRowContextMenu="GrdMessageRowContextMenu" OnRowDropping="onRowDropping" />
                        <Scrolling UseStaticHeaders="true" AllowScroll="true" />
                    </ClientSettings>
                    <MasterTableView TableLayout="Fixed" GroupLoadMode="Client" DataKeyNames="id" Width="100%"
                        AdditionalDataFieldNames="Date" ClientDataKeyNames="id">
                        <GroupByExpressions>
                            <telerik:GridGroupByExpression>
                                <GroupByFields>
                                    <telerik:GridGroupByField FieldName="DateResult" HeaderValueSeparator=":" SortOrder="Descending" />
                                </GroupByFields>
                                <SelectFields>
                                    <telerik:GridGroupByField FieldName="DateResult" HeaderText="Date" FormatString="{0:d}" />
                                </SelectFields>
                            </telerik:GridGroupByExpression>
                        </GroupByExpressions>
                        <Columns>
                            <telerik:GridTemplateColumn UniqueName="TemplateColumn2" GroupByExpression="From Group By From"
                                SortExpression="From" HeaderText="From / Subject" HeaderStyle-Width="150px">
                                <ItemStyle Height="35px"></ItemStyle>
                                <ItemTemplate>
                                    <%# (Convert.ToBoolean(DataBinder.Eval(Container.DataItem, "seen")) ? DataBinder.Eval(Container.DataItem, "from_msg").ToString() : "<b>" + DataBinder.Eval(Container.DataItem, "from_msg").ToString() + "</b>") %>
                                    <br />
                                    <div class="MailSubject">
                                        <%# (Convert.ToBoolean(DataBinder.Eval(Container.DataItem, "seen")) ? DataBinder.Eval(Container.DataItem, "subject").ToString() : "<b>" + DataBinder.Eval(Container.DataItem, "subject").ToString() + "</b>") %>
                                    </div>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridBoundColumn DataField="msg_date" HeaderText="Date" HeaderStyle-Width="150px"
                                GroupByExpression="DateResult Date GROUP BY DateResult">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="size" HeaderText="Size" HeaderStyle-Width="50px">
                            </telerik:GridBoundColumn>
                            <telerik:GridCalculatedColumn UniqueName="Date" DataType="System.DateTime" DataFields="msg_date"
                                Expression="msg_date.Value.Date" HeaderText="Date" Visible="false">
                            </telerik:GridCalculatedColumn>
                            <telerik:GridCalculatedColumn UniqueName="Conversation" DataType="System.String"
                                DataFields="subject" Expression='subject.Replace("RE: ", "")' HeaderText="Conversation"
                                Visible="false">
                            </telerik:GridCalculatedColumn>
 
                            <telerik:GridTemplateColumn UniqueName="TemplateColumn3" Groupable="False">
                                <HeaderStyle Width="25px"></HeaderStyle>
                                <ItemStyle Height="35px"></ItemStyle>
                                <ItemTemplate>
                                    <asp:ImageButton ID="MailFlagImageButton" BorderWidth="0px" CommandName="ChangeFlag"
                                        ImageUrl='<%# Convert.ToBoolean(DataBinder.Eval(Container.DataItem, "flagged"))? "~/Images/MailFlagRed.png" : "~/Images/MailFlag.png" %>'
                                        AlternateText="Change Flag" Style="cursor: pointer;" runat="server"></asp:ImageButton>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
 
                        </Columns>
                    </MasterTableView>
                </telerik:RadGrid>
                <telerik:RadNotification ID="RadNotification1" runat="server" LoadContentOn="TimeInterval" Width="250"
                    Animation="Fade" EnableRoundedCorners="true" EnableShadow="true" Skin="Default" Height="100" OnClientUpdated="OnClientUpdated"
                    Text="<strong>You have received 1 new message!</strong>" OffsetX="-30" OffsetY="-30" UpdateInterval="5000" AutoCloseDelay="10000"
                    ShowTitleMenu="true" ShowCloseButton="true" OnCallbackUpdate="OnCallbackUpdate">
                    <NotificationMenu>
                        <Items>
                            <telerik:RadMenuItem Text="Open Item" ImageUrl="../../images/icons/open.png"></telerik:RadMenuItem>
                            <telerik:RadMenuItem Text="Flag Item" ImageUrl="../../images/icons/Flagged.png"></telerik:RadMenuItem>
                            <telerik:RadMenuItem Text="Delete Item" ImageUrl="../../images/icons/delete.gif"></telerik:RadMenuItem>
                            <telerik:RadMenuItem Text="Mark As Read" ImageUrl="../../images/icons/MarkAsRead.png"></telerik:RadMenuItem>
                        </Items>
                    </NotificationMenu>
                </telerik:RadNotification>
            </telerik:RadPane>


Javascript:
var data = new Array();
       var openedMsgs = new Array();
 
       //use a flag to determine whether the item was selected by using the mouse or programmatically by the set_selected method                   
       var flag = true;
       function refreshGrid() {
           var grid = $find("<%=grdMessage.ClientID %>");
           var mtv = grid.get_masterTableView();
           mtv.set_dataSource(data);
           mtv.dataBind();
           var selectedItem = mtv.get_selectedItems()[0];
           if (selectedItem) {
               selectedItem.set_selected(false);
           }
 
           var items = mtv.get_dataItems();
           for (var i = 0; i < items.length; i++) {
               items[i].get_element().style.fontWeight = 'bold';
           }
           if (selectedItem) {
               var index = +selectedItem._itemIndexHierarchical;
               flag = false;
 
               if (items[index + 1] != null)
                   items[index + 1].set_selected(true);
 
           }
           for (var i = 0; i < openedMsgs.length; i++) {
               openedMsgs[i] = openedMsgs[i] + 1;
               items[openedMsgs[i]].get_element().style.fontWeight = 'normal';
           }
       }
 
       function OnClientUpdated(sender, args) {
           var record = sender.get_value();
           if (record != "") {
               data.unshift(eval(record));
               //refreshGrid();
               sender.show();
           }
           sender.set_value("");
       }
 
       function RemoveBold(sender, args) {
           var item = args.get_item();
           if (!Array.contains(openedMsgs, (+item._itemIndexHierarchical)) && flag) {
               openedMsgs.push(+item._itemIndexHierarchical);
               item.get_element().style.fontWeight = 'normal';
           }
           flag = true;
       }
 
 
       function OnRowCreated(sender, args) {
           var item = args.get_item();
           item.get_element().style.fontWeight = 'bold';
       }


Code:
protected void OnCallbackUpdate(object sender, RadNotificationEventArgs e)
    {
        CheckForNewMailsInHMailDB();
 
        //simulates cases when there are and there are not new messages
        if (_NewMessages)
        {
            RadNotification1.Value = GetRecord();
            grdMessage.Rebind();
            _NewMessages = false;
        }
        else
            RadNotification1.Value = "";
    }


Please help

Thanks ahead
Amit Jain
Konstantin Dikov
Telerik team
 answered on 02 Dec 2013
1 answer
97 views
Hi.
how to make a text box accept only numbers?
Shinu
Top achievements
Rank 2
 answered on 02 Dec 2013
1 answer
81 views
Hi,

When using LightWeight render mode, you get a javascript error when trying to hide a menu item from javascript code:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="menu.aspx.vb" Inherits="TestaTredjepartWeb.menu" %>
 
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="s" runat="server">
        </asp:ScriptManager>
        <div>
            <table>
                <tr>
                    <td>
                        <telerik:RadMenu ID="menu" runat="server" RenderMode="Lightweight">
                            <Items>
                                <telerik:RadMenuItem Text="Test1" Value="item1"></telerik:RadMenuItem>
                                <telerik:RadMenuItem IsSeparator="true" Value="separator"></telerik:RadMenuItem>
                                <telerik:RadMenuItem Text="Test2" Value="item2"></telerik:RadMenuItem>
                            </Items>
                        </telerik:RadMenu>
                    </td>
                </tr>
                <tr>
                    <td>
                        <input type="button" onclick="var menu = $find('menu'); menu.findItemByValue('item2').hide(); menu.findItemByValue('separator').hide();" value="Click to hide" />
                    </td>
                </tr>
            </table>
        </div>
    </form>
</body>
</html>

In the example above, the Test2-item gets hidden but a javascript error occurs when hiding the separator!
Works fine when not using LightWeight...

Regards
Andreas
Boyan Dimitrov
Telerik team
 answered on 02 Dec 2013
14 answers
203 views
I have a radmenu with SiteMap source and I am trying to show the seperator in certain places. I have code and also style to show them but it's not showing property in Metro skin. It shows fine in other skin. What's going on?
protected void RadMenu1_ItemDataBound(object sender, Telerik.Web.UI.RadMenuEventArgs e)
       {
 
           if (e.Item.Level == 1 && e.Item.Value == "Units")
           {
               Telerik.Web.UI.RadMenuItem separator = new Telerik.Web.UI.RadMenuItem();
               separator.IsSeparator = true;
 
               Telerik.Web.UI.RadMenuItem itm = (Telerik.Web.UI.RadMenuItem)e.Item;
               itm.Owner.Items.Insert(e.Item.Index + 1, separator);
           }
 
       }
<style type="text/css">
        /* <Separators> */
 
 .rmSeparator  {
            height: 1px !important;
            margin: 1px 0 0 !important;
            width: 25px !important;
            background-color: #A8A8A8 !important;
        }
    </style>
Kate
Telerik team
 answered on 02 Dec 2013
3 answers
414 views

 

<telerik:RadComboBox Filter="Contains" runat="server" ID="cmbTechnicalServicePerson" Width="420px"
    MarkFirstMatch="true" DataSourceID="DSGetTechnicalServicePerson" EnableLoadOnDemand="true"
    HighlightTemplatedItems="true" OnClientItemsRequested="UpdateItemCountField"
    OnDataBound="cmbTechnicalServicePerson_DataBound" OnItemDataBound="cmbTechnicalServicePerson_ItemDataBound"
    LabelWidth="100" Label="Technical Service Name:" Skin="Office2010Black" Style="position: absolute; top: 310px; left: 21px; z-index: 6500; height: 16px;" Text="Select  a Value" TabIndex="3">
    <HeaderTemplate>
        <ul>
            <li class="col1">Name</li>
            <li class="col2">Position</li>
            <li class="col2">Unit</li>
        </ul>
    </HeaderTemplate>
    <ItemTemplate>
        <ul>
            <li class="col1">
                <%# DataBinder.Eval(Container.DataItem, "[FULLNAME]")%></li>
            <li class="col2">
                <%# DataBinder.Eval(Container.DataItem, "Position")%></li>
            <li class="col3">
                <%# DataBinder.Eval(Container.DataItem, "[Department]")%></li>
        </ul>
    </ItemTemplate>
    <FooterTemplate>
        A total of
                <asp:Literal runat="server" ID="RadComboItemsTCount" />
        items
    </FooterTemplate>
 
</telerik:RadComboBox>

This is how my combo box set up in aspx page

 

I wanted to select the value from combo box using vb.net it select the value but the selected text will always “Select  a Value” which is default value.

This is how I am change the selected value inside the code

Me.cmbTechnicalServicePerson.SelectedValue = DRProjectDetailsinfo.Item("TechnicalServicePerson")

Or Me.cmbTechnicalServicePerson.SelectedValue = 12551

But it is not selecting the text any idea

Thanks

Syed

Nencho
Telerik team
 answered on 02 Dec 2013
4 answers
300 views
Hi,

I have below  javascript  function in code-behind file for expand & collapse node:

private void SetActions()

{

String sString =

@"

function SaveTreeState(action)

{

var tree = $find('" + RadTreeView1.ClientID + @"');

if(tree == null) { return; }

var nodes = tree.get_allNodes();

if(action == 'expand')

{

for(var cnt=0; cnt<nodes.length; cnt++)

{

nodes[cnt].expand();

}

}

if(action == 'collapse')

{

for(var cnt=0; cnt<nodes.length; cnt++)

{

nodes[cnt].collapse();

}

}

var expandedNodes = '';

for(var cnt=0; cnt<nodes.length; cnt++)

{

if(nodes[cnt].get_expanded())

{

expandedNodes += nodes[cnt].get_value() + '|';

}

}

SaveCookie('mpnotetreestate',expandedNodes);

}

function SaveCookie(name,value,days) {

if (days) {

if (days>730) {

days=730;

}

var date = new Date();

date.setTime(date.getTime()+(days*24*60*60*1000));

var expires = '; expires='+date.toGMTString();

}

else var expires = '';

document.cookie = name+'='+value+expires+'; path=/';

}

";

ScriptManager.RegisterClientScriptBlock(this, typeof(ViewNotes), "SaveTreeStateBlock", sString, true);

ViewToolBar1.btnExpandAll.Attributes.Add("onclick", "try{SaveTreeState('expand');}catch(err){return;}return false;");

ViewToolBar1.btnCollapseAll.Attributes.Add("onclick", "try{SaveTreeState('collapse');}catch(err){return}return false;");

}



In UI I am using the below:
<cc2:MPTreeView BorderStyle="None" OnNodeDataBound="RadTreeView1_NodeDataBound" OnClientNodeCollapsed="SaveTreeState"

OnClientNodeExpanded="SaveTreeState" ShowLineImages="false" ID="RadTreeView1" runat="server">

<CollapseAnimation Duration="100" Type="None" />

<ExpandAnimation Duration="100" Type="None" />



I am not able to collapse the treeview control on button click nor able to expand ? Could u please suggest.

Thanks
Bikash
Bikash
Top achievements
Rank 1
 answered on 02 Dec 2013
2 answers
73 views
Hi,

I want to show a RadConfirm when a certain ribbon bar button is clicked (in the client-side event handler), so the user can cancel the event.
Because the RadConfirm uses a callback, I have to cancel the click event, show the RadConfirm, and in the callback I have to do a postback if the user clicked "yes".
If found this example: http://demos.telerik.com/aspnet-ajax/window/examples/confirmserverclicks/defaultcs.aspx
How can I use this approach for a RibbonBarButton?

I have so far (pseudocode):
function OnRibbonBarButtonClicking(sender, args) {
   if (args.get_button().get_value() == "delete") {
      args.set_cancel(true);
      radConfirm("Sure?", _callbackFunc);
   }
}
 
function _callbackFunc(arg) {
   if (arg) {
      // do postback, but how?
   }
}

JP
Top achievements
Rank 1
 answered on 02 Dec 2013
6 answers
640 views
Greetings,

I'm currently evaluating RadGrid as my manager considers using it in a new project.
My manager asked me to examine the batch mode. One of his requirements is that new rows should be added to the bottom of the grid instead of the current behaviour of adding to the top.

addNewRecord adds to the top by default. Can I configure the grid to change this behaviour?
And if the answer is no, can I resort to a DOM hack to add the record TR element to the bottom? Will this be safe?
أشرف
Top achievements
Rank 1
 answered on 02 Dec 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?