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

We are having a hard time figuring out a solution to a long running issue.  We are using a RadListBox to display a list of items such as names on a page.  There are 2 lists where 1 is the selector list and the second is the "selected" list.  When the selector list gets to contain somewhere in the range of 2,500+ names, the transfer runs unacceptably slow.  We've tried to disable viewstate, but that breaks our code since we need to handle the transfer on the server side via an AJAX call.  When we debug the code, it takes almost 25 seconds for the server-side CodeBehind method to execute.

 Please advise on what can be done to improve performance for a RadListBox with transfer enabled that contains large lists of data.

 Thank you,

Ed Sudit

Bozhidar
Telerik team
 answered on 17 Jun 2015
7 answers
913 views
I have a page with a RadGrid on it. In that RadGrid I'm using  <EditFormSettings EditFormType="Template"> to handle the editing of the data. In that FormTemplate I have a FileUpload control where I'm allowing users to upload a file. I planned on handling the file upload in a seperate function. Problem is trying to get to the FileUpload control. Can someone help me? Code sample below:
<telerik:RadGrid 
    ID="rgvwUserList" 
    runat="server" 
    AllowAutomaticDeletes="True" 
    AllowAutomaticInserts="True" 
    AllowAutomaticUpdates="True" 
    AllowFilteringByColumn="True" 
    AllowPaging="True" 
    AllowSorting="True" 
    AutoGenerateColumns="False" 
    CellSpacing="0" 
    DataSourceID="sdsUserList" 
    EnableLinqExpressions="False" 
    GridLines="None" 
    PageSize="20" 
    ShowGroupPanel="True" 
    Width="900px">
    <ClientSettings AllowDragToGroup="True"/>
    <MasterTableView 
        AutoGenerateColumns="False" 
        CommandItemDisplay="None" 
        DataKeyNames="StaffID" 
        DataSourceID="sdsUserList"
        EditMode="EditForms" 
        HorizontalAlign="NotSet" 
        Width="100%">
        <Columns>
            <telerik:GridEditCommandColumn ButtonType="ImageButton" HeaderText="Edit" ItemStyle-HorizontalAlign="Center" UniqueName="EditCommandColumn">
                <ItemStyle CssClass="MyImageButton" Wrap="False" />
            </telerik:GridEditCommandColumn>
            <telerik:GridTemplateColumn AllowFiltering="False">
                <HeaderStyle HorizontalAlign="Center"/>
                <HeaderTemplate>Photo</HeaderTemplate>
                <ItemStyle HorizontalAlign="Center"/>
                <ItemTemplate>
                    <asp:Image ID="imgPhoto" runat="server" ImageUrl='<%#EVAL("PhotoPath") %>' Width="50"/>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn DataField="DisplayName" FilterControlAltText="Filter DisplayName column" HeaderText="DisplayName" ItemStyle-Width="20%" ReadOnly="True" SortExpression="LastName" UniqueName="DisplayName"/>
        </Columns>
        <EditFormSettings EditFormType="Template">
            <FormTemplate>
                <div align="center">
                    <asp:FileUpload ID="fuPhotoPath" runat="server" SkinID="FileUpload" Width="290"/>
                    <asp:Button ID="btnAddPhoto" runat="server" CommandArgument='<%#Bind("StaffID")%>' OnCommand="UploadPhoto" SkinID="ButtonLittle" Text="Add"/>
                </div>
            </FormTemplate>
        </EditFormSettings>
    </MasterTableView>
</telerik:RadGrid>
Jayesh Goyani
Top achievements
Rank 2
 answered on 17 Jun 2015
3 answers
378 views
I'm trying to figure out how to get the treeview to allow clean text selection of the text in the nodes and items inside node templates (labels etc). I have searched all over for a solution to this and it seems to be that different versions of RadTreeView allow this while others do not.

