Telerik Forums
UI for ASP.NET AJAX Forum
8 answers
1.7K+ views
With a "plain" ASP control, I could write something like <asp:TextBox ... onChange="Test('Hello World')" />
With a Telerik RadInput control, I cannot pass parameters to my events <Telerik:RadTextBox ... ClientEvents-OnValueChanged="Test(<Cannot send parameters>)" />

In the above simple example, one could get around this limitation any number of ways.  However, in a more complex application, this causes a real problem.

I have a user control which has, among other things, a dynamically created TextBox or RadInput control (the exact flavour of input control varies depending on properties passed to the user control).  Think of my user control as my own Input control, containing common input funcionality that we use in our application.

One of the things this user control does is handle database lookups that occur when focus is lost on a field.  The OnChange event is called, passing a number of parameters (input IDs, lookup options, etc) to a JavaScript function, which ultimately calls other JavaScript functions, web methods, callback functions, and possibly AJAX postbacks.  When the input control is a TextBox, everything works fine.  But since Telerik RadInput controls use their own client events, and because those events do not allow me to pass parameters to the JavaScript, it does not work.

A typical page on our application might contain 20-100+ of these controls, each control requires different parameters to be sent to the JavaScript function handling the OnChange event, and the input controls inside the user control are created dynamically, all of which makes it very impractical to try and "work around" this issue by using hidden fields or global variables, etc.

Please consider either making the "built in" OnChange handlers work in RadInput, or expanding upon your own client events to allow us to send parameters to the method.

Thanks.
Princy
Top achievements
Rank 2
 answered on 22 Jul 2014
1 answer
151 views
Hi,
How can I add a GridTemplateColumn in my grid with label and tooltip and take the data from a field of my object

I tried something like 
<telerik:GridTemplateColumn UniqueName="Bt1" DataField="Field1">
                           <ItemTemplate>
                               <asp:Label Text='<%#Eval("Field1") %>' runat="server"></asp:Label>
                           </ItemTemplate>
                       </telerik:GridTemplateColumn>

<telerik:RadClientDataSource ID="RadClientDataSource1" runat="server" AllowBatchOperations="true">     
       <ClientEvents OnDataParse="LoadImageGrid" OnChange="LoadBigMap" />
       <DataSource>
           <WebServiceDataSourceSettings>
               <Select Url="load_map.asmx/GetHomeData" RequestType="Post" DataType="JSON" ContentType="application/json; charset=utf-8" />
           </WebServiceDataSourceSettings>
       </DataSource>
       <Schema>
           <Model>
               <telerik:ClientDataSourceModelField FieldName="Field1" DataType="String" />
               <telerik:ClientDataSourceModelField FieldName="Field2" DataType="String" />
              ...
           </Model>
       </Schema>  
   </telerik:RadClientDataSource>

But it doesn't show any text..
and I have no idea how to add a tooltip

If I try with
<telerik:GridBoundColumn UniqueName="Bt1" DataField="Field1" HeaderText="BT1" AllowFiltering="false">                       
                      </telerik:GridBoundColumn>

it works but still I don't have the tooltip

Thanks
Marin
Telerik team
 answered on 21 Jul 2014
2 answers
132 views
I'm having a hard time understanding what I might be doing wrong here. Firebug is throwing an error in this piece of code:

