Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
233 views
Hi,

during the edit of a row within the grid, I would like to set a column to read-only based on the drop-down selection of a previous column.
for example:

column A - drop down selection is Read ----------->set column B to read-only (or grey it out)
column A - drop down selection is Write ----------->set column B to allow input

I'm using the built-in grid editform

I'm using ASP.NET version 4 with the 2011.1 519 (May 19, 2011)  radcontrol
programming language is c#
Internet explorer 

also...any information on extending the grid built-in editform features, api, coding would be helpful.

thanks,
Minh 
Jayesh Goyani
Top achievements
Rank 2
 answered on 08 Aug 2011
2 answers
139 views
I have a main web page that contains a tabstrip with two tabs and two corresponding pageViews. The contents of each pageView has a contentURL value e.g. Tab1.aspx and Tab2.aspx. When the main web page loads the the contents of the Tab1.aspx is displayed. So far, so good. The main page also contains some script which interacts with the contents of Tab2.aspx. When I run this when the main page is first loaded, it fails to find the document in Tab2.apx. I then click on Tab2 and the contents of Tab2.aspx is shown. If I re-run the test then the script works fine.

I suspect that the pageView associated with Tab2 is not created until the tab is clicked. Is there a method of creating the pageView associated with a tab when its containg page is first loaded?

Many thanks for this and all the previous problems I have submitted.

Len Jones
Dimitar Terziev
Telerik team
 answered on 08 Aug 2011
5 answers
131 views
Hello people!

I'm trying to follow your simple databind example from : http://www.telerik.com/help/aspnet-ajax/grid-simple-data-binding.html but i have a problem, when the page loads for the first my grind has data, but when i sort, filter or paging, the data disappears and my grind comes at blank.....I'm passing a IList as Datasource My code is :
namespace iConnect.InvoicesScaling.Views
{
    public partial class InvoicesScalingDefault : Microsoft.Practices.CompositeWeb.Web.UI.Page, IInvoicesScale
    {
        private InvoicesScalePresenter _presenter;
  
  
  
        public System.Collections.Generic.IList<Data.SapDocuments> SapDocuments
        {
            get;
            set;
        }
  
  
  
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                this._presenter.OnViewInitialized();
  
                LoadData();
                RadGrid1.DataBind();
            }
            this._presenter.OnViewLoaded();
  
  
            //A cada acesso à pagina verifica quem é o user 
  
            //criar instancia da Info para aceder ao metodo que me vai buscar a lista de users ao AD
            Info x = new Info("xxx", "xxx", "xxxxx,DC=xx,DC=xx");
  
            //get da lista dos direct report em user,key=manager(xx)
            Dictionary<string, string> networkUser = new Dictionary<string, string>();
            networkUser = x.GetHierarchyTree("axxva3");
  
      
            //MessageBox.Show(Page.User.Identity.Name);
  
            ////Popular dados na Radlist 
            //RadGrid1.DataSource = this.SapDocuments;
            //RadGrid1.DataBind();
  
  
        }
  
        [CreateNew]
        public InvoicesScalePresenter Presenter
        {
            set
            {
                this._presenter = value;
                this._presenter.View = this;
            }
        }
  
        private void LoadData()
        {
            ////Popular dados na Radlist 
            RadGrid1.DataSource = this.SapDocuments;
  
  
        }
  
        protected void RadGrid1_PageIndexChanged(object source, Telerik.Web.UI.GridPageChangedEventArgs e)
        {
            RadGrid1.CurrentPageIndex = e.NewPageIndex;
            LoadData();
            RadGrid1.DataBind();
        }
  
  
        protected void RadGrid1_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
        {
            if (e.CommandName == Telerik.Web.UI.RadGrid.ExportToCsvCommandName)
            {
                RadGrid1.MasterTableView.Columns.FindByUniqueName("SequencialNumber").Visible = false; // hide column before export
  
                RadGrid1.ExportSettings.IgnorePaging = true;
                RadGrid1.DataSource = this.SapDocuments; // please set data source again.
                RadGrid1.DataBind();
  
            }
        }
  
  
        protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
  
            LoadData();
  
        }
    }
}
  
