Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
325 views
I have a data bound combobox. How can I set the selected value to the last item from my database?

Thanks, Marty
Princy
Top achievements
Rank 2
 answered on 03 Dec 2012
1 answer
283 views
I am using two columns in my EditFormSettings, and I want to set the width of the text box on the edit to 90%.  I have tried using  multiple properties on the ItemStyle, like ItemStyle-CssClass="NameOfCssClassThatHas90%Width" and ItemStyle-Width="90%" without any success.  The textbox that shows up only has about 40% width.

Any Suggestions?  As I have about 20 controls in the edit form, using a code-behind isn't my preferred method, and I didn't see how to use a ColumnEditor Class.  Can one columneditor class be attached to multiple GridBoundColumns?

I am trying to create a professional looking application, and without changing that width, it just doesn't look good.

Here is my code for the column, if you are interested.  You will notice this is an "email" type form.

 

 

<telerik:GridBoundColumn DataField="cRegarding" EditFormColumnIndex="0" MaxLength="150"

 

 

 

FilterControlAltText="Filter cRegarding column" HeaderText="Subject"

 

 

 

SortExpression="cRegarding" UniqueName="cRegarding" ></telerik:GridBoundColumn>

 

Shinu
Top achievements
Rank 2
 answered on 03 Dec 2012
21 answers
1.1K+ views
I have a RadGrid that i'm putting into default edit mode following the documentation here: http://www.telerik.com/help/aspnet/grid/grddefaulteditmodeforgriditemsoninitialload.html

Everything works great, except when I have a GridHyperlinkColumn. I will get the error: Column 'FileName' does not belong to table DefaultView.
My HyerlinkColumn code looks like this:
<telerik:GridHyperLinkColumn HeaderText="View Hyperlink" DataTextFormatString="View Hyperlink"
                   DataNavigateUrlFields="FileName" UniqueName="FileName2" DataNavigateUrlFormatString="http://www.xyz.com/{0}"
                   ShowFilterIcon="false" DataTextField="FileName" AllowFiltering="false" >
               </telerik:GridHyperLinkColumn>


