Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
448 views
What is the easiest way to disable or hide the close button on a RadDock?

Thank you!

Madhav Joshi
Top achievements
Rank 2
 answered on 04 Nov 2012
4 answers
135 views
Hi,

I've used the RowDetailsTemplate tag in the Silverlight version of the Grid and can't seem to be able to reproduce this same functionality in .Net AJAX. How could I achieve this? I basically need a panel with some text to show up when someone clicks on an item.

Thanks,


Roberto
Top achievements
Rank 1
 answered on 03 Nov 2012
1 answer
1.3K+ views
Hi
Is it possible to enable/disable icons of telerik:GridButtonColumn in grid rows?
I want to disable "delete icon" for some grid rows through binding expression (or by OnItemDataBound) . 
&
Why this type of column does not support binding expression for
CommandArgument
?
Thank you very much.
Jayesh Goyani
Top achievements
Rank 2
 answered on 03 Nov 2012
3 answers
116 views
I have 3 columns and a template column the gets the percent of the other 3. I want to sort the template column highest to lowest. How can this be done?
Jayesh Goyani
Top achievements
Rank 2
 answered on 03 Nov 2012
4 answers
524 views
I have been wrestling with this on and off over the last couple days, and have not yet found a good basic sample. I am managing data in a business layer, so what I'm passing into the grid are lists of objects. For simplicity, let's say the two lists are:

The rows are:
ClientId
ClientName
ContactId
ContactName
ContactTypeId

The ContactTypeId column needs to provide a lookup, and on ItemDataBound I am passing a list of:
ContactTypeId
ContactTypeName

So far I have gotten it to almost work in several ways, but there always seems to be some weird behavior. Is there a good sample somewhere with the fields to set to connect up the name and id on the lookup column, and to display the correct choice on view and when the dropdown first enters edit mode. Sorry if I'm missing something obvious, I feel like I'm running into a (very hard) wall.

Cheers.
Damon
Top achievements
Rank 1
 answered on 02 Nov 2012
3 answers
341 views
When an exception occurs during the ItemsRequested event, a RadWindow is displayed to the user with the message "There was an error in the callback."

Instead, I want the exception to bubble up to Application_Error in global.asax, where I have implemented centralized error handling/logging for the web site. This centralized error handling logs the error and redirects the user to a common error page. 

I have many other pages in the website where I use RadAjaxManager to perform AJAX-updates. If an exception occurs on the server during one of these AJAX-postbacks, I am able to route the exception through Application_Error by setting web config's customErrors to "On" and setting AllowCustomErrorsRedirect to "true" for the ScriptManager. However, these settings do not seem to have any affect on exceptions that occur during the ItemsRequested event of RadCombo.

I understand that you can call a custom javascript function by setting the "OnClientItemsRequestFailed" property on RadCombo, or that I can swallow the exception by putting a try/catch block around the code in the OnItemsRequested server-side event handler. However, neither of these options meet my needs.

Is there a way to tell RadCombo to allow exceptions that occur during the ItemsRequested event to bubble up to Application_Error?

Thank you.
John
Top achievements
Rank 1
 answered on 02 Nov 2012
2 answers
218 views
Hi,

I am trying to use the RadGrid control to implement a table
that has a field indicating if the record is a favourite,
based upon a database bit field. In the RadGrid the field is
an image button.
I am using the RadGrid_ItemCommand event
to toggle the status of the flag in the database for the record
that the user clicked on.
I use the item.GetDataKeyValue("<DataKeyField>") to get the IDs that are
used to identify the record to toggle.

The problem:
The value returned by item.GetDataKeyValue("cli_id") is not
always correct. It is sometimes a value corresponding to a
different row.
I also tried using the CommandArgument property, but that has the
same behavior.

How do I get the correct value for the row that was clicked on

by the user?

Here is the RadGrid_ItemCommand event:

protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)
{
    Trace.Write("RadGrid1_ItemCommand: starting up...");
    if (e.CommandName == "ChangeStatus")
    {
        GridDataItem item = (GridDataItem)e.Item;
 
        //Get the record IDs from the DataKeyNames
        System.Data.DataRowView oRow = (System.Data.DataRowView)item.DataItem;
        int iApp_id = Convert.ToInt32(item.GetDataKeyValue("app_id"));
        int iCli_id = Convert.ToInt32(item.GetDataKeyValue("cli_id"));
        bool bIsFav = Convert.ToBoolean(item.GetDataKeyValue("IsFav"));
        Trace.Write("RadGrid1_ItemCommand: iApp_id: " + iApp_id);
        Trace.Write("RadGrid1_ItemCommand: cli_id: " + iCli_id);
        Trace.Write("RadGrid1_ItemCommand: bIsFav: " + bIsFav);
        int itmp = Convert.ToInt32(e.CommandArgument);
 
        //Toggle the Favorite status for that combination
        SqlConnection oConn = new SqlConnection(SqlDataSource_GridViewSolutions.ConnectionString);
        SqlCommand oCmd = new SqlCommand("toggle_gru_IsFav_Status", oConn);
        oCmd.CommandType = System.Data.CommandType.StoredProcedure;
 
        //ToDo make User name dynamic: oCmd.Parameters.Add(this.Page.User.Identity.Name);
        oCmd.Parameters.Add(new SqlParameter("strLoginID", "the_user"));
        oCmd.Parameters.Add(new SqlParameter("app_id", iApp_id));
        oCmd.Parameters.Add(new SqlParameter("cli_id", iCli_id));
        try
        {
            oConn.Open();
            oCmd.ExecuteNonQuery();
        }
        catch (Exception ex1)
        {
            Response.Write("Error updating favorite status: " + ex1.Message);
        }
        finally
        {
            oConn.Close();
            oConn.Dispose();
        }
        RadGrid1.Rebind();
    }

Here is the markup for the RadGrid control:

<div class="apps_by_clients">
    <asp:SqlDataSource ID="SqlDataSource_GridViewSolutions"
        ConnectionString="Data Source=BTSLSQLDEV01;Initial Catalog=GenericStorage;User ID=userid;pwd=xxxxxxxxx"
        SelectCommand="EXEC GetAppsWithFavStatus 'the_user'"
        runat="server" />
</div>
  
<telerik:RadGrid ID="RadGrid1" runat="server" 
    AllowPaging="True" 
    CellSpacing="0" 
    DataSourceID="SqlDataSource_GridViewSolutions" 
    GridLines="None" 
    PageSize="30" 
    Skin="Vista" 
    Width="720px"
    AutoGenerateColumns="False"
    AllowFilteringByColumn="True"
    GroupingSettings-CaseSensitive="false" 
    onitemcommand="RadGrid1_ItemCommand" 
    OnPreRender="RadGrid1_PreRender">
    <MasterTableView 
    DataSourceID="SqlDataSource_GridViewSolutions"
    GroupsDefaultExpanded="false"
    DataKeyNames="app_id, cli_id, IsFav"
    >
        <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
  
        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
  
        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
        <Columns>
            <telerik:GridBoundColumn DataField="cli_name" 
                FilterControlAltText="Filter cli_name column" HeaderText="cli_name" 
                UniqueName="cli_name" SortExpression="cli_name">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="app_name" 
                FilterControlAltText="Filter app_name column" HeaderText="app_name" 
                SortExpression="app_name" UniqueName="app_name">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="app_id" DataType="System.Decimal" 
                FilterControlAltText="Filter app_id column" HeaderText="app_id" ReadOnly="True" 
                SortExpression="app_id" UniqueName="app_id">
            </telerik:GridBoundColumn>
            <telerik:GridTemplateColumn DataField="IsFav" 
                HeaderText="Favourite?" 
                UniqueName="IsFav"
                AllowFiltering="false"
                >
                <ItemTemplate>
                    <asp:ImageButton ID="ImageButton1" runat="server" 
                        ImageUrl='./'
                        CommandName="ChangeStatus"
                        CommandArgument='<%# Eval("cli_id") %>'
                        />
                </ItemTemplate>
            </telerik:GridTemplateColumn>
        </Columns>
        <EditFormSettings>
            <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
        </EditFormSettings>
        <PagerStyle PageButtonCount="5" />
    </MasterTableView>
  
    <PagerStyle PageButtonCount="5" />
  
    <FilterMenu EnableImageSprites="False"></FilterMenu>
</telerik:RadGrid>

We are using ASP.Net 4.0 on Windows server 2008
We are using 2012.2.607.40 of the Telerik Radcontrols


Cheers,
Geoff

BtsiTech
Top achievements
Rank 1
 answered on 02 Nov 2012
4 answers
69 views
Hi,

I've just installed the new Q2 version of the controls and in the main all is fine.  I have however noticed that in Chrome I end up with an extra margin inside a RadSplitter.  So I tried to inspect the CSS with Chrome, as soon as I try the margin collapses and the page looks as it should.  I've deleted as much as possible on the page to get to a working example.  The following code works in Chrome, you should see a left blue column,  the right column has some text,  the text appears maybe 15-20px away from the blue panel, if you now open it up for inspection the margin disappears.

Note that if you refresh the page with the inspector open in chrome then the margin appears for half a second or so then disappears.

Regards,

Jon

<head id="Head1" runat="server">
    <title></title>
    <style type="text/css">
        html, body, form
        {
            height: 100%;
            margin: 0px;
            padding: 0px;
            overflow: hidden;
        }
        .surroundPaneBackground
        {
             background-color: #8ba0bc;
             height: 100%;
             width: 100%;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadStyleSheetManager ID="pgRadStyleSheetManager" runat="server"></telerik:RadStyleSheetManager>
        <telerik:RadScriptManager ID="pgRadScriptManager" runat="server"></telerik:RadScriptManager>
        <div id="ParentDivElement" style="height: 100%;">
            <telerik:RadSplitter ID="uxRadSplitter" runat="server" Height="100%" Width="100%" Orientation="Vertical" LiveResize="true" BorderSize="0">
                <telerik:RadPane ID="uxRadPaneLeft" runat="server" MinWidth="0"><div class="surroundPaneBackground"></div></telerik:RadPane>
                <telerik:RadPane ID="uxRadPaneMain" runat="server" Scrolling="none" Width="850">
                    <telerik:RadSplitter ID="RadSplitter1" runat="server" Height="100%" Orientation="Horizontal" LiveResize="true" BorderSize="0">
                        <telerik:RadPane ID="uxRadPaneContent" runat="server" Scrolling="none" >
                        aaaa
                        </telerik:RadPane>
                    </telerik:RadSplitter>
                </telerik:RadPane>
            </telerik:RadSplitter>
        </div>
    </form>
</body>
</html>


Vessy
Telerik team
 answered on 02 Nov 2012
1 answer
143 views
Hello Telerik Team,

We are using Telerik Rad Editor in application to implement Email system. When ever we paste any links in Rad editor save it in data base it saves properly, but when we are loading the same content in to same rad editor for viewing, and when we click on the links, the corresponding link is opening up in Rad editor itself. Please find the attached image file with name "Capture1.PNG" file which is default look of the rad editor when we load the content in to editor.  

But when we click on the link it is opening in Rad editor itself as shown in the image file with name "Capture2.png". I need to open up the link in new tab window. 

Please find attachment. Please help me solve this issue.

Thanks,
Arvind Chary N.
Rumen
Telerik team
 answered on 02 Nov 2012
1 answer
66 views
I am using An Advance Form to insert and edit an Appointment using WebService for data binding. After the appointment is inserted, or edit, if the appointment time in not in the view, I want to move the scheduler to the appointment date. Is there a way to achieve this? Is there a way to attache a client side js function to an Update button of the Advance Form after the appointment is updated? Thank you in advance.
Boyan Dimitrov
Telerik team
 answered on 02 Nov 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?