and my aspx file is:
  
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="content" ContentPlaceHolderID="DefaultContent" runat="Server">
    <script src="../Shared/js/jquery-1.6.2.min.js" type="text/javascript"></script>
    <script src="../Shared/js/jquery.tooltip.js" type="text/javascript"></script>
    <script type="text/javascript" src="../Silverlight.js"></script>
    <style type="text/css">
        .RadGrid_Black .rgFilterBox
        {
            background-color: #454545 !important;
        }
    </style>
  
    <h1 style="text-align: center;">
        Invoices Scale</h1>
    <br />
    <div>
        <telerik:RadGrid ID="RadGrid1" runat="server" 
            GridLines="None" AllowPaging="True" ViewStateMode= "Enabled"
            AllowSorting="True" AutoGenerateColumns="False" Width="97%" enableajax="True"
            CssClass="productsGrid" CellSpacing="0" AllowFilteringByColumn="True"
            ShowFooter="True" Skin="Black" AllowMultiRowSelection="True" 
            onitemcommand="RadGrid1_ItemCommand" 
            onpageindexchanged="RadGrid1_PageIndexChanged" onneeddatasource="RadGrid1_NeedDataSource" 
             >
            <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
            <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">
                <Selecting AllowRowSelect="True" />
            </ClientSettings>
            <MasterTableView GridLines="None" ViewStateMode="Enabled" Width="100%" EnableColumnsViewState="true" CommandItemSettings-ShowExportToCsvButton="True"
                CommandItemSettings-ShowAddNewRecordButton="false" 
                CommandItemDisplay="Top" >
                <Columns>
                    <telerik:GridBoundColumn DataField="SequencialNumber" HeaderText="SequencialNumber"
                        UniqueName="SequencialNumber" SortExpression="SequencialNumber">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Priority" HeaderText="Priority" UniqueName="Priority"
                        FilterControlAltText="Filter Priority column" SortExpression="Priority" DataType="System.Int32">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Process" HeaderText="Staging" UniqueName="Process"
                        SortExpression="Process" FilterControlAltText="Filter Process column">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="SupplierCode" HeaderText="SupplierCode" UniqueName="SupplierCode"
                        SortExpression="SupplierCode" FilterControlAltText="Filter SupplierCode column">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="MessageStatus" HeaderText="MessageStatus" UniqueName="MessageStatus"
                        SortExpression="MessageStatus" FilterControlAltText="Filter MessageStatus column">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="DocumentType" HeaderText="DocumentType" UniqueName="DocumentType"
                        FilterControlAltText="Filter DocumentType column" SortExpression="DocumentType">
                    </telerik:GridBoundColumn>
                    <telerik:GridDateTimeColumn UniqueName="InvoiceCreationDate" DataField="InvoiceCreationDate"
                        HeaderText="InvoiceCreationDate" FilterControlAltText="Filter InvoiceCreationDate column"
                        SortExpression="InvoiceCreationDate">
                        <FilterTemplate>
                            <telerik:RadDatePicker ID="RadDatePicker1" runat="server">
                            </telerik:RadDatePicker>
                        </FilterTemplate>
                    </telerik:GridDateTimeColumn>
                    <%--<telerik:GridBoundColumn DataField="InvoiceCreationDate" DataType="InvoiceCreationDate"
                        FilterControlAltText="Filter InvoiceCreationDate column" HeaderText="InvoiceCreationDate"
                        SortExpression="InvoiceCreationDate" UniqueName="InvoiceCreationDate">
                    </telerik:GridBoundColumn>--%>
                    <telerik:GridBoundColumn DataField="SupplierVatNumber" FilterControlAltText="Filter SupplierVatNumber column"
                        HeaderText="SupplierVatNumber" SortExpression="SupplierVatNumber" UniqueName="SupplierVatNumber">
                    </telerik:GridBoundColumn>
                </Columns>
                <%--<EditFormSettings ColumnNumber="2" CaptionFormatString="Edit details for invoice with SequencialNumber {0}"  
                    CaptionDataField="SequencialNumber">   
                    <FormTableItemStyle Wrap="False"></FormTableItemStyle>  
                    <FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle>  
                    <FormMainTableStyle CellSpacing="0" CellPadding="3" Width="100%" />  
                    <FormTableStyle GridLines="Horizontal" CellSpacing="0" CellPadding="2" CssClass="module"  
                        Height="110px" Width="100%" />  
                    <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>  
                    <FormStyle Width="100%" BackColor="#EEF2EA"></FormStyle>  
                    <EditColumn UpdateText="Update record" UniqueName="EditCommandColumn1" CancelText="Cancel edit">   
                    </EditColumn>  
                    <FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>  
                </EditFormSettings>--%>
                <ExpandCollapseColumn Visible="False">
                    <HeaderStyle Width="19px"></HeaderStyle>
                </ExpandCollapseColumn>
                <RowIndicatorColumn Visible="False">
                    <HeaderStyle Width="20px" />
                </RowIndicatorColumn>
            </MasterTableView>
            <FilterMenu EnableImageSprites="False">
            </FilterMenu>
            <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
            </HeaderContextMenu>
        </telerik:RadGrid>
