Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
171 views

Dear all,

I have a user control with (RadAjaxProxyManager) and the (RadAjaxManager) on the ASP.NET page where the user control lives 

I need to put the below JS function isnide .JS file not on the page directly. I want to get rid of the RadCodeBlock tag as well I'm combining JS in files. I dont want to have inline JS functions on ASP.NET pages.

<rad:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script type="text/javascript">
 function refreshAttachmentGrid(arg) {
$find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("RefreshAttachment");
}
</script>
</rad:RadCodeBlock>


The code works fine, all I need is to move it to JS file.

Thanks in advance.

Taiseer

Andrey
Telerik team
 answered on 07 Dec 2011
5 answers
152 views
Will there be any tutorials of how to integrate asp.net controls with kendoui

cheers

Jason
Sebastian
Telerik team
 answered on 07 Dec 2011
1 answer
115 views
IS IT POSSIBLE TO SHOW RELATED DATA OF EACH SLICE IN PIE CHART.LIKE CLICK EVENTS
Giuseppe
Telerik team
 answered on 07 Dec 2011
13 answers
192 views
Hello,

I am using RadDatePicker and having the width issue..no matter how much i fix it it always takes up the whole page space....http://www.telerik.com/community/forums/aspnet-ajax/input/raddatepicker-calendar-width.aspx..having a similar issue as is mentioned in this thread but in the end part someone said that it is solved in the next release I have the latest version of telerik

2011.2.712.35  but am still having this issue..It works fine in firefox,chrome but not in IE8...
Can someone please help me with this.

Thanks


Keith
Top achievements
Rank 1
 answered on 07 Dec 2011
4 answers
223 views

Hello everyone and special thanks to Princy!

I am using a Radgrid with a Radwindow on Editing , you can see all about it in “Demo/Asp.Net Ajax/Window/Edit Dialog For RadGrid”

I tried it to customize it  in my Project logic and every thing is fine when I use the same structure(DefaultCS.aspx, and code behind and EditForm and its codebehind).

But  I am using a UserControl instead of aspx file ,as follow :

Root

.

.

.

Folder :Usercontrols

                                                ChargePanel.ascx(Instead of DefaultCS.aspx)[Inherited from SiteMasterpage]

                                                EditForm.aspx  

SiteMasterPage.master

 

When I click On Edit Button everything is true still, and works fine ,and the Grid will be updated after closing windows with some Java Script Code,after do that if I tend to edit another row when I click the Edit button It will raise  an error!

                Microsoft JScript runtime error: 'null' is null or not an object

 

Here is my Code,I have  tried  to find a solution from Many posts but I didn’t find anything to help me…

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ChargePanelCS.ascx.cs"
    Inherits="UserControls_ChargePanel" %>
<telerik:RadCodeBlock ID="RadCodeBlock2" runat="server">
    <style type="text/css">
        .orderText
        {
            font: normal 12px Arial,Verdana;
            margin-top: 6px;
        }
        .expandImage
        {
            display: inline-block;
            background-image: url('<%= Page.ResolveUrl("~/Common/styles09/sprite09.gif")%>');
            background-position: -596px -1191px;
            background-repeat: no-repeat;
            width: 15px;
            height: 15px;
        }
        * html .expandImage
        {
            background-position: -596px -1194px;
        }
        * + html .expandImage
        {
            background-position: -596px -1194px;
        }
    </style>
</telerik:RadCodeBlock>
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
        function ShowEditForm(id, rowIndex) {
            var grid = $find("<%= RadGrid1.ClientID %>");
 
            var rowControl = grid.get_masterTableView().get_dataItems()[rowIndex].get_element();
            grid.get_masterTableView().selectItem(rowControl, true);
 
            window.radopen("../UserControls/EditFormCS.aspx?PanelId=" + id, "UserListDialog");
            return false;
        }
        function ShowInsertForm() {
            window.radopen("../UserControls/EditFormCS.aspx", "UserListDialog");
            return false;
        }
        function refreshGrid(arg) {
            if (!arg) {
                $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");
            }
            else {
                $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("RebindAndNavigate");
            }
        }
        function RowDblClick(sender, eventArgs) {
            window.radopen("../UserControls/EditFormCS.aspx?PanelId=" + eventArgs.getDataKeyValue("PanelId"), "UserListDialog");
        }
    </script>
