Telerik Forums
UI for ASP.NET AJAX Forum
9 answers
657 views
Hi, i'm trying to simulate the action of use aggregate="sum" property for a telerik:gridtemplatecolumn i use this kind of column `cause i need to set links in each cell value , when i use telerik:gridboundcolumn i cant use <item template><asp_hyperlink>, so finally what i need is set groupfooter totals, footer total and set as hyperlinks in each cell value. actually i can set the footer totals and the links but i cant set the group footer totals tnaks a lot and sorry for my english

<telerik:GridTemplateColumn UniqueName="Template1" GroupByExpression = "Febrero"
                                                 
                                                    <ItemTemplate>                                                         
                                                        <asp:HyperLink ID="targetControl" runat="server" NavigateUrl="#" Text='<%# Eval("Febrero") %>'></asp:HyperLink> 
                                                    </ItemTemplate>               
                                                    <FooterTemplate>                                                         
                                                        <asp:HyperLink runat="server" ID="TextBox2"
                                                        </asp:HyperLink>                                                         
                                                    <telerik:GridGroupPanel> 
                                                    <PanelItemsStyle Height="200" BackColor="Aquamarine" /> 
                                                    </telerik:GridGroupPanel> 
                                                    </FooterTemplate>    
                                                                                                                                                          
                                                </telerik:GridTemplateColumn> 
 
