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

We use the RadRibbon control on a popup window (like when you select "new mail" in Office Outlook).

Some of the last menu groups are all the way to the right side of the popup, and when you hoover over them a tooltip is displayed.

But this tooltip is too wide, and causes the popup window to have scrollbars (when tooltip is visible)

Isnt it possible to have the tooltips align to the right or maybe even better - to align to til right side of the visible browser area as a maximum ?

It makes NO sense to have a tooltip, that is not readable as its outside of the visible browser area.

See the screenshot.


Cheers,
Tony Fonager
Boyan Dimitrov
Telerik team
 answered on 20 Feb 2014
1 answer
78 views
Hello,

I've noticed that pivot grid filter window displays relative to the pivot grid. I want to set the filter window on the center of the browser window. I've tried set_left,set_top client side functions with filter window OnClientShow event but it didn't work. Provide me with a code sample to achieve this. 

Thanks and Regards,
Yohan
Venelin
Telerik team
 answered on 20 Feb 2014
2 answers
60 views
Hi 

I am getting and exception "cannot order by type" after i try to sort my linq statement .

after this i populate it to a gridview.

var data = from d in db.TransactionMessages
                       where d.TransactionMessage1.Contains("POS - ") 
                       orderby d
                       select d.TransactionMessage1;

Grant
Grant
Top achievements
Rank 1
 answered on 20 Feb 2014
3 answers
167 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
630 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
122 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
136 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
97 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
162 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
202 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?