</telerik:RadCodeBlock>
   <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadGrid ID="RadGrid1" runat="server" CssClass="myRadGrid" AllowPaging="true"
            AllowSorting="true" OnNeedDataSource="RadGrid1_NeedDataSource" PageSize="10"
            Font-Names="Tahoma" dir="rtl" AllowFilteringByColumn="true" OnUpdateCommand="RadGrid1_UpdateCommand"
            OnItemCreated="RadGrid1_ItemCreated">
            <ExportSettings IgnorePaging="true" OpenInNewWindow="true">
                <Pdf PageHeight="297mm" PageWidth="210mm" PageTitle="SushiBar menu" />
            </ExportSettings>
            <MasterTableView AutoGenerateColumns="False" CommandItemDisplay="Top" TableLayout="Auto"
                Font-Names="Tahoma" DataKeyNames="PanelId" EditMode="PopUp">
                <%--<EditFormSettings InsertCaption="ركورد جديد" CaptionFormatString="ويرايش" CaptionDataField="PanelId"
            PopUpSettings-Modal="true" FormCaptionStyle-Font-Names="Tahoma" EditColumn-HeaderStyle-Font-Names="Tahoma" />--%>
                <CommandItemTemplate>
                    <div style="padding: 5px 5px;" dir="rtl">
                        <asp:LinkButton ID="LinkButton4" runat="server" Font-Names="Tahoma" CommandName="RebindGrid"><img style="border:0px;vertical-align:middle;" alt="" src="../Images/Icons/Refresh.gif" />به روزآوري اطلاعات</asp:LinkButton>
                    </div>
                </CommandItemTemplate>
                <Columns>
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
                        <ItemStyle CssClass="MyImageButton" />
                    </telerik:GridEditCommandColumn>
                    <telerik:GridBoundColumn AllowSorting="true" DataField="PanelName" HeaderText="نام پنل"
                        SortExpression="PanelName" UniqueName="PanelName" ColumnEditorID="GridTextBoxColumn">
                    </telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn HeaderText="رده بندي ارسال">
                        <ItemTemplate>
                            <telerik:RadRating dir="rtl" ID="RadRating1" runat="server" AutoPostBack="true" Value='<%# Convert.ToDouble(Eval("Used_Charges_Send"))/100000 %>'
                                OnRate="RadRating1_Rate" ReadOnly="true" Precision="Item" ItemCount="10" />
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn AllowSorting="true" DataField="N_Charges_Send" HeaderText="شارژ ارسال"
                        SortExpression="N_Charges_Send" UniqueName="N_Charges_Send" ItemStyle-CssClass="grid_txt_NO"
                        ColumnEditorID="GridTextBoxColumn">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn AllowSorting="true" DataField="Fake_Charges_Send" HeaderText="شارژ اضطراري"
                        SortExpression="Fake_Charges_Send" UniqueName="Fake_Charges_Send" ItemStyle-CssClass="grid_txt_NO"
                        ColumnEditorID="GridTextBoxColumn">
                    </telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn UniqueName="TemplateEditColumn">
                        <ItemTemplate>
                            <asp:HyperLink ID="EditLink" runat="server" ToolTip="افزايش شارژ" ImageUrl="../Images/Icons/Credit.png"
                                Text="Charge"></asp:HyperLink>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
                <PagerStyle Mode="NumericPages" />
                <EditFormSettings ColumnNumber="3" CaptionDataField="PanelId" CaptionFormatString="ويرايش اطلاعات"
                    InsertCaption="" FormCaptionStyle-Font-Names="Tahoma" FormStyle-Font-Names="Tahoma">
                    <FormTableItemStyle Wrap="True"></FormTableItemStyle>
                    <FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle>
                    <FormMainTableStyle GridLines="None" CellSpacing="5" BorderColor="Yellow" CellPadding="3"
                        Width="100%" />
                    <FormTableStyle CellSpacing="0" CellPadding="2" Height="110px" Font-Names="Tahoma" />
                    <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>
                    <EditColumn ButtonType="ImageButton" InsertText="ثبت " UpdateText="ويرايش" UniqueName="EditCommandColumn1"
                        CancelText="لغو ">
                    </EditColumn>
                    <FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>
                </EditFormSettings>
            </MasterTableView>
            <ClientSettings>
                <Selecting AllowRowSelect="true" />
                <ClientEvents OnRowDblClick="RowDblClick" />
            </ClientSettings>
        </telerik:RadGrid>
        <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true" OnClientClose="refreshGrid" >
            <Windows>
                <telerik:RadWindow ID="UserListDialog" runat="server" Title="Editing record" Height="320px"
                    Width="310px" Left="150px" ReloadOnShow="true" ShowContentDuringLoad="false"
                    Modal="true" />
            </Windows>
        </telerik:RadWindowManager>
        <telerik:GridTextBoxColumnEditor ID="GridTextBoxColumn" runat="server" TextBoxStyle-CssClass="GridTextBoxColumnEditor" />
        <asp:Label ID="Label1" runat="server" Width="410px"></asp:Label>
    </div>
    <!-- content end -->
    </form>
