Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
146 views
Hi,

When I try to upload a file using FileExplorer, the update panel keeps showing long after the file upload.

In the Chrome console, this script error appears:

Uncaught TypeError: Cannot call method 'get_selectedItem' of null

Here's the declaration of the FileExplorer:

<telerik:RadFileExplorer ID="ExplorerExportTemplates" runat="server" Width="600px" Height="400px"
                                                            Skin="Metro" Configuration-AllowFileExtensionRename="False" Configuration-AllowMultipleSelection="False"
                                                            AllowPaging="true" EnableOpenFile="true" EnableAsyncUpload="True">
                                                            </telerik:RadFileExplorer>

Here's the code-behind:

string[] paths = new string[] { Page.ResolveUrl(fullPath) };
                ExplorerExportTemplates.Configuration.ViewPaths = paths;
                ExplorerExportTemplates.Configuration.UploadPaths = paths;
                ExplorerExportTemplates.Configuration.DeletePaths = paths;
                ExplorerExportTemplates.Configuration.EnableAsyncUpload = true;
                ExplorerExportTemplates.Configuration.MaxUploadFileSize = 104857600;
                ExplorerExportTemplates.Configuration.AllowFileExtensionRename = false;
                ExplorerExportTemplates.Configuration.AllowMultipleSelection = false;
                ExplorerExportTemplates.EnableCreateNewFolder = true;
                ExplorerExportTemplates.EnableCopy = false;
                ExplorerExportTemplates.ExplorerMode = Telerik.Web.UI.FileExplorer.FileExplorerMode.FileTree;
                ExplorerExportTemplates.Configuration.SearchPatterns = new string[] { "*.xls", "*.xlsx" };
                ExplorerExportTemplates.Configuration.ContentProviderTypeName = typeof(Telerik.Web.UI.Widgets.FileSystemContentProvider).AssemblyQualifiedName;


Any ideas?

Thanks,

Ajit
Dobromir
Telerik team
 answered on 04 Apr 2013
1 answer
86 views
Hello!

I build my grid on Runtime

protected void Page_Init(object sender, System.EventArgs e)
        {
 
RadGrid RadGrid1 = new RadGrid();
            RadGrid1.ID = "grid";
             RadGrid1.ClientSettings.Scrolling.ScrollHeight = 500;
            RadGrid1.ClientSettings.Scrolling.AllowScroll = true;
            RadGrid1.AllowAutomaticInserts = false;
            RadGrid1.AllowAutomaticUpdates = false;
...
...
...
           PlaceHolder1.Controls.Add(RadGrid1);
}

Now, i want show a LoadingPanel for every action in the Grud (load new Data, Insert, Update...)

How can i do this ?

Thank You!
Jayesh Goyani
Top achievements
Rank 2
 answered on 04 Apr 2013
1 answer
74 views
Hello,

There is a RadCombobox with check-boxes enabled in my project. There is another RadButton and on server side clicking the button, I want to display an alert that contains the checked item text from the RadCombobox for ex "You have selected Item1, Item2". Please help me with any sample solution.

Thanks in advance,
Anly.
Princy
Top achievements
Rank 2
 answered on 04 Apr 2013
2 answers
121 views
Hi

I have radgrid with custom filtering:
<script type="text/javascript">
function IconsComboBoxChanging(sender, eventArgs) {
                var item = eventArgs.get_item();
                if (item != null) {
                    var input = sender.get_inputDomElement();
                    input.value = "";
                    input.defaultValue = "";
                }
            }
function DropDownFilterLoad(sender) {
                sender.set_text("");
                var itm = sender.get_items();
                var selected = itm.getItem(sender._selectedIndex);
                var img = selected.get_imageUrl();
                var input = sender.get_inputDomElement();
                SetBackground(input, img);
            }
</script>
<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="true" OnNeedDataSource="CorrectionsGrid_NeedDataSource" [...]>
[...]
    <Columns>
        <telerik:GridTemplateColumn UniqueName="CorrectStatus" HeaderText="Status" HeaderStyle-Width="55px" Resizable="false" DataField="CorrectionAcceptState">
            <ItemTemplate>
                <asp:Image [...] />
            </ItemTemplate>
            <FilterTemplate>
                <telerik:RadComboBox ID="StatusFiletCB" Width="45px" AppendDataBoundItems="true" DropDownWidth="205px" NoWrap="true" runat="server" OnSelectedIndexChanged="CorrectStatusFilterChange" AutoPostBack="true" AllowCustomText="false" OnClientSelectedIndexChanged="IconsComboBoxChanging" OnClientLoad="DropDownFilterLoad">
                    <Items>
                        <telerik:RadComboBoxItem Value="0"[...] />
                        <telerik:RadComboBoxItem Value="1"[...] />
                        <telerik:RadComboBoxItem  Value="2" [...] />
                    </Items>
                </telerik:RadComboBox>
            </FilterTemplate>
        </telerik:GridTemplateColumn>