<%--        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:EscalonamentoFacturasConnectionString %>"
            SelectCommand="SELECT [SequencialNumber], [Priority],[Process], [SupplierCode], [MessageStatus], [DocumentType],[InvoiceCreationDate], [SupplierVatNumber] FROM [SapDocuments]
WHERE [Process] IN ('S','SP');"></asp:SqlDataSource>--%>
    </div>
    <br />
    <br />
    <br />
    <br />
    <br />
</asp:Content>
Ricardo
Top achievements
Rank 1
 answered on 08 Aug 2011
1 answer
330 views
UPDATE: The answer was the Rebind() method.  I only noticed because that's the postback for the CommandItem's Refresh button.  I'll work on writing up more clearly my issue with putting the now-working-great checkboxes in a RadMenu.

Original Text:
I'm trying to create a menu to show and hide columns without using HeaderContextMenu.  My original idea was to use a Menu with checkboxes, but that work behaved very strangely, and did not actually hide anything.  The checkboxes would tend to disappear on postback.  I think my issue may have been with the item template class I wrote, but I'm not sure.  Also, the dropdown menu width would not widen for long checkbox labels in IE, but would in Chrome...  


Anyway, I've written a couple of examples of the functionality I'm looking for here, with just plain checkboxes, and a menu with just regular RadMenuItems.  The weird thing is that while these hide the columns just fine, if you change a hidden one to show again, it will not show until the user sorts or does some other operation.  This suggest I should call some kind of "refresh" method but I'm not able to find any.


As an aside, I'd be very curious about what the template class would look like for implementing this functionality with a menu of checkboxes.  I suspect I may have to somehow databind the columns to the checkboxes?  I'm not sure.