</body>
</html>
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
   {
     
       if (e.Item is GridDataItem)
       {
           HyperLink editLink = (HyperLink)e.Item.FindControl("EditLink");
           editLink.Attributes["href"] = "#";
           editLink.Attributes["onclick"] = String.Format("return ShowEditForm('{0}','{1}');", e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["PanelId"], e.Item.ItemIndex);
       }
   }
protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
   {
       if (e.Argument == "Rebind")
       {
           RadGrid1.MasterTableView.SortExpressions.Clear();
           RadGrid1.MasterTableView.GroupByExpressions.Clear();
           RadGrid1.Rebind();
       }
       else if (e.Argument == "RebindAndNavigate")
       {
           RadGrid1.MasterTableView.SortExpressions.Clear();
           RadGrid1.MasterTableView.GroupByExpressions.Clear();
           RadGrid1.MasterTableView.CurrentPageIndex = RadGrid1.MasterTableView.PageCount - 1;
           RadGrid1.Rebind();
       }
   }
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="EditFormCS.aspx.cs" Inherits="UserControls_EditFormCS" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head id="Head1" runat="server">
    <title>Edit dialog</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <script type="text/javascript">
            function CloseAndRebind(args) {
                GetRadWindow().BrowserWindow.refreshGrid(args);
                GetRadWindow().close();
            }
 
            function GetRadWindow() {
                var oWindow = null;
                if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
                else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz as well)
 
                return oWindow;
            }
 
            function CancelEdit() {
                GetRadWindow().close();
            }
            function onError(input, args) {
                var message = "Invalid character: ";
 
                message += "accepts only numberic values.";
                document.getElementById("numInput").innerHTML = args.get_inputText();
                document.getElementById("numErrorOut").innerHTML = message;
            }
            function onKeyPress(input, args) {
 
                document.getElementById("numInput").innerHTML = "";
                document.getElementById("numErrorOut").innerHTML = "";
 
            }
            function Close() {
                GetRadWindow().Close();
            }
        </script>
        <asp:ScriptManager ID="ScriptManager2" runat="server" />
        <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="All" />
        <br />
        <br />
        <telerik:RadNumericTextBox ID="RadNumericTextBox1" runat="server" Type="Number" NumberFormat-DecimalDigits="0">
            <ClientEvents OnError="onError" OnKeyPress="onKeyPress"></ClientEvents>
        </telerik:RadNumericTextBox>
        <asp:Button runat="server" Text="Submit" ID="btnSubmit" OnClick="Unnamed1_Click" />
        <asp:Button runat="server" Text="Reset" ID="btnReset" OnClick="btnReset_Click" Visible="false" />
    </div>
    <asp:Label ID="Label1" runat="server" Width="410px"></asp:Label>
    <div class="module" style="width: 448px; clear: both;">
        <table cellpadding="4" cellspacing="0" width="100%">
            <tbody>
                <tr>
                    <td>
                        <span id="numInput"></span>
                    </td>
                    <td>
                        <span id="numErrorOut" style="color: Red"></span>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
    </form>