<telerik:GridTemplateColumn AllowFiltering="false" UniqueName="ActionColumn" HeaderText="" HeaderStyle-Width="60px"
    Resizable="false" Visible="false">
    <ItemTemplate>
       <asp:ImageButton CommandName="Reject" runat="server" CommandArgument='<%# Eval("CorrId") %>' Visible='<%# this.IsUserAllowedToAccept() %>' [...] />
    </ItemTemplate>
</telerik:GridTemplateColumn>



    [...]
    </Columns>
</telerik:RadGrid>

Code behinde:
protected void CorrectionsGrid_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
    CorrectionsGrid.DataSource = new MyDataContext().Corrections;
}
 
private int? GetValueOfCorrectionAcceptStateFilter()
{
    var regSearch = Regex.Match(CorrectionsGrid.MasterTableView.FilterExpression, @".*\(it\.CorrectionAcceptState = (?<filterVal>[1-3])\).*");
    if (regSearch.Success)
        return Int32.Parse(regSearch.Groups["filterVal"].Value);
    else
        return null;
}
 
protected void CorrectStatusFilterChange(object o, RadComboBoxSelectedIndexChangedEventArgs e)
{
    string filterExpression = CorrectionsGrid.MasterTableView.FilterExpression;
 
    var currentcFilter = GetValueOfCorrectionAcceptStateFilter();
    if (currentcFilter.HasValue)
        filterExpression = filterExpression.Replace("(it.CorrectionAcceptState = " + currentcFilter.Value + ")", string.Empty);
 
    if (Int32.Parse(e.Value) > 0)
        filterExpression = (filterExpression.Trim().Length > 0 ? filterExpression + " AND " : "")
                            + "(it.CorrectionAcceptState = " + e.Value + ")";
    CorrectionsGrid.MasterTableView.FilterExpression = filterExpression;
    CorrectionsGrid.MasterTableView.Rebind();
}

everything works fine until I set the filter and call out rejection - invalid postback or callback argument. where making a mistake?
Mariusz
Top achievements
Rank 1
 answered on 04 Apr 2013
1 answer
97 views

Hello,
I have combobox1 populated with data have multiple selection checkboxes in it…
I have another combobox2 which will get populated based on checked items in the combobox1…

I want to know how to do this from codebehind…

what events we need to use and sample code will help....

Thanks

Princy
Top achievements
Rank 2
 answered on 04 Apr 2013
4 answers
268 views
how do I put in a tooltip a button and a LinkButton that have to be used?
Fabio Cirillo
Top achievements
Rank 1
 answered on 04 Apr 2013
1 answer
120 views
Hi,

While the user upload files to the server using RadUpload, Is there any mechanism to perform file validation process for a particular file extension alone?

Thankyou,
Berk.
Princy
Top achievements
Rank 2
 answered on 04 Apr 2013
1 answer
87 views
I have a radgrid with a GridClientSelectColumn. When the control is rendered it shows two check box items (as per the uploaded image).

Why is it doing this and how can I fix it?

Thanks
Eyup
Telerik team
 answered on 04 Apr 2013
9 answers
1.4K+ views

I have a RadGrid that is based on the client edit with batch server update example code. I would like to change the background color of the row when the SelectedIndexChanged event fires in the RadComboBox in the currently edited cell of the grid row. I need to do this as a client side action. The currently edited row will be an ItemTemplate as the client edit with batch server update code doesn't use the EditItemTemplate when editing rows.

<telerik:RadComboBox ID="RadComboBankerRole" 
 runat="server"
 OnItemsRequested="RadComboBankerRole_ItemsRequested"
 OnClientSelectedIndexChanged="RadComboBankerRole_SelectedIndexChanged"/>

function RadComboBankerRole_SelectedIndexChanged(sender, eventArgs) 
{
    //  Set row background color css class if selected value not string.Empty.
    //  Bonus points if you can apply different css class based on row index mod 2 ("zebra striped rows")
}
David
Top achievements
Rank 1
 answered on 04 Apr 2013
1 answer
118 views
Hi,

I became aware just recently that a new folder called ImageEditorDialogs is now part of your release.
Should I be pointing to this in the ExternalDialogsPath parameter?
If so, how do I also point at EditorDialogs?  I have made a change to the FileBrowser.ascx so I do need to point to this folder.
Can I merge the 2 folders?  I notice that InsertImage.ascx exists in both.

Please advise.

Thanks

Jim
Stanimir
Telerik team
 answered on 04 Apr 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
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
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?