For example here, you can highlight the text of the nodes and smaller parts of the text fine:
http://mono.telerik.com/TreeView/Examples/Functionality/SingleExpandPath/DefaultCS.aspx

Yet in this newer example, you can't:
http://demos.telerik.com/aspnet-ajax/treeview/examples/functionality/expandanimation/defaultcs.aspx

You can sometimes select the text if you start clicking far outside the node and drag, but there is no way to select sub parts of the node text.

If anyone has any idea how to get text selection to work properly with TreeView please help!
Dimitar Terziev
Telerik team
 answered on 17 Jun 2015
1 answer
103 views

Hi,

I'm sure this is something silly on my part, but I can't spot it.

The following code works:

var x = 'text';
var y = 'Red';
var selectedColorButtonValue = String(x + y);
var selectedColorButton = toolBar.findItemByValue(selectedColorButtonValue);

Now, since the actual value of y is dynamic and only known at run time, I have this code:

var selectedColorButtonValue = getColorButtonValue(fontColor); // Returns 'Red' for this demo
selectedColorButtonValue = String('text' + selectedColorButtonValue);
var selectedColorButton = toolBar.findItemByValue(selectedColorButtonValue);

The above does NOT work. The toolbarbutton that I'm trying to find is not found!

The toolbarbutton in question is one of several items in a RadToolBarSplitButton.

I have written to the console, and the value of selectedColorButtonValue appears fine.

Can anyone spot what I'm doing wrong.

Thanks

Jim

 

Hristo Valyavicharski
Telerik team
 answered on 17 Jun 2015
17 answers
1.2K+ views
Hello

I'm having problem passing parameters to user control used in edit mode of radgrid

I Have a RadGrid with some users data. I use a custom user control for FormTemplate.

The user control has it's own logic implemented to edit user data and takes one parameter "id_user". (It has public String id_user with get and set method defined  in codebehind)

I tried to pass this parameter to UserControl as seen in code below, but it doesnt work. when i pass this parameter to label it shows. User control also works fine if I pass static parameter (example:   id_user="2" ).

What is the right way to pass parameters to UC?

<EditFormSettings EditFormType="Template"
   <FormTemplate> 
       <asp:Label ID="Label4" runat="server" Text='<%# Bind("id") %>'></asp:Label> 
       <uc1:edit_user ID="edit_user1" runat="server" id_user='<%# Bind("id") %>' />    
   </FormTemplate> 
   <EditColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" 
               uniquename="EditCommandColumn"
    </EditColumn> 
</EditFormSettings>

I'm would also like to know how to pass parameters when attachig UserControls like this:
 <EditFormSettings EditFormType="WebUserControl" UserControlName="edit_user.ascx"

Thank you







Eyup
Telerik team
 answered on 17 Jun 2015
6 answers
1.1K+ views
If i use RadGrid in this way (http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/templateformupdate/defaultcs.aspx), and if inside that FormTemplateEditForm i have another RadGrid, how can i "find" it? If I use (RadGrid)this.Master.FindControl("RadGrid2") i get a null value.

How cand i acces some controls in TemplateEditForm? How can i "find" them?
Jayesh Goyani
Top achievements
Rank 2
 answered on 16 Jun 2015
3 answers
213 views
ASP.NET c# .NET Framework 4.0
Telerik ASP.NET AJAX v2014.2.724.40

I'm trying to style the MediaPlayer as a small mini player for playing only audio files.  I've figured out how to remove the HD button, Full Screen button, Title bar but am having trouble figure out how to remove the background image and also getting the volume control to position horizontally and just to the right of the volume button.

Any help is greatly appreciated.

Warren
Galin
Telerik team
 answered on 16 Jun 2015
9 answers
709 views

Hi Telerik Team, Hi All,

I have a problem with ajaxifying RadTooltTip.

My case is (drafts):

<RadAjaxPanel>

     <RadTooltip>

            <Button>

 

I want to make Button ajaxified. So clicking on in will not do postback, but do ajax request.

