Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
152 views
Hi,

I have two different appointments like "Planned Date", "Approved date" in a row. Sometimes, both will fall on the same day/month.
In such case i would like to show only one i.e."Approved date" alone. So, I have set the visibility of the "Planned date" as false in those cases. This works fine.
But when i change the "Planned date" to some other day, then "AppointmentInsert" is getting called instead of "AppointmentUpdate" event. because of that, i am able to a "planned date" slot two times in that row itself.(since insert event is getting called). Can somebody suggest a solution?

Thanks,
Farjana
Boyan Dimitrov
Telerik team
 answered on 20 Feb 2014
4 answers
582 views
Hi,
I have this grid:

<asp:updatepanel runat="server">
        <ContentTemplate>
        <telerik:RadGrid ID="actGrid" runat="server" AllowFilteringByColumn="True"
            AllowSorting="True" CellSpacing="0" CssClass="gridBlock" GridLines="None"
                AutoGenerateColumns="false" AllowPaging="true" ShowHeader="True">
            <ClientSettings>
            <%--<ClientEvents OnCellSelected="OnRowSelection"/>--%>
            <Selecting AllowRowSelect="True" />
            </ClientSettings>
            <PagerStyle Mode="NumericPages"></PagerStyle>
            <MasterTableView TableLayout="Fixed" PageSize="5">
                <Columns>
                    <telerik:GridBoundColumn ItemStyle-Font-Bold="true" DataField="Description"/>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
        </ContentTemplate>
        </asp:updatepanel>



I'm trying to add an event to update other elements (checkboxes and textboxes) in the page on row selection using the ClientEvents OnCellSelected (I've commented it), but when I uncomment this part of code I cannot select any rows anymore and no event is firing.

Any suggestions?

Thx










Fousto
Top achievements
Rank 1
 answered on 20 Feb 2014
1 answer
88 views
Hello Telerik Team,

I got a question, I've been trying to change or remove the tooltip that is related with the "GoToPageLinkButton" but I cannot find where o how do I do that, Obviusly the first thing I did was try to change or find it in the RadGrid.Main.Resx but there's no such resource, in that file I changed the other tool tips related with the grid and It worked fine,   I have changed the culture to "es-MX" in the grid when I créate it, also  in the Global.asax at the Star event, and even in the Web.config  but havent been successful , could u please help me with this issue, I attached the sceen shot , so I can be more clear.

Thanks in advance.
Princy
Top achievements
Rank 2
 answered on 20 Feb 2014
3 answers
110 views
Hi Team,

We use Telerik Web UI DLL, Version 2009:2:826:35.

We use RadComboBox control to select/type values from dropdownlist. The SelectedIndexChanged event is not getting triggered in IE9, but works fine in lower versions of IE. Kindly let us know if we need to download newer version of the DLL or anything else needs to be changed.

Code snippet used:

<telerik:RadComboBox MaxLength="6" runat="server" ID="RadComboBoxMappingType" DataTextField="LookUpvalue"
DataValueField="LookupTypeID" AutoPostBack="true" AllowCustomText="true" AppendDataBoundItems="true"
Visible="false" Width="100px" OnSelectedIndexChanged="RadComboBoxMappingType_SelectedIndexChanged">
<Items>
<telerik:RadComboBoxItem Text="TypeID/select" Value="0" Selected="true"></telerik:RadComboBoxItem>
</Items>
</telerik:RadComboBox>
Shinu
Top achievements
Rank 2
 answered on 20 Feb 2014
3 answers
75 views
Hi,
I am using radgrid and binding the grid from client side and my requirement is I need to enter custom page  number like GoTo "x" page number instead of clicking on the grid footer and the grid need to hold the sorting before and after the jump from one page to other

Currently m implemented GoTo feature out side the grid and facing the problem with sort expression, Please suggest
Princy
Top achievements
Rank 2
 answered on 20 Feb 2014
1 answer
111 views
I am trying to create a portal type app with raddocks. On the title bar of the raddock I want to show a dropdown menu which the user can choose and navigate to a different page. can I just add a radmenu to the titlebar to achieve the functionality?