protected void tk_Grid_ItemDataBound(object sender, GridItemEventArgs e) 
    { 
        if (e.Item is GridDataItem) 
        { 
            GridDataItem dataItem = (GridDataItem)e.Item; 
            sum += double.Parse((dataItem["Template1"].FindControl("targetControl") as HyperLink).Text); 
        } 
        else if (e.Item is GridFooterItem) 
        { 
            GridFooterItem footer = (GridFooterItem)e.Item; 
            (footer["Template1"].FindControl("TextBox2") as HyperLink).Text = sum.ToString(); 
            FooterTotals = (footer["Template1"].FindControl("TextBox2") as HyperLink).Text; 
        } 

siva
Top achievements
Rank 1
 answered on 09 Feb 2011
1 answer
229 views
Hello.

To develop some features in our application we need to get and set caret position (i.e. distance from the beginning of the text or smth like that). It was mentioned by Telerik team in this four-years-old thread that RadEditor did not provide API to get/set caret position.

The only thing we actually need to do is to restore the caret position in design mode after some parts of content are changed (i.e., global reformatting of some keywords). So we store caret position, then some chunks are replaced, then updated HTML is set, and then we set restore caret position.

We have managed to do that in IE using TextRange (such a hack), but it is a really time consuming challenge to get this work properly in all other major browsers.

Browser compatibility is the reason why we use Telerik components. So I hope something have moved further in this area during these four years.

Regards,
Olexandr Vynnychenko
IntraNote a/s
Dobromir
Telerik team
 answered on 09 Feb 2011
1 answer
87 views
OnClientTextChange not firing for me with a webservice bound control

_combo.ID = "servicedd" + this.QuestionIDJavascriptFriendly;
_combo.WebServiceSettings.Path = this.WebServicePath;
_combo.WebServiceSettings.Method = this.WebMethod;
_combo.EnableLoadOnDemand = true;
_combo.EnableItemCaching = true;
_combo.AllowCustomText = true;
_combo.Filter = RadComboBoxFilter.Contains;
 
_combo.MaxHeight = new Unit(300, UnitType.Pixel);
_combo.CollapseAnimation.Type = AnimationType.None;
_combo.ExpandAnimation.Type = AnimationType.None;
_combo.EnableViewState = _viewstate;

I dont want custom text...so I was hoping to handle the OnClientTextChange to check the combo value field and cancel with an alert....
Yana
Telerik team
 answered on 09 Feb 2011
6 answers
606 views
Hi

i am using radcombobox in my page. the load on demand is working fine. 
when i click or place my cursor on the combobox it list out the items. but i want to list my items after typing 2 or 3 letters on the combobox.
how can i do this?

thanks.
geetha.
improwise
Top achievements
Rank 1
Iron
Iron
 answered on 09 Feb 2011
1 answer
101 views
hi all
I have a list view and RadDataPager . Inside the RadDataPager , I have a dropdownlist control, I would like get the value of the dropdownlist control. I try ctype(RadDataPager.findcontrol("dropdownlist"), dropdownlist).selectedvalue but failed. 

how can I get the find the control inside the RadDataPager. Thanks

Regards,
Tam
Princy
Top achievements
Rank 2
 answered on 09 Feb 2011
7 answers
133 views
Hello

How do i insert "Select One" in radcombo that have multiple column
something like http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/multicolumncombo/defaultcs.aspx

When i add radcombo item than it doesnt display in the drop downlist. It display "Blank item". when i select that blank item it display select one in the combo box.

Ideally i want user to see "select one" in rad combo when loaded for the first time.

Regards
Mac
Kalina
Telerik team
 answered on 09 Feb 2011
0 answers
83 views
Hi all,

I'm trying to select some text in a combobox filled with the loadondemand property set to true. For example, if I got a combo with employees and I select an employee, for example "Peter Griffin", I'm trying to select "Peter" clicking in the combobox filter to do another query only with the string "Peter", but everytime I click the combobox filter it selects the whole filter.

As I saw in this demo (http://demos.telerik.com/aspnet-ajax/combobox/examples/populatingwithdata/autocompletesql/defaultcs.aspx) I'm thinking that this is a current feature.

Can it be disabled easily?

Kind Regards,
Francisco
Top achievements
Rank 1
 asked on 09 Feb 2011
1 answer
90 views

Hi, 

I need to get the value of column, and was trying to get it as in the following thread:

http://www.telerik.com/community/forums/aspnet-ajax/grid/how-fetch-column-value-from-detailtables.aspx

protected void RG_SearchResult_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
{
...
             if (e.CommandName == "History")
             {
                  if (e.Item.OwnerTableView.Name == "Level2")   //check with name of DetailTableView <br>                
                  {
                              GridDataItem item = (GridDataItem)e.Item;
                              foreach (GridDataItem childItem in item.ChildItem.NestedTableViews[0].Items) 
                              {
                                      string value= childItem["PropCode"].Text;
                             }
                
...

But I here - item.ChildItem.NestedTableViews[0].Items get error - Object reference not set to an instance of an object.

What I am doing wrong ?

Kanat
Top achievements
Rank 1
 answered on 09 Feb 2011
0 answers
135 views
hi, i can't delete appointments.. in debug mode i never enter the function
here's the RadScheduler code in aspx
<telerik:RadScheduler runat="server"
ID="RadScheduler1"
 Width="1000px"
    SelectedDate="01-01-2011"
     TimeZoneOffset="03:00:00"
     DayStartTime="08:00:00"
     DayEndTime="18:00:00"
    StartEditingInAdvancedForm="false"
     DataKeyField="ID"
      DataSubjectField="Subject"
    DataStartField="Start"
     DataEndField="End"
      DataRecurrenceField="RecurrenceRule"                  
     OnFormCreating="RadScheduler1_FormCreating"
    DataRecurrenceParentKeyField="RecurrenceParentID"
    Skin="WebBlue" Culture="it-IT" FirstDayOfWeek="Monday"
    LastDayOfWeek="Friday" SelectedView="WeekView" 
    OnAppointmentDelete="RadScheduler1_OnAppointmentDelete" 
    AppointmentStyleMode="Simple" OnAppointmentDataBound="RadScheduler1_AppointmentDataBound" AllowDelete="true" OnClientAppointmentDeleting="onAppointmentDeleting"
  >

and the function
protected void RadScheduler1_OnAppointmentDelete(object sender, SchedulerCancelEventArgs e)
 
{
 
    // I never go in this function
 
}

i also set proprietyAllowDelete="true"
i cant' understand why the event don't run.

thanks
Ale

Alessandro
Top achievements
Rank 1
 asked on 09 Feb 2011
1 answer
112 views
I'm working on an ASP.NET custom control that uses RadTreeView inside RadComboBox (largely following the example on the demo site). It's entirely client side and does not postback on its own, so all event handling is done using clientside JavaScript.

The control will be used in several places on a page and I would like to simplify the JavaScript that needs to be deployed to the client (since there's quite a bit). Right now, though, the "control" is just an ASP.NET WebForm.

In general, I am able to do a lot of DOM walking in order to find objects by their relative position, but this is falling apart when I try to locate the ComboBox from a TreeNode.

For instance, I'd like to do this (not working):
function GetRadComboBoxFromRadTreeViewElement(treeViewElement) {
    var htmlRoot = $(treeViewElement).closest('div.MyCustomControl'); // walk up to control container
    var comboBoxDiv = $(htmlRoot).find('div.SearchableTreeCombo'); // find ComboBox container
    return $find($(comboBoxDiv).attr('id')); // look up ComboBox object from containing div id
}

The idea is that I pass some element from a TreeNode event handler to this function and it traverses the DOM and returns the RadComboBox client object.

This is failing for me because the HTML generated looks like this (severely trimmed down):

<html>
  <body>
    <form>
      <div class="rcbSlide">
        <div id="RadComboBox1_DropDown" class="RadComboBoxDropDown" ></div>
      </div>
 
      <div class="MyCustomControl">
        <label for="RadComboBox1" id="treeListLabel">Field Label: </label>
        <div id="RadComboBox1" class="RadComboBox RadComboBox_Default SearchableTreeCombo">
          <input id="RadComboBox1_ClientState" name="RadComboBox1_ClientState" type="hidden">
        </div>
      </div>
    </form>
  </body>
</html>

The actual TreeView contents are rendered in the 'rcbSlide' div, which is added as the first element on the form. The remainder of my control logic resides inside the 'MyCustomControl' div. That makes DOM walking impossible (or does it?) when I have multiple instances of the control on one form. I don't have access to ASP.NET IDs (e.g. <%= RadComboBox1.ClientID => because the controls are generated dynamically and not statically declared in any markup).

I'm hoping there is actually a way I can find the TreeView from the ComboBox and vice versa using JavaScript that is generic and reusable. If I can't, I think the only method I can follow is to add a copy of all of the JavaScript for each control on the form, and customize each block of script for each instance of a control.

That's not particularly disastrous, but it means that a LOT of redundant JavaScript is being sent to a client. Right now my JS (unminified, mind you) is 26KB to support one instance of the control. Some users will have up to 10 of these on a form and I hate to add so much bloat to my pages when the differences between the script blocks is so minimal.


Can anyone suggest anything? Thanks!
Stefan
Top achievements
Rank 1
 answered on 09 Feb 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?