Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
190 views
I have a simple template column with a hyperlink in it:

<telerik:GridTemplateColumn FilterControlAltText="Filter AMRLink column" HeaderText="AMR Link" UniqueName="AMRLink" FilterControlWidth="92%">
    <HeaderStyle Width="420px" />
        <ItemTemplate>
            <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("AMRLink", "\\localserver.com\Department_Shares\Manufacturing\Engineering\GSIS AMR-MR\{0}") %>'
                                    Text='<%# Eval("AMRLink", "{0}") %>' Target="_blank"></asp:HyperLink>
        </ItemTemplate>
        <EditItemTemplate>
            <asp:TextBox ID="txtAMRLink" runat="server" Text='<%# Bind("AMRLink") %>' Width="98%" />
        </EditItemTemplate>
</telerik:GridTemplateColumn>

It works great - it links to the correct file, and I can edit/insert just fine.

The thing is, when the user inserts/edits, they have to type in a couple more folders depths plus the file name
(e.g., "Shift1\Testers\TestReport_03_25_2013.pdf").  The directory where the file may be located is not consistent, hence their need to type in the directory names.

So, is it possible to have them click on a button, navigate around to the correct file, select it, and have that file path saved as the new hyperlink?

Thanks ahead of time...
Marin
Telerik team
 answered on 28 Mar 2013
4 answers
241 views
 we have wrote the localized codes for strings "today", "day", "week" and "month" shown in radscheduler control,and the strings will be read from database to get the localized strings. for example:                   _view.ResourceScheduler.Localization.AdvancedCalendarCancel = I18N.Tag("Cancel");
            _view.ResourceScheduler.Localization.AdvancedCalendarOK = I18N.Tag("OK");
            _view.ResourceScheduler.Localization.AdvancedCalendarToday = I18N.Tag("Today");
            _view.ResourceScheduler.Localization.HeaderToday = I18N.Tag("today");
            _view.ResourceScheduler.Localization.HeaderDay = I18N.Tag("Day");
            _view.ResourceScheduler.Localization.HeaderMonth = I18N.Tag("Month");
            _view.ResourceScheduler.Localization.HeaderWeek = I18N.Tag("Week");
            _view.ResourceScheduler.Localization.ShowMore = I18N.Tag("more...");
when we first load the pages which contain radscheduler control and don't do any operations for this control, it will be shown the correct localized strings, but when we click the navigation tab Day/Week/Month or select an event scheduler the localzied strings will be returned to English ones. Please see the attachment, how to fix this issue? 
Plamen
Telerik team
 answered on 28 Mar 2013
5 answers
258 views
Hi,

I have a RadGrid in my Page and with in ItemTemplate i have RadTimePicker Control.

I need to display 24 hrs in 15 min interval hence i need vertical scroll bar.

Request you to please suggest  any event with in with i can wire up my style for height and ovrflow or any other alternatiove way of having vertical scroll bar.

Thanks and regards,
Manish Patel
Vasil
Telerik team
 answered on 28 Mar 2013
15 answers
302 views
I've just upgraded to 2011.3.1115.35 and my RadGrid now crashes.

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index 
   
   System.Collections.CollectionBase.System.Collections.IList.get_Item(Int32 index) +7602287
   Telerik.Web.UI.GridGroupByExpressionCollection.get_Item(Int32 index) +48

I've tracked this to having multiple <GroupByFields> defined in the aspx. Delete either of the <GroupByFields> children and it works fine.  I did not have this problem in Q1 2011

<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="false">
    <MasterTableView>
        <GroupByExpressions>
            <telerik:GridGroupByExpression>
                <SelectFields>
                    <telerik:GridGroupByField FieldName="Group1" ></telerik:GridGroupByField>
                    <telerik:GridGroupByField FieldName="Group2" ></telerik:GridGroupByField>
                </SelectFields>
                <GroupByFields>
                    <telerik:GridGroupByField FieldName="Group1" SortOrder="Descending"></telerik:GridGroupByField>
                    <telerik:GridGroupByField FieldName="Group2" SortOrder="Descending"></telerik:GridGroupByField>
                </GroupByFields>
            </telerik:GridGroupByExpression>
        </GroupByExpressions>
        <Columns>
            <telerik:GridBoundColumn DataField="Group1" HeaderText="1" ></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Group2" HeaderText="2" ></telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

For completeness here is the VB for the page