Markup:
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="GridShowMenuExample._Default" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <asp:Panel ID="Panel1" BackColor="LightSalmon" runat="server">
        <asp:Label ID="Label1" Text="Example Checkboxes: " runat="server"></asp:Label>
        <asp:CheckBox ID="CheckBox1" Text="Alpha" OnCheckedChanged="onHideShowCheckboxChange"
            runat="server" AutoPostBack="true" Checked="true" />
        <asp:CheckBox ID="CheckBox2" Text="Beta" OnCheckedChanged="onHideShowCheckboxChange"
            runat="server" AutoPostBack="true" Checked="true" />
        <asp:CheckBox ID="CheckBox3" Text="Gamma" OnCheckedChanged="onHideShowCheckboxChange"
            runat="server" AutoPostBack="true" Checked="true" />
        <br />
        <telerik:RadMenu ID="HideShowMenuRoot" runat="server" ClickToOpen="true" SkinID="WebBlue">
            <Items>
                <telerik:RadMenuItem ID="HideShowMenu" runat="server" PostBack="False" Text="Hide/Show Columns">
                </telerik:RadMenuItem>
            </Items>
        </telerik:RadMenu>
        <br />
        <br />
    </asp:Panel>
    <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" AllowSorting="True"
        AutoGenerateColumns="False" CellSpacing="0" GridLines="None" OnNeedDataSource="radGrid_onNeedDataSource">
        <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">
            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
        </ClientSettings>
        <MasterTableView>
            <%-- Autogenerated stuff --%>
            <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
            </RowIndicatorColumn>
            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
            </ExpandCollapseColumn>
            <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                </EditColumn>
            </EditFormSettings>
            <%-- End Autogenerated Stuff --%>
 
            <Columns>
                <telerik:GridBoundColumn DataField="Alpha" HeaderText="Alpha" SortExpression="Alpha"
                    UniqueName="Alpha" FilterControlAltText="Filter Alpha column">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Beta" HeaderText="Beta" SortExpression="Beta"
                    UniqueName="Beta" FilterControlAltText="Filter Beta column">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Gamma" HeaderText="Gamma" SortExpression="Gamma"
                    UniqueName="Gamma" FilterControlAltText="Filter Gamma column">
                </telerik:GridBoundColumn>
            </Columns>
        </MasterTableView>
        <FilterMenu EnableImageSprites="False">
        </FilterMenu>
        <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
        </HeaderContextMenu>
    </telerik:RadGrid>
</asp:Content>

Code:
using System;
using System.Collections.Generic;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
 
namespace GridShowMenuExample {
    public partial class _Default : System.Web.UI.Page {
 
        protected override void OnInit(EventArgs args) {
            //Menu Generator
            foreach (GridColumn col in RadGrid1.Columns) {
                var item = new RadMenuItem();
                item.Text = col.UniqueName;
                HideShowMenu.Items.Add(item);
            }
            HideShowMenuRoot.ItemClick += new RadMenuEventHandler((clicksrc, clickargs) => {
                var menu = clicksrc as RadMenu;
                var col = RadGrid1.Columns.FindByUniqueName(menu.SelectedItem.Text);
                col.Visible = !col.Visible;
            });
        }
 
        protected void Page_Load(object sender, EventArgs e) {
 
        }
 
        protected void radGrid_onNeedDataSource(object source, GridNeedDataSourceEventArgs e) {
            IList<ExampleClass> data = new List<ExampleClass>();
            data.Add(new ExampleClass {Alpha = "Stuff", Beta="Things", Gamma=42});
            data.Add(new ExampleClass {Alpha = "Stuff", Beta="Things", Gamma=42});
            data.Add(new ExampleClass {Alpha = "Stuff", Beta="Things", Gamma=42});
            data.Add(new ExampleClass {Alpha = "Stuff", Beta="Things", Gamma=42});
            RadGrid1.DataSource = data;
        }
 
        protected void onHideShowCheckboxChange(object source, EventArgs args) {
            var box = source as CheckBox;
            var col = RadGrid1.Columns.FindByUniqueName(box.Text);
            col.Visible = box.Checked;
        }
 
        private class ExampleClass {
            public string Alpha { get; set; }
            public string Beta { get; set; }
            public int Gamma { get; set; }
        }
    }
}

Daniel
Telerik team
 answered on 08 Aug 2011
16 answers
246 views
Hi,

My objective is to extend the current template and add one more field to the list. I figured out that the default template cannot be modified and it's not available on your website (to copy and modify).

I tried recreating the template and adding the field but the UI representation of what I'm creating is a bit off.

