Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
273 views
Hi

I have the following code.  It all works except that if the ImageDescription contains a null the page of course fails with an error.  I am using a literal because the ImageDescription may actually have some html in it or just plain text.

Is it possible to preform some conditional logic on the value to either fill the text with a set of spaces or a default description like "No description available" for those records where the ImageDescription is null?

                <telerik:RadRotator ID="RadRotator1" runat="server" DataSourceID="LinqDataSource1" 
                    Height="340px" Width="450px" ItemHeight="340px" ItemWidth="450px" FrameDuration="7000"
                    <ItemTemplate> 
                        <asp:Image ID="Image1" runat="server" ImageUrl='<%# DataBinder.Eval(Container.DataItem, "ImageURL").ToString().Trim() %>' 
                            Style="height: auto; width: auto" /> 
                    </ItemTemplate> 
                    <ItemTemplate> 
                        <asp:Literal runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "ImageDescription").ToString().Trim() %>'></asp:Literal>  
                    </ItemTemplate> 
                </telerik:RadRotator> 
 
 

Thanks Paul
Paul
Top achievements
Rank 2
 answered on 29 May 2009
0 answers
103 views
Hi,

I have this unusual requirement. I have a list of Products and Categories. A product can belong to multiple categories and vice versa. I want to allow the user to search for category using an autocomplete feature. At the same time, they should have the feature to have a drop down that will list all categories in a treeview (btw, the categories table is self referenced) and user can select by clicking on the treeview or have a checkbox.

Now comes the difficuly part (for me atleast), I want the user to be able to filter a treeview as they type. i.e The treeview items must be filtered, basically displaying the autocomplete dropdown in a treeview.
1. There are 2 options when you do this, one is either, make tree of the filtered items, i.e, if the parent item of a node exists in the filtered result as well, then make a tree
2. Display the whole tree, even if the parent items are unrelavant, for every node that is found in the filtered result (but not the child nodes obviously)

I can think of few hurdles for option 1, for example,
        Memory
                Harddrive
                        Above 250 GB
                                Master

Now in the category structure above, when you type "M", it is supposed to filter Memory and Master Above 250 GB, but Hardrive is the link, we could replace any missing links by "..." or something when we display.

        Memory
                ...
                        Master

What do you think, is it possible to do it with your controls? Bascially, I want to use treeview inplace of the autocomplete and the filtered results must be display in treeview, if their parent nodes are available, OR display top most or all above nodes.

Please help me out asap. If that feature is not available, may be you could build it. I have seen many people looking for this, but no exact solution is available anywhere.
Sathish
Top achievements
Rank 1
 asked on 29 May 2009
2 answers
81 views
I'm using the Footer of the RadComboBox to load a control so I can add new items to the database for the RCB.
Having my user control wrapped in a DIV, I start it with display:none and use a link and jQuery to show/hide this control.

What I would like to do is to collapse the item list when I show my usercontrol. 

Looking at the source, the div containing the UL does not have an ID. (Which, if I can do suggest through here, maybe give it an id?)

I'm still pretty new with jQuery (love it, but not good yet) so I don't know how to pull it with that. I would like a cleaner way, since I think jquery may do it to all item sections in all RCB's on the page.

Any tips be much appreciated
Baatezu
Top achievements
Rank 2
 answered on 29 May 2009
1 answer
102 views
Hi,

How boolean values to be exported to excel. Columns are autogenerated? Please reply with some solutions/suggestions.

Thanks,
Venkat
Daniel
Telerik team
 answered on 29 May 2009
4 answers
156 views
Hi,

I am inserting using a custom user control and everything works fine except for getting the SelectedItem.Value from the DropDownList.  It always gets the item at index 0.

Any help would be greatly appreciated.

Thank you,
 Nick
Nick
Top achievements
Rank 1
 answered on 29 May 2009
1 answer
196 views
I have a grid with master and detail table view. If I rebind master table on client side by setting args.set_cancel(true); in OnCommand client side event it only bind with master table and but dont bind with detail table although I explicitly rebind each detail table after rebind master table but it does not work. If I rebind only each detail table it bind successfully.

addCompany2() called on button click.
var companies = null;
    var empId = -1000;
    var curDataItem = null;
    var companyId = -100;
    
    $(document).ready(pageLoad);
    
    function pageLoad()
    {
        companies = [{"CompanyID":1,"CompanyName":"Moftak","Employees":[{"CompanyId":1,"FirstName":"Naeem","EmployeeID":1,"LastName":"Dad","Title":"","TitleId":0,"BirthDate":"","ShiftStart":"","JoinDate":""},{"CompanyId":1,"FirstName":"Nabil","EmployeeID":2,"LastName":"Manzoor","Title":"","TitleId":0,"BirthDate":"","ShiftStart":"","JoinDate":""}]},{"CompanyID":2,"CompanyName":"Chillisauce","Employees":[{"CompanyId":2,"FirstName":"James","EmployeeID":1,"LastName":"T","Title":"","TitleId":0,"BirthDate":"","ShiftStart":"","JoinDate":""},{"CompanyId":2,"FirstName":"Will","EmployeeID":2,"LastName":"Z","Title":"","TitleId":0,"BirthDate":"","ShiftStart":"","JoinDate":""}]},{"CompanyID":3,"CompanyName":"Microsoft","Employees":[{"CompanyId":3,"FirstName":"Niclus","EmployeeID":1,"LastName":"Gage","Title":"","TitleId":0,"BirthDate":"","ShiftStart":"","JoinDate":""},{"CompanyId":3,"FirstName":"Peter","EmployeeID":2,"LastName":"Khan","Title":"","TitleId":0,"BirthDate":"","ShiftStart":"","JoinDate":""}]}];        
        if(companies == null)
            companies = new Array();
    } 