</body>
</html>
protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);
 
       
        this.Page.Title = "Editing record";
    }
protected void btnSubmit_Click(object sender, EventArgs e)
    {
 
        //Some Code here
 
       Label1.Text = "<script type='text/javascript'>Close()</" + "script>";
        
        }
 
 
 
 
 
    }
    protected void btnReset_Click(object sender, EventArgs e)
    {
       /SomeCode here
    }

L D
Top achievements
Rank 1
 answered on 07 Dec 2011
7 answers
402 views
Hello,

We want to create a WebForm with a RadGrid that should be able to show different datasources.  I started out with http://www.telerik.com/help/aspnet-ajax/grid-changing-structure-dynamically.html help page, that explains how to dynamically create a grid structure. To be more flexible I used the NeedDataSource event handling, and everything works reasonably well. For this I got some helpful info from the http://www.telerik.com/community/forums/aspnet-ajax/grid/grid-dynamically-needs-different-datasources-needdatasource-can-t-do-this.aspx forum page.

However I have two issues I'm unable to solve. 

1) If the user changes a column width and then switch to a different datasource we get a 'Cannot find a column with UniqueName '...' error. This is because it still refers to the previous grid layout. What code changes should I make to fix this?

2) I want to save the width of columns and the sort columns. But as the RadGrid is created dynamically in the Page_Init I don't have a clue how and when I should save the grid layout.

I  added  a small sample, based on the Northwind database, to show my current solution. Can someone instruct me how to solve my problems?

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm9.aspx.cs" Inherits="WebApplication3.WebForm9"  Trace="false" %>
 
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head id="Head1" runat="server">
    <title></title>
</head>
 
<body class="BODY">
    <form runat="server" id="mainForm" method="post">
 
        <telerik:RadScriptManager ID="RadScriptManager" runat="server"></telerik:RadScriptManager>
        <!-- content start -->
 
        <!-- Rad Ajax Manager -->       
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
 
 
        <div id="menu" style="height:30px; margin-top:10px;">
            <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True"
                onselectedindexchanged="DropDownList1_SelectedIndexChanged">
                <asp:ListItem>customers</asp:ListItem>
                <asp:ListItem>orders</asp:ListItem>
            </asp:DropDownList>
        </div>
        <br />
 
        <div id="DivGrid1" style="height:200px; margin-top:10px;" >
 
            <telerik:RadGrid ID="RadGrid1" runat="server" >
            </telerik:RadGrid>
 
        </div>
 
        <!-- content end -->
    </form>
</body>
</html>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Configuration;
using System.Data.SqlClient;
using Telerik.Web.UI;
 
namespace WebApplication3
{
 
   public partial class WebForm9 : System.Web.UI.Page
   {
 
      myListview pageGrid = new myListview();
      List<myListviewColumn> gridColumn = new List<myListviewColumn>();
 
      protected void Page_Init(object sender, System.EventArgs e)
      {
         Grid1_PageInit();
      }
 
