Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
60 views

I am dynamically loading the rad combo box controls into a place holder control that resides inside the rad ajax panel in a user control, when the user does a ajax post back all the controls disappeared in 2 seconds after showing the controls.

No errors displayed and no exception message. i didnt get any clue on this problem.

But if i use asp drop down list instead of rad combo box control then its working properly.

And also If i remove the rad ajax panel control then it is showing the all the controls properly after the post back.

Is this a bug or am i doing something wrong?

Thanks
Muthu

Pavlina
Telerik team
 answered on 30 May 2009
1 answer
98 views
This problem has been driving me crazy.  I have a RadGrid with an Ajax Manager wired up to it.  See screenshot:
http://i5.photobucket.com/albums/y176/drpcken/1-2.png

Everything looks great until I sort by a column, then for no reason at all a whitespace (about 8 pixels) appears above the grid.  See screenshot:
http://i5.photobucket.com/albums/y176/drpcken/2.png

It seems that anytime I click on a control that is wired up to the AJAX manager this happens.  I have a button ABOVE the grid (it's not even a part of the grid) and its wired up to the Ajax Manager, when I click it I get the same behavior: a white space above the grid.  When I remove the AJAX manager it works, but of course the whole page posts back with no AJAX.  I've tried everything I can think of to fix this:  I've removed ALL CSS from the page, but I get the same problem.  I've removed the wrapper around the grid, same problem.  I've removed the loading panel, same problem.  I've removed every single server-side method and client side javascript but get the same problem.  The code for the grid:

<div class="CensusGrid"> 
        <asp:Button ID="btnRefreshCustomers" runat="server" Style="display: none;"  /> 
        <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" DataSourceID="LinqDataSource1" 
            GridLines="None" Skin="WebBlue" AllowMultiRowSelection="True" AllowSorting="True" 
            OnItemDataBound="RadGrid1_ItemDataBound"> 
            <MasterTableView AutoGenerateColumns="false" DataKeyNames="CensusID" DataSourceID="LinqDataSource1"> 
                <RowIndicatorColumn> 
                    <HeaderStyle Width="20px"></HeaderStyle> 
                </RowIndicatorColumn> 
                <ExpandCollapseColumn> 
                    <HeaderStyle Width="20px"></HeaderStyle> 
                </ExpandCollapseColumn> 
                <Columns> 
                    <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn"> 
                        <ItemStyle Width="27px" Wrap="false" /> 
                        <HeaderStyle Width="27px" Wrap="false" /> 
                    </telerik:GridClientSelectColumn> 
                    <telerik:GridTemplateColumn DataField="LastName" HeaderText="Name"  
                        SortExpression="LastName" UniqueName="LastName"> 
                        <ItemTemplate> 
                            <asp:Label ID="LastNameLabel" runat="server" Text='<%# Eval("LastName") %>'></asp:Label>,&nbsp; 
                            <asp:Label ID="FirstNameLabel" runat="server" Text='<%# Eval("FirstName") %>'></asp:Label>&nbsp; 
                            <asp:ImageButton ID="hasAccess" ImageUrl='<%# Eval("AllowClientAccess", "images/lock_{0}.png") %>' 
                                runat="server" /> 
                        </ItemTemplate> 
                    </telerik:GridTemplateColumn> 
                    <telerik:GridBoundColumn DataField="DOB" DataType="System.DateTime" HeaderText="DOB" 
                        SortExpression="DOB" UniqueName="DOB" DataFormatString="{0:d}"> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="MaritalStatus" HeaderText="MaritalStatus" SortExpression="MaritalStatus" 
                        UniqueName="MaritalStatus"> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="AddressCity" HeaderText="AddressCity" SortExpression="AddressCity" 
                        UniqueName="AddressCity"> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="AddressState" HeaderText="AddressState" SortExpression="AddressState" 
                        UniqueName="AddressState"> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="EmailAddress" HeaderText="EmailAddress" SortExpression="EmailAddress" 
                        UniqueName="EmailAddress"> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="DateOfHire" DataType="System.DateTime" HeaderText="DateOfHire" 
                        SortExpression="DateOfHire" UniqueName="DateOfHire" DataFormatString="{0:d}"> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="JobDescription" HeaderText="JobDescription" SortExpression="JobDescription" 
                        UniqueName="JobDescription"> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="flag" UniqueName="flag" Visible="false"> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridTemplateColumn> 
                        <ItemStyle Width="29px" Wrap="false" /> 
                        <HeaderStyle Width="29px" /> 
                        <ItemTemplate> 
                            <a id="HyperLink1" runat="server" class="thickbox" title='<%# "Dependents for <b>" + Eval("FirstName") + " " + Eval("LastName") + "</b>" %>' 
                                href='<%# Eval("censusID", "Dependents.aspx?c={0}&TB_iframe=true&height=550&width=600") %>'> 
                                <asp:Image ID="Image2" runat="server" ImageUrl="images/she_users.png" ToolTip="Add/Edit Dependents" /> 
                            </a> 
                        </ItemTemplate> 
                    </telerik:GridTemplateColumn> 
                    <telerik:GridTemplateColumn> 
                        <ItemStyle Width="29px" Wrap="false" /> 
                        <HeaderStyle Width="29px" /> 
                        <ItemTemplate> 
                            <a id="editUser" runat="server" class="thickbox" title='<%# "Details for <b>" + Eval("FirstName") + " " + Eval("LastName") + "</b>" %>' 
                                href='<%# Eval("censusID", "CensusDetails.aspx?c={0}&TB_iframe=true&height=550&width=600") %>'> 
                                <asp:Image ID="Image1" runat="server" ImageUrl="images/Edit.gif" ToolTip="Edit Employee" /> 
                            </a> 
                        </ItemTemplate> 
                    </telerik:GridTemplateColumn> 
                    <telerik:GridTemplateColumn> 
                        <ItemStyle Width="29px" Wrap="false" /> 
                        <HeaderStyle Width="29px" /> 
                        <ItemTemplate> 
                             
                        </ItemTemplate> 
                    </telerik:GridTemplateColumn> 
                </Columns> 
            </MasterTableView> 
            <ClientSettings> 
                <Selecting AllowRowSelect="True" EnableDragToSelectRows="False" /> 
                <Scrolling AllowScroll="True" ScrollHeight="489px" UseStaticHeaders="True" /> 
            </ClientSettings> 
        </telerik:RadGrid> 
    </div> 
    <asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="clientBenefitDataContext" 
            OrderBy="LastName" TableName="Census" Where="ContactID == @ContactID" OnSelecting="LinqDataSource1_Selecting"> 
            <WhereParameters> 
                <asp:ControlParameter ControlID="hiddenContactID" DefaultValue="0" Name="ContactID" 
                    PropertyName="Value" Type="Int32" /> 
            </WhereParameters> 
        </asp:LinqDataSource> 

And here is my AjaxManager which is below the grid:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> 
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="lblToggle"> 
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="RadGrid1"> 
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 

This problem has been driving me crazy.  Does anyone see anything I don't?


drpcken
Top achievements
Rank 1
 answered on 29 May 2009
2 answers
280 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
106 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
87 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
106 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
167 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
199 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
617 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
271 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?