<InlineInsertTemplate>
    <div>
        <div>
            <telerik:RadTextBox ID="TitleTextBox" runat="server" Text='<%# Bind("Description") %>'
                TextMode="MultiLine" Rows="2" EmptyMessage="Description" MaxLength="240"
                Width="100%">
            </telerik:RadTextBox>
            <telerik:RadTextBox ID="DocketNo" runat="server" Width="100%" EmptyMessage="Docket Number" MaxLength="15" Text='<%# Bind("DocketNo") %>'>
            </telerik:RadTextBox>
        </div>
        <div style="padding-top:10px;">
            <asp:Button ID="btnSave"  runat="server" CommandName="Insert"
                Text="Insert" />
            <asp:Button ID="btnCancel" runat="server" CommandName="Cancel"
                Text="Cancel" />
            <asp:Button ID="btnOptions" runat="server" CommandName="More"
                Text="More" />
        </div>
    </div>
</InlineInsertTemplate>


See attached image.

Any ideas?

Thanks
Daryl
Alan
Top achievements
Rank 1
 answered on 08 Aug 2011
3 answers
95 views
I am trying to develop a framework that is extensible through user controls. In order to do this, I need to be able to use a UserControl as the target of an ajax request and I need to be able to pass an argument with it. I have done this through the implementation of IPostBackEventHandler. However when it posts back, depending on the browser, it doesn't refresh the UI(IE) or it never shows the loading panel. the "btnUpdateLabel", button always works and is there as a check. the "btnClientScript" uses JS to do the ajaxrequestwithtarget which does not show the loading panel.

below are the contents of 4 files to replicate this.

aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UserControlPage.aspx.cs"
    Inherits="UserControlPage" %>
 
<%@ Register src="UserControls/PostBackeEventHandlerTest.ascx" tagname="PostBackeEventHandlerTest" tagprefix="uc2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="mgrScript" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadAjaxManager ID="mgrAjax" runat="server">
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="pnlLoading" runat="server" Skin="Default">
    </telerik:RadAjaxLoadingPanel>
    <uc2:PostBackeEventHandlerTest ID="PostBackeEventHandlerTest1" runat="server" />
    </form>
</body>
</html>

aspx.cs
using System;
using System.Web.UI;
using Telerik.Web.UI;
using System.Collections.Generic;
using System.Web.UI.WebControls;
using System.Collections;
 
public partial class UserControlPage : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //increase the request queue so we can have multiple requests loading.
        RadAjaxManager.GetCurrent(this.Page).RequestQueueSize = 50;
    }   
}

ascx
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="PostBackeEventHandlerTest.ascx.cs" Inherits="UserControls_PostBackeEventHandlerTest" %>
<telerik:RadAjaxLoadingPanel ID="pnlLoading" Runat="server"
    Skin="Default">
</telerik:RadAjaxLoadingPanel>
<asp:Label ID="lblButtonTarget" runat="server" Text="Updated From Button"></asp:Label>
<br />
<asp:Button ID="btnUpdateLabel" runat="server" Text="Update Time Regular" />
<br />
<br />
<asp:Button ID="btnClientScript" runat="server" Text="Update Time ClientScript" />
<br />
<br />
<asp:Label ID="lblPostbackevent" runat="server" Text="Updated From PostBack"></asp:Label>

ascx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
public partial class UserControls_PostBackeEventHandlerTest : System.Web.UI.UserControl,IPostBackEventHandler
{
    protected void Page_Load(object sender, EventArgs e)
    {      
        var mgr = Telerik.Web.UI.RadAjaxManager.GetCurrent(this.Page);
        mgr.AjaxSettings.AddAjaxSetting(this.btnUpdateLabel, this.lblButtonTarget, this.pnlLoading);
        mgr.AjaxSettings.AddAjaxSetting(mgr, this.lblPostbackevent, this.pnlLoading);
 
        this.btnUpdateLabel.Click += new EventHandler(btnUpdateLabel_Click);
        this.btnClientScript.OnClientClick = "var mgr = $find('" + mgr.ClientID + "');mgr.ajaxRequestWithTarget('" + this.UniqueID + "', 'I need to pass a param');";
    }
 