Partial Class TestArea_Test
    Inherits System.Web.UI.Page
  
    Protected Sub RadGrid1_NeedDataSource(sender As Object, e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource
        Dim result As New List(Of Test)
        result.Add(New Test("first", "second"))
        RadGrid1.DataSource = result
    End Sub
  
    Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
        RadGrid1.Rebind()
    End Sub
End Class
  
Class Test
    Private _Group1 As String
    Private _Group2 As String
  
    Public Sub New(ByVal g1 As String, ByVal g2 As String)
        Group1 = g1
        Group2 = g2
    End Sub
    Public Property Group1 As String
        Get
            Return _Group1
        End Get
        Set(value As String)
            _Group1 = value
        End Set
    End Property
    Public Property Group2 As String
        Get
            Return _Group2
        End Get
        Set(value As String)
            _Group2 = value
        End Set
    End Property
End Class

Cedric
Top achievements
Rank 2
 answered on 28 Mar 2013
1 answer
108 views
I want to change the column's text like an enum from an int to a value.  For example I get a data field "CompanyId" for 1 I want to display "ACME Inc" for 2 I want to display "Bike Shop"
Now I could change it on the object I've sent over, but I've been living in the XAML world for a while and I was wondering if there was an easy way to convert it.  I guess almost like a calculated column but that looks like it's only for numbers.
Radoslav
Telerik team
 answered on 28 Mar 2013
14 answers
1.1K+ views
Hi All

I have three rad combo box in my form, countries, states and cities.

When a country is selected its states should be loaded into the states list and so when a state is selected its cities should be loaded into the cities list.

i want to do this using client side APIs

after searching your form i found an solution and apply it as the following code:-

my form source 
  
<table>
 <tr>
              <td class="RC1"  style="width:10%;">
                 <asp:Label ID="lblCountry" runat="server" ></asp:Label>
              </td>
              <td style="width:90%;" class="RC2">
                  <telerik:RadComboBox ID="lstCountries" Runat="server" Width="200px" 
                    Filter="StartsWith" onclientdropdownopening="DropDownOpening" ValidationGroup="ValAddressInfo"  OnClientSelectedIndexChanged="loadStates">
                   </telerik:RadComboBox>
                   <asp:RequiredFieldValidator ID="reqCountry" runat="server" 
                           ControlToValidate="lstCountries" CssClass="Validator"  ValidationGroup="ValAddressInfo">*</asp:RequiredFieldValidator>
               </td>
            </tr>
            <tr>
             <td class="RC1" style="width:20%;" >
               <asp:Label ID="lblStates" runat="server"  ></asp:Label>
             </td>
             <td class="RC2" style="width:80%;">
                 <telerik:RadComboBox ID="lstStates" Runat="server"  
                      Width="200px" 
                     Filter="StartsWith" onclientdropdownopening="DropDownOpening" 
                     OnClientSelectedIndexChanged="loadCities"  
                     onitemsrequested="lstStates_ItemsRequested" OnClientItemsRequesting="statesItemRequesting"  EnableLoadOnDemand ="true" >
                      <CollapseAnimation Type="OutQuint" Duration="200" />  
                 </telerik:RadComboBox>
            </tr>
            <tr>
              <td class="RC1" style="width:20%;">
                <asp:Label ID="lblCities" runat="server" ></asp:Label>
              </td>
              <td class="RC2" style="width:80%;">
                 <telerik:RadComboBox ID="lstCities" Runat="server"  Width="200px" Filter="StartsWith" onclientdropdownopening="DropDownOpening" onitemsrequested="lstCities_ItemsRequested" OnClientItemsRequesting="citiesItemRequesting"  EnableLoadOnDemand ="true"  >
                </telerik:RadComboBox>
              </td>
            </tr>
</table>

<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
  <script type="text/javascript" language="javascript">
           function loadStates(sender, args) {       
            var listStates = $find("<%=lstStates.ClientID %>");           
              
            var item = args.get_item();   
     
            if (item.get_index() > 0)   
            {
                listStates.requestItems(item.get_value(), false);                  
             }   
            else   
            {   
            }
  
        }
  
        function statesItemRequesting(sender, args) {
            var lst1 = $find("<%=lstCountries.ClientID %>");
            var context = args.get_context();
            context["country_code"] = lst1.get_selectedItem().get_value();
        }
  
        function loadCities(sender, args) {
            var listCities = $find("<%=lstCities.ClientID %>");
  
            var item = args.get_item();
  
            if (item.get_index() > 0) {
                listCities.requestItems(item.get_value(), false);
            }
            else {
            }
        }
  
        function citiesItemRequesting(sender, args) {
            var lst1 = $find("<%=lstCountries.ClientID %>");
            var lst2 = $find("<%=lstStates.ClientID %>");
            var context = args.get_context();
            context["country_code"] = lst1.get_selectedItem().get_value();
            context["state_code"] = lst2.get_selectedItem().get_value();
        }
  
      
         
  
  
   </script>
</telerik:RadScriptBlock>

in the code behind
  
protected void lstStates_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
  
{
  
int iCountryCode = Convert.ToInt32(Convert.ToInt32(e.Context["country_code"]));
  
bindList(iCountryCode,0,lstStates,2);
  
}
  
protected void lstCities_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
  
{
  
int iCountryCode = Convert.ToInt32(Convert.ToInt32(e.Context["country_code"]));
  
int iStateCode = Convert.ToInt32(Convert.ToInt32(e.Context["state_code"]));
  
bindList(iCountryCode, iStateCode, lstCities, 3);
  
}
 and the bindList is where i get the data from data base tables and fill it in the lists.

all are ok,,,,


BUT

i noticed that when i try to open the states combo box for example, it sticks then i should click any where in the form then try again to open it again so the items appear...

all functions are called and executed and the lists are filled...

but what is the reson for this behaviour?
this can ne be acceptable since the user may think that the list is stuck!!!

please help

asaad

Boyan Dimitrov
Telerik team
 answered on 28 Mar 2013
7 answers
307 views
It appears that the clientside may be lacking this functionality or it's just not documented anywhere that I can find. If I have the index of the RotatorItem that I want to display in the rotator, how to do I tell the rotator to go to that specific item using javascript. I have multiple rotators on a page and I want to be able to make them all rotate to the same item when the user selects a different value in the drop down list. The one hang up is just getting them to go to the selected value.$0$0$0$0Thanks,$0$0Adam$0
Slav
Telerik team
 answered on 28 Mar 2013
1 answer
328 views
Dear All/Support Team,

I have requirement to display record in a telerik grid with one column as View with Icon. on click view icon it open the edit form and render the  required control with two button as per the code given below. ie Inser/Update and Cancel button.

Now I am bale to either disable and enable the control on load, but I want to enable all the control in edit form on clicking the buttons(ie adding Edit button in the form). if I have to add Edit button as per my requirement in the following code, how to enable all control with client side code and avoid server side post back. How Edit button command event is set to none instead of  CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' or
 / CommandName="Cancel"


<td align="left" colspan="3">
    <asp:ImageButton ID="btnInsert" runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'
        ImageUrl="~/Images/Update.gif" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
        ToolTip="Save To Grid" ValidationGroup="ValDecision" /> 
    <asp:ImageButton ID="btnCancel" runat="server" CausesValidation="False" CommandName="Cancel"
        ImageUrl="~/Images/Cancel.gif" ToolTip="Cancel" />
</td>

Kindly guide me on the same

With Regards
Palanivelrajan
Kostadin
Telerik team
 answered on 28 Mar 2013
1 answer
137 views

Hello Techies,

I am new to this forum. This is Sree. I work on SharePoint 2010.

We developed a user controls which queries the data from SharePoint library and bind the result into RadGrid.

Here the problem is when search query returns more than 15000 records; it takes too much time to bind the result into RadGrid and finally end up with timeout error (attached snapshot). Sometimes the page gets hung and the only option we have is to close the browser.

Is there any recommended item limit for RadGrid to avoid these issues?

As per my requirement my search query always returns more than 20000 records(may increase to a lack in future) and I can’t suggest users to put more refinement to get few results so that I can avoid these problems.

I certainly need your valuable advice's on this to overcome such scenarios?

Thanks in advance

Sree

Angel Petrov
Telerik team
 answered on 28 Mar 2013
3 answers
285 views
hi,
I have  more than one rad text box which is multiline and one Radgrid in my page .
When i press enter in any text box, delete command of Radgrid is getting fired which i don't want.
I tried writing a code for not accepting enter key press event but it is also applying to text box which are multiline.
I want enter key to be present in text box but it should not fire any other events of Radgrid.
Please help me. 
Daniel
Telerik team
 answered on 28 Mar 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?