var bindIndex = 0;


function addCompany2()
    {                 
        debugger;   
        var company = new Object();
        company.CompanyName = "Test Company";
        company.CompanyID = companies.length+1;
        
        companies[companies.length] = company;           
        
        var grd = $find("<%= RadGrid1.ClientID %>");                       
                   
        document.getElementById("hdCompanies").value = $.toJSON(companies);  
           
        grd.get_masterTableView().rebind();     
        
        for(var i=0;i<companies.length;i++)
        {
            if(grd.get_detailTables()[i] != null)
            {
                grd.get_detailTables()[i].rebind();
                bindIndex++;
            }
            
        }    
        bindIndex = 0;
    }          
    
    function OnCommand(sender,args)
    {
       args.set_cancel(true);
       
       if(args.get_commandName() == "RebindGrid")
       {   
          resetContainers();
                                       
          if(args.get_tableView().get_name() == "Company")
          {            
            sender.get_masterTableView().set_dataSource(companies);
            sender.get_masterTableView().dataBind();                    
          }
          
          if(args.get_tableView().get_name() == "Employee")
          {            
            sender.get_detailTables()[bindIndex].set_dataSource(companies[bindIndex].Employees);
            sender.get_detailTables()[bindIndex].dataBind();                    
          }
       }                    
    }


Daniel
Telerik team
 answered on 29 May 2009
4 answers
612 views
I have a radgrid. Within the radgrid in Edit or AddMode I have a radcombobox and amount field which are bound to a datasource. Depending on certain values in the radcombobox that the user selects in add and edit mode  - I need to show one extra textbox  within the popup box so that users can enter % numbers. Once the user enters the % number,  the amount needs to be automatically calculated  -  can someone please provide an example for this ?

Neeraj
Top achievements
Rank 1
 answered on 29 May 2009
6 answers
255 views
I'm extremely frustrated.

I was sincerely hoping by now (after 4 years of using radcontrols) the install would simply work.

2 months ago i installed trial version of RadControls ASP.NET AJAX. The controls in design view never rendered "unknown server tag". I spent some time trying to resolve this, gacutil etc. didn't work. Also had problems getting my project to see the telerik dll and build. After some pain, i was able to build and publish my project.

I've now bought the controls and have re-installed. The controls still don't render. So today i've had some time to take another run at getting this working. No love. I am very disappointed that i have to spend my time trying to get something that should simply work working. I need to work on what people pay me for.. not this.. blah blah blah. Did i mention i am frustrated?

After a another gacutil run i had the controls rendering in design view but upon running/debugging my app i get the following error:

 

Server Error in '/' Application.

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load file or assembly 'Telerik.Web.UI' or one of its dependencies. The system cannot find the file specified.

Source Error:

[No relevant source lines]

Source File: none    Line: 0

Assembly Load Trace: The following information can be helpful to determine why the assembly 'Telerik.Web.UI' could not be loaded.

=== Pre-bind state information ===
LOG: User = TCRUISE\rich
LOG: DisplayName = Telerik.Web.UI
 (Partial)
LOG: Appbase = file:///F:/ProjectSourceCode/Propurchaser/trunk/Admin/
LOG: Initial PrivatePath = F:\ProjectSourceCode\Propurchaser\trunk\Admin\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: F:\ProjectSourceCode\Propurchaser\trunk\Admin\web.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: The same bind was seen before, and was failed with hr = 0x80070002.


I've tried removing and re-adding the references etc. This broke the design view and the app still doesn't build.

I am running VS 2008 with SP1 on a Vista ultimate machine, 64 bit. I can't imagine spending another 5 minutes dealing with this. I'm not the greatest programmer as is.. so any extra time i can actually get PROGRAMMING rather than system administering my useless machine is always a good thing. Someone at Telerik please give me the magic solution. I want to see my controls in design view and i want my application to run (see the telerik dll's). Not one or the other.. both at the same time. Please help. thanks.

webconfig.. someone will probably ask:

<

 

httpHandlers>

 

<

 

add verb="*" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" validate="false"/>

 


<

 

controls>

 

<

 

add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI"/>

 


Rich
Top achievements
Rank 1
 answered on 29 May 2009
5 answers
229 views
Hi All,

From a client-side javascript I calc some values and update 

RadDateInput controls from javascript: Like the example:

 

var _oSpeed = Sys.Application.findComponent('FormView1_RNTBSpeedAverage');  
var _KMTotal = parseFloat(_oKMTotal.get_value());  
var _Speed = parseFloat("0");  
 
if (_KMTotal != 0 && _Hour != 0) {  
    _Speed = (_KMTotal / _Hour);  
}  
 
_oSpeed.set_value(_Speed);   
 
 
 

 

On the website the new value is set correctly to the control (during the cliet-site javascript) but if I update/insert the record to the database (I use objectdatasources) the autmatic seted values from the controls aren't save to the database.

Any Idea why? Is there a function to update the controls after I set the set_value() function or somethign else?

Thanks a lot
Regards
Christian

Georgi Krustev
Telerik team
 answered on 29 May 2009
2 answers
110 views
I'm struggling how to implement this with the latest version of the RadEditor.

I tried this KB article but I believe this might be for the old version of the controls as when it gets to AttachEventHandler it says that method is not implemented
http://www.telerik.com/help/aspnet/editor/includingsymbolcounterandlimitthetextlength.html

I've also tried just implementing a asp:customvalidator and using javascript to get the innerText.trim().count - but it appears that is always inflated do to the inclusion of  "DesignHTMLPreview   " and some other charecters at the end.

What's the best way to do this with the lastest version and why isn't this functionality baked in?




Jeremy Coenen
Top achievements
Rank 1
 answered on 29 May 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?