b.RadComboBox.prototype._getOffsetParentOffset=function(f){var d=0;
var e=0;
var h=a(f.offsetParent);
if(h.css("position")!="static"){var g=h.offset();
d=g.top;

There's more code, but I figured this was enough for you to determine where this problem is. Firebug is throwing the following:

TypeError: g is null

And it's trying to use it on that last line. What's going on? Thanks.

Edit:
Thought I'd add more about my setup. The particular RadComboBox that throws this exception is a RadComboBox+RadTreeView. I'm using an AjaxManager to ajaxify most of the controls (including this one) one the page. Once I use another control using the RadComboBox+RadTreeView throws this error, but as long as I only use the RadComboBox+RadTreeView it seems to work.
Dimitar Terziev
Telerik team
 answered on 21 Jul 2014
3 answers
178 views
Hi,

I've got the RadPersistenceManager working, saving my RadTabStrip.  However, looking at the XML (and confirmed here) the only attribute of the entire RadTabStrip that is persisted, despite almost 1K of XML, is an integer indicating the 0-based index of the Selected tab.

<Name>SelectedIndices</Name>
<Value Type="System.Collections.Generic.List`1[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]">
  <ArrayOfString>
    <string>4</string>
  </ArrayOfString>
</Value>

I suppose that's useful in some cases but what seems to me to be much more useful is to persist the order of the tabs. I have tab reordering enabled and, having done so, I thought it would be natural to add the RadTabStrip to the RadPersistenceManager's PersistenceSettings and reload that tab order when the page is reloaded.  (E.g. enabling users to reorder the tabs how they prefer.)

However, obviously because the tab order is not saved, when I reload the tab strip the tabs are restored in their default order, but the tab that is now Selected is potentially some other tab entirely because they've been un-reordered.

I have two requests:

1) When saving a RadTabStrip, the RadPersistenceManager should save both the Selected tab AND the tabs' order.
2) When saving a RadTabStrip, the RadPersistenceManager should save the Selected tab's name, or other unique identifier, instead of overloading its index as a unique ID.  Restoring the Selected tab by its index is less than useless if you allow tab reordering.

In fact, I would dump the persistence of the Selected tab altogether, if it's only going to be done by index.  It's meaningless in the context of reordering tabs.

Thanks,
~Jeff
Jeff
Top achievements
Rank 1
 answered on 21 Jul 2014
2 answers
168 views
Hi,


Please help me in the below situation:

1) I have data's in datatable and I have converted datatable to string builder in aspx.cs (web application without MVC)
2) Need your help in how to bind this string builder from code behind to kendo grid in aspx


Waiting for your quick response!!!!


Regards,
Asha
Asha
Top achievements
Rank 1
 answered on 21 Jul 2014
1 answer
130 views

Hi All,

 Here i have paste my coding.
 for Example ClaimNo value= 'PCL/15 and new project PREPARED on 15/07/2014 '

 I want Split and concatenate for claimno ('PCL/15 and new project EDITED on 15/07/2014')

 and one more question how to color change text in PREPARED / EDITED condition where a.status='ADD / MOD'

protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
  var Bind = (from a in db.MY_Alerts
   select new { ClaimNo = a.ClaimNo, a.ProjRefNo }).ToList();
  RadGrid17.DataSource = Bind;
}

Thanks
Ansari.
Princy
Top achievements
Rank 2
 answered on 21 Jul 2014
1 answer
74 views
I use the ImageEditor to draw a signature on a webpage. This page is viewed on a iPad. When the user zooms in on the page to make the control bigger, drawing on the canvas does not work anymore.

Is there a solution for this.

best regards,
Lanzo van Slooten
Vessy
Telerik team
 answered on 21 Jul 2014
2 answers
164 views
When using the stock layout the legend does not show. I is there ant way to get it to show?

Thanks
Ken
Top achievements
Rank 1
 answered on 21 Jul 2014
1 answer
146 views
Hello,

I have a simple question. In this page http://demos.telerik.com/aspnet-ajax/scheduler/examples/pdfexport/defaultcs.aspx there is scheduler export to PDF. When file is exported, you can see that output quality is really low. It is jpg image in pdf, right? Is there any way how to choose output quality?

Based on source code, there is method in SchedulerExporter.cs

​        private void ConvertBitmapToJpeg(Bitmap bmp)
        {
            var ms = new MemoryStream();
            bmp.Save(ms, ImageFormat.Jpeg);
            _gifArray.Add(ms.ToArray());
        }

The is no encoder settings parameter (http://msdn.microsoft.com/en-us/library/system.drawing.bitmap.save(v=vs.110).aspx). Any way how to do it? OR are there any plans to implement this?

Regards
René
Plamen
Telerik team
 answered on 21 Jul 2014
1 answer
130 views
I am using the radasyncupload control with a custom handler.  The custom handler uploads the files directly to a database. 

I am trying to get the control to persist these uploaded files across postback.  In the documentation it simply states that I need to set PostbackTriggers to the id of the button involved with submitting the form.  When I do that, the files are NOT persisted (the list of files already uploaded do not stay there). 

Is there something that I'm missing with this?  Is this a bug with persisiting files while using the custom handler?
Boyan Dimitrov
Telerik team
 answered on 21 Jul 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?