It will be great if you have an example to show a similar approach.
Shinu
Top achievements
Rank 2
 answered on 20 Feb 2014
3 answers
171 views
I have a project that I have been away from for a period of time and everything was working just fine, but when I came back to it to complete development, I have run into an issue with some of the grids not showing data in columns, but rather just "dumping it" in one long string.

I have attached a screen capture of the result, as well as display file and code behind.  Any chance you can tell me why the grid is doing this?

Thanks in advance for any assistance!

Lynn

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<h3>
    <asp:Label ID="ListHeader" runat="server" Text="Agents" ></asp:Label>
</h3>
<p>
    <asp:Label ID="ListExplanation" runat="server" Text="Real estate agents in your organization" ></asp:Label>
</p>
<div class="container">
    <div class="row10">
        <div class="one column" >
              
        </div>
        <div class="fourteen columns" >
            <telerik:RadGrid ID="RadGrid1" runat="server" AllowSorting="True" OnNeedDataSource="RadGrid1_NeedDataSource" Width="99.7%"
                AutoGenerateColumns="false" AllowPaging="false" OnItemDataBound="RadGrid1_ItemDataBound"  AllowFilteringByColumn="True">
                <ExportSettings HideStructureColumns="true" Csv-ColumnDelimiter="Comma" IgnorePaging="true" OpenInNewWindow="true" ExportOnlyData="true" >
                </ExportSettings>
                <MasterTableView Width="100%" CommandItemDisplay="Top" EnableViewState="true">
                    <PagerStyle Mode="Slider"></PagerStyle>
                    <CommandItemTemplate>
                        <table class="rcCommandTable" width="100%">
                            <tr>
                            <td style="float: right; vertical-align:middle;" >
                                <asp:ImageButton runat="server" ID="btnCSVExport" ImageUrl="../Icons/csvdownload.jpg" CommandName="ExportToCSV" Height="24px" Width="24px" ToolTip="Export to CSV" />
                                <asp:ImageButton runat="server" ID="btnExcelExport" ImageUrl="../Icons/excel.png" CommandName="ExportToExcel" Height="24px" Width="24px" ToolTip="Export to Excel" />
                                <asp:ImageButton runat="server" ID="btnWordExport" ImageUrl="../Icons/ms_word_2.png" CommandName="ExportToWord" Height="24px" Width="24px" ToolTip="Export to Word" />
                                  
                            </td>
                            </tr>
                        </table>
                    </CommandItemTemplate>
                    <CommandItemSettings ShowExportToWordButton="true" ShowExportToExcelButton="true" ShowExportToCsvButton="true" ShowExportToPdfButton="false">
                    </CommandItemSettings>
                </MasterTableView>
            </telerik:RadGrid>
        </div>
        <div class="one column" >
              
        </div>
    </div>
</div>