protected void RadGrid1_PreRender(object sender, EventArgs e)
{
    if (!IsPostBack)
    {
        foreach (GridItem item in RadGrid1.MasterTableView.Items)
        {
            if (item is GridEditableItem)
            {
                GridEditableItem editableItem = item as GridDataItem;
                editableItem.Edit = true;
            }
        }
        RadGrid1.Rebind(); // It fails with the error here, when the Grid is rebinding.
    }

The error will fail when the grid is rebinding. I'm assuming it's trying to put the HylinkColumn into edit mode, but I don't know enough about the RadGrid to tell it to skip it in the foreach loop.
Alan
Top achievements
Rank 1
 answered on 03 Dec 2012
1 answer
97 views
Hi,

I am using radfilter control to filter my grid. I want to traverse each group and filter of each group programmatically. Currently I am using "RadFilter1.RootGroup.Expressions" method but it shows only root group and it's filter. How do I traverse other group and it's filter. Please help.

Thanks
Alex
Top achievements
Rank 1
 answered on 02 Dec 2012
0 answers
82 views
Hi,
The issue appeasers in RTL direction on some IE8/IE9 that Silver Light is not installed. As I checked JS function "_createLabel" of below code throws this issue:
b.Modules.IFrame=function(p,l){var q=0;
var g=0;
var i=null;
var t="RadUrid";
var k=b;
var h={};
a.extend(this,fileInputAdded:
function(x){
   var v=r();
       a(v).change(a.proxy(s,this)).addClass("ruFileInput");
     if(p._getIsRightToLeft()&&$telerik.isIE){
            var w=$telerik.$("<span></span>").addClass("ruRtlWrap");
            w.append(v);
           v=w[0];
      }
     a(x).append(v);
     var u=p._createLabel(a(v).attr("id"));
     a(x).append(u);
}
...

When direction is RTL, _createLabel throws js error " d("<label>").attr("for",e).html   is null".
I get this on version Q3 2011.

Now I have set it's direction to LTR.
Is it possible to fix issue without upgrading to new version?
mohsen
Top achievements
Rank 1
 asked on 01 Dec 2012
1 answer
134 views
I cant seem to be able to access btnCreateVersion inside of the RadGrid--> MasterTableView -->DetailTables -->GridTableView

I am adding security and need to be able to access the button and make it visible if the user has access to it.

What is the best was of doing this

<CommandItemTemplate>
                                         <asp:ImageButton ID="btnCreateVersion" runat="server" CommandName="CreateVersion" ImageUrl="~/Image/epi_add.png"
                                             Height="14px" Visible="true"></asp:ImageButton>
                                         <asp:LinkButton ID="lblCrtEpi" runat="server" Text="Create Versions" CommandName="CreateVersion" Visible="true"></asp:LinkButton>  
                                     </CommandItemTemplate>
Jayesh Goyani
Top achievements
Rank 2
 answered on 01 Dec 2012
2 answers
111 views
I have this markup which executes:
<telerik:RadAjaxManager ID="ramTicket" runat="server" OnAjaxRequest="ramTicket_AjaxRequest" DefaultLoadingPanelID="ralpPrivate">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="ramTicket">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="panTicketList" />
                <telerik:AjaxUpdatedControl ControlID="panTicket" />
                <telerik:AjaxUpdatedControl ControlID="panTotalTickets" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
 
<telerik:RadCodeBlock runat="server">
    <script type="text/javascript">
        // The subscribed close function for the Ticket window
        function OnTicketClose(sender, args) {
            var ramTicket = $find('<%= ramTicket.ClientID %>');
            ramTicket.ajaxRequest('Rebind: ' + args);
        }
    </script>
</telerik:RadCodeBlock>
and fails to fire the server method ramTicket_AjaxRequest. I've verified that the OnTicketClose function fires with Firebug.

A related point, the loading panel appears as it should, but never goes away.

What is preventing the request?
Matthew
Top achievements
Rank 1
 answered on 30 Nov 2012
6 answers
228 views
hi

My company has a high turnover rate of employees and given the code sample telerik provided it is not dynamic for my situation. How do i make it dynamic without changing anything at the aspx page whenever there is a change at the employee table? thanks

 <ResourceTypes>
         <telerik:ResourceType KeyField="ID" Name="User" TextField="UserName" ForeignKeyField="UserID"
                        DataSourceID="UsersDataSource" />
  </ResourceTypes>
                <ResourceStyles>
                    <telerik:ResourceStyleMapping Type="User" Text="Alex" ApplyCssClass="rsCategoryBlue" />
                    <telerik:ResourceStyleMapping Type="User" Text="Bob" ApplyCssClass="rsCategoryOrange" />
                    <telerik:ResourceStyleMapping Type="User" Text="Charlie" ApplyCssClass="rsCategoryGreen" />
                </ResourceStyles>
Ryan Baxter
Top achievements
Rank 1
 answered on 30 Nov 2012
0 answers
113 views
As per the page below, RadUpload should have a "dir" property but i find it does not appear in intellisence options.  Why is that?

http://www.telerik.com/help/aspnet-ajax/upload-adupload-rtl-support.html
Also, i notice that instead of cicking the "Select" button to open a file explorer, i can just click the textbox beside the button.  Is that normal?
Stacy
Top achievements
Rank 1
 asked on 30 Nov 2012
1 answer
88 views
I have a radwindow that controls an aspx page.

<telerik:RadWindow ID="wndDownloadAccounts" runat="server" Title="Download Accounts" Skin="Web20" Width="500px" Height="270px"
    ReloadOnShow="true" ShowContentDuringLoad="false" Behaviors="Close" VisibleStatusbar="false" DestroyOnClose="false" NavigateUrl="~/Views/Accounts/DownloadAccountsWindow.aspx" />


The contents of DownloadAccountsWindow.aspx are as follows:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DownloadAccountsWindow.aspx.cs" Inherits="Foo.FooBar.Views.Accounts.DownloadAccountsWindow" MasterPageFile="~/Resources/MasterPages/Bare.Master" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<asp:Content ContentPlaceHolderID="CP1" runat="server">
 
    <script type="text/javascript">
 
        function InitAccountsData() {
            var data = getRadWindowParent().GetAllAccountsData();
            $get('<%= allAccountsData.ClientID %>').value = data;
        }
 
        function OnTypeChanged(sender, args) {
            // <%-- This is vestigial code. --%>
            var selected = sender.get_selectedItem().get_text();
        }
     
    </script>
     
    <asp:HiddenField ID="allAccountsData" runat="server" />
 
    <div style="padding: 10px;">
     
        <table cellpadding="5">
            <tr>
                <td>Download Type</td>
                <td>
                    <telerik:RadComboBox ID="cmbDownloadType" Width="200px" runat="server" Skin="Vista" OnClientSelectedIndexChanged="OnTypeChanged" OnClientLoad="OnTypeChanged" >
                        <Items>
                            <telerik:RadComboBoxItem Text="Morningstar Office" Value="Morningstar" />
                            <telerik:RadComboBoxItem Text="Morningstar Principia" Value="Principia" />
                            <telerik:RadComboBoxItem Text="Morningstar Principia CAMS" Value="CAMS" />
                            <telerik:RadComboBoxItem Text="Orion" Value="Orion" />
                            <telerik:RadComboBoxItem Text="EbixCRM SmartOffice" Value="SmartOffice" />
                        </Items>
                    </telerik:RadComboBox>                 
                </td>
            </tr>
            <tr>
                <td>As-Of Date</td>
                <td>
                    <telerik:RadDatePicker ID="dateAsOf" runat="server" Skin="Vista" />
                </td>
            </tr>          
        </table>
        <br />
        <center>
            <asp:Button ID="btnDownload" runat="server" Text="Download" Width="100px" OnClick="btnDownload_Click" />
                
            <input type="button" value="Close" style="width:100px;" onclick="getRadWindow().close()" />
        </center>
     
    </div>
     
    <script>
 
        InitAccountsData();
     
    </script>
 
</asp:Content>

When I navigate directly to the aspx, I get the following result:
Direct Link

When I load up the aspx in the radwindow I get the following:
In radwindow

Any item that is selected is not shown in the radcombobox when I load this aspx in a radwindow.

Is there a known issue with Radwindows and radcomboboxes?
Nencho
Telerik team
 answered on 30 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?