    void btnUpdateLabel_Click(object sender, EventArgs e)
    {
        this.lblButtonTarget.Text = DateTime.Now.ToString();
    }
 
    public void RaisePostBackEvent(string eventArgument)
    {
        this.lblPostbackevent.Text = DateTime.Now.ToString();
    }
}
Sebastian
Telerik team
 answered on 08 Aug 2011
1 answer
61 views

I am looking for a simple drag and drop solution from one radgrid that simply has a ssn and name to antoher grid that has positions that personnel can fill.  When I drag from the personnel grid to the position it automatically updates the radgrid with that person whom was droped in and fills it.  I was trying to use example on the site but they use a lot of datasource objects I cannot use, mine is straight code behind.  this is what I ahve so far but the drop is not working to the other radgrid.  I guess I am not getting the Id of the row I am draggging and I need to get the Id of where I drop it to save to the database.  Here is what I have what do i need to add or do differently.


 <table width="100%">
                    <tr>
                        <td align="center" valign="top">
                             <telerik:RadGrid ID="myGridPersonnel" runat="server" Width="100%" BorderWidth="1px" CellPadding="6" GridLines="None" BorderColor="#404040" Skin="Web20">
                                <ClientSettings AllowRowsDragDrop="true">
                                    <Selecting AllowRowSelect="true" EnableDragToSelectRows="false" />
                                </ClientSettings>
                                <MasterTableView AutoGenerateColumns="false" DataKeyNames="SSN_SM" GridLines="Both" BorderWidth="1px"
                                    BorderColor="#404040" Font-Size="12" Font-Names="Veranda,arial,sans-serif" HeaderStyle-HorizontalAlign="Center">
                                    <AlternatingItemStyle BackColor="#B0C4DE" />
                                    <HeaderStyle ForeColor="White" Font-Bold="true" BorderColor="#404040" BorderWidth="1px" />
                                        <Columns>
                                            <telerik:GridBoundColumn DataField="Name" HeaderText="NAME" />
                                        </Columns>
                                </MasterTableView>
                            </telerik:RadGrid>
                        </td>
                        <td align="center" valign="top">
                            <telerik:RadGrid ID="myGridPositions" runat="server" Width="100%" BorderWidth="1px" CellPadding="6" GridLines="None" BorderColor="#404040" Skin="Web20">
                                <ClientSettings AllowRowsDragDrop="true">
                                    <Selecting AllowRowSelect="true" EnableDragToSelectRows="false" />
                                </ClientSettings>
                                <MasterTableView AutoGenerateColumns="false" DataKeyNames="intPositionId" GridLines="Both" BorderWidth="1px"
                                    BorderColor="#404040" Font-Size="12" Font-Names="Veranda,arial,sans-serif" HeaderStyle-HorizontalAlign="Center">
                                    <AlternatingItemStyle BackColor="#B0C4DE" />
                                    <HeaderStyle ForeColor="White" Font-Bold="true" BorderColor="#404040" BorderWidth="1px" />
                                        <Columns>
                                            <telerik:GridBoundColumn DataField="strPosnTitle" HeaderText="TITLE" />
                                            <telerik:GridBoundColumn DataField="strpara" HeaderText="PARA" />
                                            <telerik:GridBoundColumn DataField="strLine" HeaderText="LINE" />
                                            <telerik:GridBoundColumn DataField="intPositionNum" HeaderText="POSITION" />
                                            <telerik:GridBoundColumn DataField="strGrade" HeaderText="GRADE" />
                                            <telerik:GridBoundColumn DataField="strMos" HeaderText="MOS" />
                                            <telerik:GridBoundColumn DataField="strFullName" HeaderText="Filled By" />
                                            <telerik:GridTemplateColumn HeaderText="Delete">
                                                <ItemTemplate>
                                                    <asp:LinkButton ID="Delete" runat="server" CommandArgument='<%# bind("intPositionId") %>' CommandName="Del">Delete</asp:LinkButton>
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>
                                        </Columns>
                                </MasterTableView>
                            </telerik:RadGrid>
                        </td>
                    </tr>
                </table>


 Protected Sub myGridPersonnel_RowDrop(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridDragDropEventArgs) Handles myGridSoldier.RowDrop
        If String.IsNullOrEmpty(e.HtmlElement) Then
            If e.DraggedItems(0).OwnerGridID = myGridSoldier.ClientID Then
                Dim destinationIndex As Int32 = -1

                For Each dragged As GridDataItem In e.DraggedItems
                    Dim SSN As String = DirectCast(dragged.GetDataKeyValue("strssn"), String)
                    If SSN IsNot Nothing Then
                        If destinationIndex > -1 Then
                            If e.DropPosition = GridItemDropPosition.Below Then
                                destinationIndex += 1
                            End If
                            sql = "Insert tblMobUnitPersonnel (intpositionId, strssn) Values (45, " & SSN & ")"
                            Response.Write(sql)
                            Response.End()

                            insertUpdateDelete(sql)
                        Else

                        End If
                    End If
                Next
            End If
        End If
    End Sub