      private void Grid1_PageInit()
      {
 
         RadGrid1.Skin = "Office2010Blue";
         this.RadGrid1.NeedDataSource += new GridNeedDataSourceEventHandler(this.RadGrid1_NeedDataSource);
 
         RadGrid1.Width = Unit.Percentage(100);
         RadGrid1.AllowPaging = true;
         RadGrid1.GroupingEnabled = false;
         RadGrid1.ShowGroupPanel = false;
         RadGrid1.ShowStatusBar = true;
         RadGrid1.AllowMultiRowSelection = true;
 
         RadGrid1.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric;
         RadGrid1.PagerStyle.AlwaysVisible = true;
 
         RadGrid1.ClientSettings.AllowDragToGroup = true;
         RadGrid1.ClientSettings.Selecting.AllowRowSelect = true;
         RadGrid1.ClientSettings.AllowColumnsReorder = true;
         RadGrid1.ClientSettings.AllowKeyboardNavigation = true;
 
         RadGrid1.ClientSettings.Scrolling.AllowScroll = true;
         RadGrid1.ClientSettings.Scrolling.UseStaticHeaders = true;
         RadGrid1.ClientSettings.Scrolling.ScrollHeight = Unit.Percentage(100);
 
         RadGrid1.ClientSettings.Resizing.AllowColumnResize = true;
         RadGrid1.ClientSettings.Resizing.EnableRealTimeResize = true;
         RadGrid1.ClientSettings.Resizing.ResizeGridOnColumnResize = true;
         RadGrid1.ClientSettings.Resizing.AllowResizeToFit = true;
 
         // Add Master Table
         RadGrid1.MasterTableView.PageSize = 20;
         RadGrid1.MasterTableView.AllowSorting = true;
         RadGrid1.AutoGenerateColumns = false;
         RadGrid1.MasterTableView.EnableColumnsViewState = false;
 
         string ddlValue = Request.Form.Get("DropDownList1");
         switch (ddlValue)
         {
            case "customers":
               goto default;
            case "orders":
               pageGrid.gridDbConnection = ConfigurationManager.ConnectionStrings["NorthwindConnectionString"].ConnectionString;
               pageGrid.gridQuery = "SELECT OrderID, OrderDate, ShipName, ShipAddress FROM Orders";
               gridColumn.Clear();
               gridColumn.Add(new myListviewColumn(0, "orderid", "Order", AttributeType.String, 100));
               gridColumn.Add(new myListviewColumn(1, "orderdate", "Orderdatum", AttributeType.String, 100));
               gridColumn.Add(new myListviewColumn(2, "shipname", "Bedrijf", AttributeType.String, 100));
               gridColumn.Add(new myListviewColumn(3, "shipaddress", "Adres", AttributeType.String, 100));
               break;
            default:
               pageGrid.gridDbConnection = ConfigurationManager.ConnectionStrings["NorthwindConnectionString"].ConnectionString;
               pageGrid.gridQuery = "SELECT CompanyName, ContactName, Address, City FROM Customers";
               gridColumn.Clear();
               gridColumn.Add(new myListviewColumn(0, "companyname", "Bedrijf", AttributeType.String, 200));
               gridColumn.Add(new myListviewColumn(1, "contactname", "Contactpersoon", AttributeType.String, 200));
               gridColumn.Add(new myListviewColumn(2, "address", "Adres", AttributeType.String, 200));
               gridColumn.Add(new myListviewColumn(3, "city", "Plaats", AttributeType.String, 200));
               break;
         }
 
         CreateListlayout();
 
      }
 
      private void CreateListlayout()
      {
 
         GridClientSelectColumn selectColumn;
         selectColumn = new GridClientSelectColumn();
         selectColumn.UniqueName = "ClientSelectColumn";
         selectColumn.HeaderStyle.Width = Unit.Pixel(35);
         selectColumn.Resizable = false;
         RadGrid1.MasterTableView.Columns.Add(selectColumn);
 
         GridBoundColumn boundColumn;
         for (int i = 0; i < gridColumn.Count; i++)
         {
            boundColumn = new GridBoundColumn();
            boundColumn.DataField = gridColumn[i].AttributeName;
            boundColumn.HeaderText = gridColumn[i].Name;
            boundColumn.ItemStyle.Wrap = false;
            if (i < gridColumn.Count - 1) { boundColumn.HeaderStyle.Width = Unit.Pixel(gridColumn[i].Width); }
            RadGrid1.MasterTableView.Columns.Add(boundColumn);
         }
 
      }
 
      protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
      {
         SqlDataReader dr;
         dr = SqlRetrieve(pageGrid.gridQuery, pageGrid.gridDbConnection);
         RadGrid1.DataSource = dr;
      }
 
      protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
      {
         RadGrid1.CurrentPageIndex = 0;
         RadGrid1.MasterTableView.SortExpressions.Clear();
         RadGrid1.Rebind();
      }
 
 
      // Retrieve data using a SQL Query
      public static SqlDataReader SqlRetrieve(string sql, string connectionString)
      {
 
         // Create the database connection
         SqlConnection dbConnection = new SqlConnection(connectionString);
 
         // Prepare the SQL command execution
         SqlCommand cmd = new SqlCommand(sql, dbConnection);
         cmd.CommandType = CommandType.Text;
 
 
         // Retrieve data with sqlDataReader
         try
         {
            dbConnection.Open();
            // Make sure the database connection is closed when the datareader is closed.
            return cmd.ExecuteReader(CommandBehavior.CloseConnection);
         }
         catch (SqlException dbex)
         {
            return null;
         }
         catch (Exception ex)
         {
            return null;
         }
 
      }
 
      public class myListview
      {
         public string gridQuery { get; set; }
         public string gridDbConnection { get; set; }
      }
 
      public class myListviewColumn
      {
         public int Index { get; set; }
         public string Name { get; set; }
         public string AttributeName { get; set; }
         public int Type { get; set; }
         public int Width { get; set; }
 
         public myListviewColumn(int index, string attributename, string name, int type, int width)
         {
            Index = index;
            Name = name;
            Type = type;
            Width = width;
            AttributeName = attributename;
         }
 
      }
 
   }
}

Kind Regards, Remco
Remco
Top achievements
Rank 1
 answered on 07 Dec 2011
3 answers
191 views
Im currently using this example in one of my projects :
Confirm dialog example

When I want to use resources files to localize my application, i normally use a tag like this to set the text :
Text="<%$ Code: ResourceFile.Some_TranslatedText_DependingOnCulture %>"

Do you have a suggestion on how I can use the same technique to have to localized version of the prompt text and title text ? The sample below is obviously not working ...

OnClientClick="return blockConfirm(" + <%$ Code: 
ResourceFile
.TranslatedPrompt %> + ", event, 330, 100, '', " + <%$ Code: 
ResourceFile
.
TranslatedTitle 
 %> + ");"


Thank you !
Marin Bratanov
Telerik team
 answered on 07 Dec 2011
1 answer
110 views
I have a RadWindow in a separate DNN module that acts as an Address validator(it calls a service that we have access to).  If the address is invalid it shows a modal popup to allow them to use the suggested address or not.

The module is placed in a different module that is doing an applications that has several addresses to validate.  This module is using an ASP wizard.  This is reference by

<%

@ Register Src="../AddressValidator/AddressValidator.ascx" TagName="AddressValidator" TagPrefix="AddVal" %>

 

and

 

<AddVal:AddressValidator ID="addValBorrower" runat="server" />

<AddVal:AddressValidator ID="addValBorrowerPhysical" runat="server" />

<AddVal:AddressValidator ID="addValEmployeer" runat="server" />

<AddVal:AddressValidator ID="addValStudent" runat="server" />

<AddVal:AddressValidator ID="addValRef1" runat="server" />

<AddVal:AddressValidator ID="addValRef2" runat="server" />


Which are all place outside of the

asp

:Wizard

Everything works ok and the modal window pops up when desired.

The problem is when using the wizard previous button.  After the modal window is displayed and a selection is made.  If the previous button is selected...none of the Telerik controls work properly.  For instance if we have RadDatePicker...it displays the text to select the calendar(rather than the calendar image)...and then the calendar does not display correct.  Similar things happen to the RadComboBox...it displays(but not as dropdown box) and the values displaying strangely.

There are no javascript errors that show in the browser. 

Is there something that I'm missing that causes all the ajax controls to go screwy?

Marin Bratanov
Telerik team
 answered on 07 Dec 2011
0 answers
65 views
I am using a radajaxpanel and doing a postback.  After the postback the controls all resize when hovering over them.  Any reason for this and how do I fix?
Matthew
Top achievements
Rank 1
 asked on 07 Dec 2011
2 answers
116 views
Is there anyway to set the RadComboBox into an invalid state, like RadInput? I'd like a similar rendering mode, with a little yellow warning sign, and such.
Jerome
Top achievements
Rank 1
 answered on 07 Dec 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?