protected void Page_Init(object sender, System.EventArgs e)
{
    if (!Page.IsPostBack)
    {
        sType = Request["T"];
        //  Get the users form security rules and set the buttons accordingly
        string sUserFormRules = Convert.ToString(Session["UserBrokerPlusFormsRules"]);
        string sRule = "";
        switch (sType)
        {
            case "A":   //  Active
                this.ListHeader.Text = "Active Agents";
                this.ListExplanation.Text = "Real estate agents presently working for your organization";
                sRule = sUserFormRules.Substring(21, 1);
                break;
            case "I":   //  Inactive
                this.ListHeader.Text = "Inactive Agents";
                this.ListExplanation.Text = "Real estate agents that are not working for your organization but are still on the roster";
                sRule = sUserFormRules.Substring(22, 1);
                break;
            case "T":    //  Terminated
                this.ListHeader.Text = "Terminated Agents";
                this.ListExplanation.Text = "Real estate agents that worked for your organization in the past";
                sRule = sUserFormRules.Substring(23, 1);
                break;
            default:
                Response.Redirect("~/UserNotAuthorized.aspx");
                break;
        }
        switch (sRule)
        {
            case "0":
                //  the user is not authorized for this page, so send them to the error page
                Response.Redirect("~/UserNotAuthorized.aspx");
                break;
            case "1":
                //  The user is only authorized for read-only activities, so set the buttons accordingly
                this.CreateNew.Enabled = false;
                break;
            case "2":
                //  The user is authorized to update data, so leave the buttons as is
                break;
        }
 
        this.RadGrid1.AllowFilteringByColumn = true;
        GridHyperLinkColumn hypercolumn = null;
        GridBoundColumn boundcolumn = null;
 
        hypercolumn = new GridHyperLinkColumn();
        this.RadGrid1.Columns.Add(hypercolumn);
        hypercolumn.HeaderText = "Edit";
        hypercolumn.UniqueName = "Agent";
        hypercolumn.Text = "<img border=\"0\" alt=\"View\" src=\"../Icons/pencil_16.png\" />";
        hypercolumn.DataNavigateUrlFields = new string[] { "Agent" };
        hypercolumn.DataNavigateUrlFormatString = "OfcAgentEdit.aspx?M=Y&T=" + sType + "K=" + "{" + "0" + "}";
        hypercolumn.AllowFiltering = false;
        hypercolumn.HeaderStyle.Width = Unit.Pixel(50);
        hypercolumn.Exportable = false;
        hypercolumn = null;
 
        hypercolumn = new GridHyperLinkColumn();
        this.RadGrid1.Columns.Add(hypercolumn);
        hypercolumn.HeaderText = "Email";
        hypercolumn.UniqueName = "SendAgentMail";
        hypercolumn.Text = "<img border=\"0\" alt=\"View\" src=\"../Icons/mailIcon.gif\" />";
        hypercolumn.DataNavigateUrlFields = new string[] { "AgentEmail" };
        hypercolumn.DataNavigateUrlFormatString = "mailto:" + "{" + "0" + "}";
        hypercolumn.HeaderStyle.Width = Unit.Pixel(30);
        hypercolumn.AllowFiltering = false;
        hypercolumn.Exportable = false;
        hypercolumn = null;
 
        boundcolumn = new GridBoundColumn();
        this.RadGrid1.Columns.Add(boundcolumn);
        boundcolumn.UniqueName = "AgentID";
        boundcolumn.DataField = "AgentID";
        boundcolumn.HeaderText = "ID";
        boundcolumn.FilterControlWidth = Unit.Pixel(50);
        boundcolumn.HeaderStyle.CssClass = "mediumgridcol";
        boundcolumn.ItemStyle.CssClass = "mediumgridcol";
        boundcolumn.FooterStyle.CssClass = "mediumgridcol";
        boundcolumn.Visible = true;
        boundcolumn = null;
 
        boundcolumn = new GridBoundColumn();
        this.RadGrid1.Columns.Add(boundcolumn);
        boundcolumn.UniqueName = "AgentFullName";
        boundcolumn.DataField = "AgentFullName";
        boundcolumn.HeaderText = "Name";
        boundcolumn.HeaderStyle.Width = Unit.Pixel(240);
        boundcolumn.FilterControlWidth = Unit.Pixel(100);
        boundcolumn.Visible = true;
        boundcolumn = null;
 
        //  this code is left here as a working example of displaying a short date in a RadGrid column
        //boundcolumn = new GridBoundColumn();
        //this.RadGrid1.Columns.Add(boundcolumn);
        //boundcolumn.UniqueName = "NewsEndDate";
        //boundcolumn.DataField = "NewsEndDate";
        //boundcolumn.HeaderText = "End";
        //boundcolumn.DataFormatString = "{0:MM/dd/yy}";
        //boundcolumn.Visible = true;
        //boundcolumn = null;
 
        boundcolumn = new GridBoundColumn();
        this.RadGrid1.Columns.Add(boundcolumn);
        boundcolumn.UniqueName = "OfficeCommonName";
        boundcolumn.DataField = "OfficeCommonName";
        boundcolumn.HeaderText = "Office";
        boundcolumn.FilterControlWidth = Unit.Pixel(100);
        boundcolumn.HeaderStyle.CssClass = "largegridcol";
        boundcolumn.ItemStyle.CssClass = "largegridcol";
        boundcolumn.FooterStyle.CssClass = "largegridcol";
        boundcolumn.Visible = true;
        boundcolumn = null;
 
        boundcolumn = new GridBoundColumn();
        this.RadGrid1.Columns.Add(boundcolumn);
        boundcolumn.UniqueName = "AgentCellular";
        boundcolumn.DataField = "AgentCellular";
        boundcolumn.HeaderText = "Cellular";
        boundcolumn.FilterControlWidth = Unit.Pixel(60);
        boundcolumn.HeaderStyle.CssClass = "smallgridcol";
        boundcolumn.ItemStyle.CssClass = "smallgridcol";
        boundcolumn.FooterStyle.CssClass = "smallgridcol";
        boundcolumn.Visible = true;
        boundcolumn = null;
 
        boundcolumn = new GridBoundColumn();
        this.RadGrid1.Columns.Add(boundcolumn);
        boundcolumn.UniqueName = "AgentEmail";
        boundcolumn.DataField = "AgentEmail";
        boundcolumn.HeaderText = "Email";
        boundcolumn.HeaderStyle.CssClass = "smallgridcol";
        boundcolumn.ItemStyle.CssClass = "smallgridcol";
        boundcolumn.FooterStyle.CssClass = "smallgridcol";
        boundcolumn.Visible = true;
        boundcolumn.FilterControlWidth = Unit.Pixel(100);
        boundcolumn = null;
 
        RadGrid1.AllowPaging = Convert.ToBoolean(Session["ShowListsWithPaging"]);
        RadGrid1.PageSize = 20;
    }
    else
    {
        sType = Request["T"];
    }
}
 
protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
{
    //  this code is used to make filter columns visible/invisible as the grid grows/shrinks
    if (e.Item is GridFilteringItem)
    {
        GridFilteringItem Filter = (GridFilteringItem)e.Item;
        Filter["AgentID"].CssClass = "mediumgridcol";
        Filter["OfficeCommonName"].CssClass = "largegridcol";
        Filter["AgentCellular"].CssClass = "smallgridcol";
        Filter["AgentEmail"].CssClass = "smallgridcol";
    }
    ////  this code is left here for a working example of modifying column contents in a RadGrid
    //if (e.Item is GridDataItem)
    //{
    //    GridDataItem dataBoundItem = e.Item as GridDataItem;
    //    string strColumnValue1 = dataBoundItem["VendorShowInLists"].Text;
    //    if (strColumnValue1 == "0")
    //    {
    //        dataBoundItem["VendorShowInLists"].Text = "No";
    //    }
    //    else
    //    {
    //        dataBoundItem["VendorShowInLists"].Text = "Yes";
    //    }
    //}
}
 
protected void CreateNew_Click(object sender, EventArgs e)
{
    Response.Redirect("OfcAgentEdit.aspx?M=N&K=&T=" + sType);
}
 
public DataTable GetDataTable()
{
    String ConnString = System.Configuration.ConfigurationManager.ConnectionStrings["BrokerPlus"].ConnectionString;
    DataTable dt = new DataTable();
        string sStatusNeeded = "";
        switch (sType)
        {
            case "A":   //  Active
                sStatusNeeded = "Active";
                break;
            case "I":   //  Inactive
                sStatusNeeded = "Inactive";
                break;
            case "T":    //  Terminated
                sStatusNeeded = "Terminated";
                break;
            default:
                Response.Redirect("~/UserNotAuthorized.aspx");
                break;
        }
        switch (Convert.ToString(Session["UserDataProfile"]))
        {
            case "Enterprise":
                using (SqlConnection sqlcon = new SqlConnection(ConfigurationManager.ConnectionStrings["BrokerPlus"].ConnectionString))
                {
                    using (SqlCommand cmd = new SqlCommand("Agents_GetAllByAgentType_And_Account", sqlcon))
                    {
                        cmd.CommandType = CommandType.StoredProcedure;
                        cmd.Parameters.Add(new SqlParameter("@AgentStatus", sStatusNeeded));
                        cmd.Parameters.Add(new SqlParameter("@AgentRecType", "Agent"));
                        cmd.Parameters.Add(new SqlParameter("@Account", Convert.ToInt32(Session["UserAccount"])));
                        using (SqlDataAdapter da = new SqlDataAdapter(cmd))
                        {
                            da.Fill(dt);
                            return dt;
                        }
                    }
                }
            case "Company":
                using (SqlConnection sqlcon = new SqlConnection(ConfigurationManager.ConnectionStrings["BrokerPlus"].ConnectionString))
                {
                    using (SqlCommand cmd = new SqlCommand("Agents_GetAllByAgentType_And_Company", sqlcon))
                    {
                        cmd.CommandType = CommandType.StoredProcedure;
                        cmd.Parameters.Add(new SqlParameter("@AgentStatus", sStatusNeeded));
                        cmd.Parameters.Add(new SqlParameter("@AgentRecType", "Agent"));
                        cmd.Parameters.Add(new SqlParameter("@Company", Convert.ToInt32(Session["UserCompany"])));
                        using (SqlDataAdapter da = new SqlDataAdapter(cmd))
                        {
                            da.Fill(dt);
                            return dt;
                        }
                    }
                }
            case "Office":
                using (SqlConnection sqlcon = new SqlConnection(ConfigurationManager.ConnectionStrings["BrokerPlus"].ConnectionString))
                {
                    using (SqlCommand cmd = new SqlCommand("Agents_GetAllByAgentType_And_Office", sqlcon))
                    {
                        cmd.CommandType = CommandType.StoredProcedure;
                        cmd.Parameters.Add(new SqlParameter("@AgentStatus", sStatusNeeded));
                        cmd.Parameters.Add(new SqlParameter("@AgentRecType", "Agent"));
                        cmd.Parameters.Add(new SqlParameter("@Office", Convert.ToInt32(Session["UserOffice"])));
                        using (SqlDataAdapter da = new SqlDataAdapter(cmd))
                        {
                            da.Fill(dt);
                            return dt;
                        }
                    }
                }
            case "Agent":
                Response.Redirect("~/UserNotAuthorized.aspx");
                break;
        }
        return dt;
}
 
protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
    RadGrid1.DataSource = GetDataTable();
}
Lynn
Top achievements
Rank 2
 answered on 20 Feb 2014
4 answers
155 views
When I place a Rad Control in a Child Master Page which is nested within a Parent Master Page I get the following rollover error with the telerik: prefix, "Unrecognized tag prefix or device filter 'telerik'"

To demonstrate the problem I have used the Nested MasterPages with two level TabStrip project from the Code Library and added a Rad Control to the AnimalsMaster.Master page. A screenshot of the problem is attached.

Rgds Len Jones
Chad
Top achievements
Rank 1
 answered on 20 Feb 2014
20 answers
358 views

Hello,

I am having a strange problem with the RadGrid on IE 9.  The grid looks fine when published to a site, but when I am debugging code in Visual Studio 2008 the column alignment does not align with the headers.  This is affecting all grids in every .NET project that I have, but again - only when debugging or browsing the page from within Visual Studio.

This issue originally occurred when I went to IE 9 and only occurs when debugging or browsing a page in Visual Studio.  I had found a fix before, but cannot remember what the fix was (it was a either a setting in either IE or a modification to the skin for the grid) and cannot find it now.  Once the latest ASP.NET AJAX update was applied, the issue came back.  A sample of a grid that is affected by this issue is provided below.