Tsvetina
Telerik team
 answered on 08 Aug 2011
3 answers
114 views
I have an application, where i have used RadEditor inside a page with uses master page, i have kept a button for export to PDF, the event fires when i click the button , but nothing happens on screen  , but when i remove master page the code works like a charm.

Below is the aspx code.

<asp:Button ID="ExportToPDFButton" runat="server" Text="Export to PDF" OnClick="ExportToPDFButton_Click" />
                            <telerik:RadEditor ID="ContentEditor" runat="server" ContentFilters="DefaultFilters,PdfExportFilter"
                                Width="100%">
                                <ExportSettings OpenInNewWindow="true" />
                                 
                                <Content></Content>
                            </telerik:RadEditor >


Below is the aspx.cs code

protected void ExportToPDFButton_Click(object sender, EventArgs e)
        {
            ContentEditor.ExportToPdf();
        }

Does any one have faced the problem?

Thank You in advance!
Jayesh Goyani
Top achievements
Rank 2
 answered on 08 Aug 2011
1 answer
115 views
I've added this RadSlider on my page but it looks too big: http://demos.telerik.com/aspnet-ajax/slider/examples/default/defaultcs.aspx

I saw in the source code that <a> tags are generated for each part and their background-image property is set to an embedded image from the skin.

e.g.

<a id="RadSliderDecrease_RadSlider_NoItems" href="#" class="rslHandle rslDecrease" title="Decrease"><span>Decrease</span></a>
.RadSlider_Vista .rslHorizontal a.rslHandle {
  1. background-imageurl('/aspnet-ajax/WebResource.axd?d=YKXu0uPqzZODU8Rvlz3vm72tkkulHEpAptoZciRoZVlkUEitZoBEhzYTVh0eCOgf-fLcrTuvnjwnQ_9cFRN5uK_CqhEi4d5EpjV4QZJsc7vML6J0p5rJ5pc0vb-ym1DrvoWxCHvXbRk-MXl6bny980BwLduK0DqLMasbLoyPJ_o1&t=634460641060000000');
}

How would that be possible to resize the RadSlider images to appear e.g. 50% smaller than the default images?

I hope it had a better design and instead had an <img> tag inside the <a> tag so that I could resize them easily.

Thanks,
Bozhidar
Telerik team
 answered on 08 Aug 2011
3 answers
188 views
Hello,

I'm wonder if I can create a 3D RadChart (Pie).

Please, if it is possible explain to me how to do that

Regards,
Bader
Giuseppe
Telerik team
 answered on 08 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?