How can I do it? Please answer ASAP, It's very important to me.

Kin
Top achievements
Rank 1
 answered on 16 Jun 2015
3 answers
668 views

I have a dynamically generated grid where the first 4 rows are basically headers. "Project Name", "Customer Name", "division Name", "Sector Name"

For each project we have 2 columns. "Plan" and "Assign".

The 4 headers I listed should span the plan and assign columns. See the attached screen shot "Report Before Scrolling (everything looks good).png" to see what the desired output should be.

 I used this thread as a starting point on how to make text in one row span 2 columns for a dynamically generated grid:

http://www.telerik.com/support/code-library/span-cells-in-grid-over-multiple-positions

My guess is that the part where you try to track the previousIndex compared to the current index is where I have issues.

When the report is first rendered to the screen it looks correct. Once you use the horizontal scroll the colspan values for the columns start to change. To see the HTML example of this I've included 2 screen shots. One called "HTML Before Scrolling - Colspan values look correct.png" and one called "HTML after scrolling -Colspan values have changed.png". 

Here is the OnPreRender code where I set the colspan and very feebly attempt to manage the indeces of the items (read help!):

 

protected void radGrid1_OnPreRender(object sender, EventArgs e)
       {
           var headerRows = HeaderRows;
 
           if (headerRows == null) return;
 
           foreach (var row in headerRows)
           {
 
               var currentProjectID = row["projectID"].ToString();
 
               var currentPlanColumnName = "Plan" + "_" + currentProjectID;
               var currentAssignColumnName = "Assign" + "_" + currentProjectID;
 
               foreach (GridDataItem dataItem in radGrid1.MasterTableView.Items)
               {
                   dataItem[currentPlanColumnName].ColumnSpan = 2;
                   dataItem[currentAssignColumnName].Visible = false;
 
                   int previousItemIndex = dataItem.ItemIndex - 1;
                   if (previousItemIndex >= 0)
                   {
                       if (dataItem["Employees"].Text == dataItem.OwnerTableView.Items[previousItemIndex]["Employees"].Text)
                       {
                           dataItem.OwnerTableView.Items[previousItemIndex]["Employees"].RowSpan = 2;
                           dataItem["Employees"].Visible = false;
                       }
                   }
               }
           }
       }

 As I stated above the code in the OnPreRender where it compares the dataItem text to the previousItemIndex's text is where I'm probably causing the issue??

 Any help is greatly appreciated. 

Thank you :)​

 

                                   

Julian
Top achievements
Rank 1
 answered on 16 Jun 2015
1 answer
229 views

Hi Guys,

 I have a strange issue where the radcombobox allows the user to enter text and search data, also this data which he entered is allowed to save.

 

<telerik:radcombobox id="rdChangeOwner" skin="Web20" cssclass="RadComboBoxDropDownrcbScroll"
dropdowncssclass="RadComboBoxDropDownrcbScroll" runat="server" font-names="calibri"
font-size="11pt" width="230px" allowcustomtext="false" height="180px" enableloadondemand="True"
showmoreresultsbox="true" enablevirtualscrolling="true" emptymessage="Please Select..."
radcomboboximageposition="Right" zindex="10000002" onitemsrequested="ddlChangeOwnerItemsRequested"
causesvalidation="true" highlighttemplateditems="true" onclientblur="rdChangeOwnerBlur">
</telerik:radcombobox>

 

Initial Value of DropDown is "Asif Mohammed"

Looking for a Employee in picker and entered Asif


Didn’t not select the populated value(Asif Mohammed), just left the entered text as "Asif".

Asif is not there in the list, but "Asif Mohammed" is available, but it allowed me to save Asif into DB and hence got me error because internally it was not able to resolve.

 

Please help in getting a solution for this Issue.

Thanks and Regards,

Mohammed Asif Mtext

Nencho
Telerik team
 answered on 16 Jun 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?