<asp:Content ID="ViewEventLogContent" ContentPlaceHolderID="ViewEventLogContent" Runat="Server">
    <asp:Panel ID="pnlEventLog" runat="server" Visible="false">
    <table border="0" cellpadding="0" cellspacing="0" width="100%" class="gridTableStyle">
    <tr><td style="height:10px"> </td></tr>
    <tr>
        <td>
            <telerik:RadGrid ID="RadGridEventLog" runat="server"
                    AutoGenerateColumns="false" AllowSorting="True" AllowPaging="true" Skin="Simple" ClientSettings-Resizing-AllowColumnResize="true"
                    ItemStyle-Wrap="false" Width="95%" HeaderStyle-Wrap="false" PageSize="10"
                    OnNeedDataSource="RadGridEventLog_NeedDataSource">
                    <PagerStyle Mode="NumericPages" />          
                    <ClientSettings>
                        <Scrolling AllowScroll="true" UseStaticHeaders="true"  />
                    </ClientSettings>
                    <MasterTableView TableLayout="Fixed" AllowMultiColumnSorting="true" DataKeyNames="EventLogId" ShowFooter="false" PagerStyle-AlwaysVisible="false" >
                        <Columns>
                            <telerik:GridBoundColumn DataField="EventLogId" HeaderButtonType="TextButton" HeaderText="Event Log ID" HeaderStyle-Width="100" />
                            <telerik:GridBoundColumn DataField="CampaignId" HeaderButtonType="TextButton" HeaderText="Campaign ID" HeaderStyle-Width="80" />
                            <telerik:GridBoundColumn DataField="EventStatusDesc" HeaderButtonType="TextButton" HeaderText="Event Status" HeaderStyle-Width="160" />
                            <telerik:GridBoundColumn DataField="EventTypeDesc" HeaderButtonType="TextButton" HeaderText="Event Type" HeaderStyle-Width="100" />
                            <telerik:GridBoundColumn DataField="EventReasonDesc" HeaderButtonType="TextButton" HeaderText="Event Reason" HeaderStyle-Width="100" />
                            <telerik:GridBoundColumn DataField="EventMessage" HeaderButtonType="TextButton" HeaderText="Event Message" HeaderStyle-Width="200" />
                            <telerik:GridBoundColumn DataField="FirstName" HeaderButtonType="TextButton" HeaderText="First Name" HeaderStyle-Width="150" />
                            <telerik:GridBoundColumn DataField="LastName" HeaderButtonType="TextButton" HeaderText="Last Name" HeaderStyle-Width="150" />
                            <telerik:GridBoundColumn DataField="ProfDesignation" HeaderButtonType="TextButton" HeaderText="Prof. Designation" HeaderStyle-Width="200" />
                            <telerik:GridBoundColumn DataField="StateLicenseNumber" HeaderButtonType="TextButton" HeaderText="SLN" HeaderStyle-Width="200" />
                            <telerik:GridBoundColumn DataField="StateOfLicensure" HeaderButtonType="TextButton" HeaderText="State of Licensure" HeaderStyle-Width="200" />
                            <telerik:GridBoundColumn DataField="EmailAddress" HeaderButtonType="TextButton" HeaderText="Email" HeaderStyle-Width="250" />
                            <telerik:GridDateTimeColumn DataField="CreateDate" HeaderButtonType="TextButton" HeaderText="Date" HeaderStyle-Width="150" DataFormatString="{0:MM/dd/yyyy hh:mm:ss tt}" />
                        </Columns>
                    </MasterTableView>
            </telerik:RadGrid>
        </td>
    </tr>
    </table>
    </asp:Panel>
</asp:Content>


Thanks,

Sam Bronchetti
Top achievements
Rank 1
 answered on 19 Feb 2014
4 answers
90 views
A customer has reported a problem with the Real-Time Html View module. The behavior can be seen using the Telerik demo editor.


Go here to access the editor with the Real-Time Html View module enabled:

   http://demos.telerik.com/aspnet-ajax/editor/examples/builtinmodules/defaultcs.aspx


Steps to reproduce the problem:


1. switch to HTML view

2. delete everything in HTML view

3. switch back to Design view

4. click in the Design view area and start typing.


After a few seconds of typing, the focus will shift to the Real-Time Html View area. Anything you have typed in the design window will be lost.


Can you offer a solution to this problem?

Thanks!
Trevor
Top achievements
Rank 1
 answered on 19 Feb 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?