Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
514 views

We're experiencing intermittent issues with RadAsyncUpload getting stuck on the yellow progress meter and never finishing the upload of a file. It's also causing IE to crash when this happens. 

 

I found this bug report that claims an issue with IE has been resolves, but we are still experiencing the issue. 

 

https://connect.microsoft.com/IE/feedback/details/819941/file-upload-stop-working-on-ie-with-windows-authentication

 

We're currently using Telerik_UI_for_ASP.NET_AJAX_2015_1_225_Dev_hotfix​

Dimitar
Telerik team
 answered on 15 Apr 2016
9 answers
448 views

Telerik version - 2016.1.225.45

I am trying to present a slideshow with images (and videos) bound from the DB (varbinary). This has worked in the past using RadRotator, however this control is not responsive (feel free to correct me if that is wrong). That said, I found a nice RadImageGallery demo (https://demos.telerik.com/) but I would like to load the items server-side (via OnItemDataBound). Here is my relevant code:

 

aspx
<telerik:RadCodeBlock runat="server">
        <script type="text/javascript">
            function onImageGalleryCreated(sender, args) {
                sender.get_imageArea().get_element().style.height = sender.get_element().clientHeight - parseInt(sender.get_thumbnailsArea().get_element().style.height, 10) + "px";
            }
        </script>
    </telerik:RadCodeBlock>
<telerik:RadImageGallery ID="PresentationView_RadImageGallery" Height="100%" runat="server"
OnItemDataBound="PresentationView_RadImageGallery_ItemDataBound" 
OnNeedDataSource="PresentationView_RadImageGallery_NeedDataSource">
<Items>
<telerik:ImageGalleryTemplateItem>
<ContentTemplate>
<telerik:RadBinaryImage ID="binaryFullContent" CssClass="itemTemplate" SavedImageName='<%#Eval("ID") %>' runat="server"/>
</ContentTemplate>
</telerik:ImageGalleryTemplateItem>
</Items>
<ClientSettings>
<ClientEvents OnImageGalleryCreated="onImageGalleryCreated" />
</ClientSettings>
</telerik:RadImageGallery>

aspx.cs
protected void PresentationView_RadImageGallery_NeedDataSource(object sender, ImageGalleryNeedDataSourceEventArgs e) {
PresentationView_RadImageGallery.DataSource = GetPresentationSlideList();
}
protected void PresentationView_RadImageGallery_ItemDataBound(object sender, ImageGalleryItemEventArgs e) {
if (e.Item is ImageGalleryItem) {
RadBinaryImage img = (RadBinaryImage)PresentationView_RadImageGallery.FindControl("binaryFullContent");
// img is null
}
}

 

Kostadin
Telerik team
 answered on 15 Apr 2016
9 answers
394 views

 

I may be wrong in how to manually save data here, as I'm learning how to work with a Batch grid. If so, please correct me...

I have a RadGrid in Batch mode. When the user has made all changes to the header textboxes at the top of the form, and the detail values in the RadGrid below them, the user needs to click a general Save button to save all the data to the DB. (I'm hiding the "Save changes" button in the grid.)

When the Save button is clicked, I execute this javascript...

function SavePO() {
    var grd = GetControlRAD("grdPODetails");
    grd.get_batchEditingManager().saveChanges(grd.get_masterTableView());
}

 

As I understand it, that does nothing to the underlying data. Instead, it calls the server-side grdPODetails_BatchEditCommand, at which point I manually update the data. In there, I'm updating the dataset that was initially loaded onto the page behind the scenes...

Protected Sub grdPODetails_BatchEditCommand(sender As Object, e As Telerik.Web.UI.GridBatchEditingEventArgs) Handles grdPODetails.BatchEditCommand
    Try
        For Each command As GridBatchEditingCommand In e.Commands
            Select Case command.Type
                ' Code to delete, insert, or update each row of underlying dataset from HashTables
            End Select
        Next
        ' If no errors, also update header data from controls, then save it all to the DB
    Catch ex as Exception
        ' TODO - What do I do here?
    End Try
End Sub

 

As you can see from my TODO, I'm unsure what to do if there's an error. Do I to put "e.Canceled = True", and if so, what does it do? Also, how can I tell the user what the error (ex.Message) is without a postback? (Or does this auto postback?) Assuming it doesn't postback, the best I can determine is to have a control on the form to write the error to in red font, but management doesn't like that idea. They'd rather I pop up an alert, but not sure that's possible.

Any suggestions? And am I going about this the right way to manually save the data?

 

Viktor Tachev
Telerik team
 answered on 15 Apr 2016
4 answers
207 views
Hello everyone.
I would like to know: what is the parameter Dictionary<string, object> context received by every FilterCheckListWebServiceMethod in this demo: http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/filtering/basic-filtering/defaultcs.aspx

Thanks in advance.

Regards.
Maria Ilieva
Telerik team
 answered on 15 Apr 2016
2 answers
364 views

Hi,

 

Do you have a signature control available in telerik?

If not signature, any control like a free form painting control to capture user mouse movements?

 

Thanks

Vessy
Telerik team
 answered on 15 Apr 2016
1 answer
146 views

Greetings!

I'm having an issue with a RadGrid using an EditFormTemplate; whenever I click my edit button on an item of this rad grid, the item goes into edit mode fine and my controls appear below them item. However, when the CSS for the row being in edit mode gets applied, it adds some peculiar artifacts to my grid. I get a blue line about 15 lines of text from the top of the item being edited. It's worth pointing out that the varchars being exposed by this grid are very large, which might have something to do with the issue; it only occurs when modifying an exceptionally long list of codes.

Please find attached screenshots of the problem behavior.

Screenshots include a before and after [edit button clicked] of the item in question, and the behavior exhibited.

It sort of hangs there, strangely in the middle of the original radgrid item. These elements don't appear to be actual controls; they seem to be part of a repeating background being applied by the CSS for an edit form item.

Here's my markup for the grid in question:

<telerik:RadGrid ID="rgCrosswalkView" AutoGenerateColumns="false" runat="server">                                       
    <MasterTableView DataKeyNames="CrosswalkID, CrosswalkGroupID, CPTs, ICDs">
        <CommandItemTemplate>
            <div class="row">
                <div class="col-sm-12">
                    <asp:LinkButton runat="server" ID="btAddCrosswalkGroup" CssClass="btn btn-sm btn-primary" CommandName="InitInsert" Style="color: white;">
                        <i class="glyphicon glyphicon-plus-sign"></i>Add Crosswalk Group
                    </asp:LinkButton>
                </div>
            </div>
        </CommandItemTemplate>
        <Columns>
            <telerik:GridBoundColumn HeaderText="CPTs" DataField="CPTs" ItemStyle-VerticalAlign="Top" HeaderStyle-Width="25%"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText="ICDs" DataField="ICDs" ItemStyle-VerticalAlign="Top" HeaderStyle-Width="55%"></telerik:GridBoundColumn>
            <telerik:GridCheckBoxColumn ReadOnly="true" HeaderText="ICD10?" DataField="IsICD10" ItemStyle-VerticalAlign="Top"></telerik:GridCheckBoxColumn>
            <telerik:GridTemplateColumn ItemStyle-VerticalAlign="Top">
                <ItemTemplate>
                    <asp:LinkButton runat="server" ID="btEditCrosswalkPairs" CommandName="Edit">
                        <i class="glyphicon glyphicon-pencil"></i>
                    </asp:LinkButton>   
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn ItemStyle-VerticalAlign="Top">
                <ItemTemplate>
                    <asp:LinkButton ID="btRemoveCrosswalkPairs" runat="server" CommandName="Delete" OnClientClick="return confirm('Really delete this crosswalk group?');" CssClass="btn btn-sm btn-default"><i class="glyphicon glyphicon-remove-circle"></i></asp:LinkButton>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
        </Columns>
        <EditFormSettings EditFormType="Template">                               
            <FormTemplate>
                <div class="row">
                    <div class="col-sm-3">
                        CPTs:<asp:Textbox ID="tbCPT" runat="server" TextMode="MultiLine" Rows="20" style="resize: none;" Width="100%"></asp:Textbox><br />
                    </div>
                    <div class="col-sm-9">                                                               
                        ICDs:<asp:TextBox ID="tbICD" runat="server" TextMode="MultiLine" Rows="20" style="resize: none;" Width="100%"></asp:TextBox><br />
                        <asp:CheckBox ID="cbICD10" runat="server" Checked="true" Text="ICD10?" />
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-2">
                        <asp:LinkButton CssClass="btn btn-xs btn-primary" ID="btUpdateGroup" CommandName="Update" runat="server" Text="Update"></asp:LinkButton>
                        <asp:LinkButton CssClass="btn btn-xs btn-primary" ID="btInsertGroup" CommandName="PerformInsert" runat="server" Text="Insert"></asp:LinkButton>                                                               
                    </div>
                    <div class="col-sm-2">
                        <asp:LinkButton CssClass="btn btn-xs btn-default" ID="btCancelGroup" CommandName="Cancel" runat="server" Text="Cancel"></asp:LinkButton>
                    </div>
                    <div class="col-sm-8">
                          
                    </div>
                </div> 
            </FormTemplate>
        </EditFormSettings>
    </MasterTableView>
</telerik:RadGrid>

And here is the CSS which appears to be giving me trouble, pulled from dev console. The offending line is commented out. Disabling that attribute makes the coloration of the edit form item go back to default, but removes the garbage repeating x.

.rgEditRow {
    /* background: rgba(205,205,205,0.75) 0 -4900px repeat-x url('WebResource.axd?d=ifcjPV8aj2vMt9az-6wWmwZqcD65tft-V-aE6ooNIutn9jwr_s82sxYh…9mFxF_3cAUoYtM8o9U5-M7wLDeK47M_h5TDjLXEugyZbr0sNXz01&t=635932205533629626'); */
    color: #000;
}

I can probably override it by "cancelling" the class in some way, but would honestly prefer it perform the coloration as it intends to, without the garbage.

Any assistance would be appreciated.

Kostadin
Telerik team
 answered on 15 Apr 2016
5 answers
456 views
Hi,

I want to compare dates of two raddatepicker in javascript. How can I do?
 
Scenario :

If startdate > enddate
alert("start date is greater than end date");

Thanks,
Balaji
Boity
Top achievements
Rank 1
 answered on 15 Apr 2016
8 answers
685 views
We are using a asp:PlaceHolder control that we inject (add) a code generated grid to, which then is used to output the excel report.
I have a method that creates the grid, and wires up several events...
I am trying to figure out how to wire up the event ExportCellFormatting...

protected void grid_ExportCellFormatting(object source, ExcelExportCellFormattingEventArgs e)
        {
            // Set all cells to string to include leading zeros.
            e.Cell.Style["mso-number-format"] = @"\@";
        }

but it just does not like what i have done so far.. 


The error I get is 
Error	2	No overload for 'grid_ExportCellFormatting' matches delegate 'System.EventHandler<Telerik.Web.UI.ExportCellFormattingEventArgs>'	C:\TFS 2008\TIPWeb Scrum\Dev\TIPWebITApp\TIPWebIT\TagManagement\Tags.aspx.cs	650	46	TIPWebIT
protected void CreateGrid()
       {
           using (RadGrid grid = new RadGrid())
           {
               grid.NeedDataSource += new GridNeedDataSourceEventHandler(grid_NeedDataSource);
               grid.ExcelMLExportRowCreated += new GridExcelMLExportRowCreatedEventHandler(grid_ExcelMLExportRowCreated);
               grid.ExcelMLExportStylesCreated += new GridExcelMLExportStylesCreatedEventHandler(grid_ExcelMLExportStylesCreated);
 // HERE IS MY PROBLEM -------- Remember I do not have the grid on the actual aspx page, it is inserted into the place holder tag...
               grid.ExportCellFormatting += new EventHandler<ExportCellFormattingEventArgs>(grid_ExportCellFormatting);
 // END OF MY PROBLEM ---------
               grid.EnableLinqExpressions = false;
               grid.AllowFilteringByColumn = true;
 
               grid.ID = "RadGrid1";
               grid.ExportSettings.ExportOnlyData = true;
               grid.ExportSettings.IgnorePaging = true;
               grid.ExportSettings.OpenInNewWindow = true;
 
               switch (reportName)
               {
                   case ReportName.PrintTagReport:
                       grid.ExportSettings.FileName = "TagListing";
                       break;
               }
 
               grid.AllowSorting = true;
               PlaceHolder1.Controls.Add(grid);
               grid.MasterTableView.ExportToExcel();
           }
       }
Kostadin
Telerik team
 answered on 15 Apr 2016
5 answers
160 views

I i need to be able to access the text boxes within my form popup on rad grid I have tried the usual find controls but to no avail it always returns null. I cannot do it in itemDatabound as I am using a function in my dal which I need to pass the raw value to.

 

01.<telerik:RadGrid ID="rgNotes" runat="server" GroupPanelPosition="Top" OnItemCommand="rgNotes_ItemCommand"  >
02.                                   <GroupingSettings CollapseAllTooltip="Collapse all groups"></GroupingSettings>
03.                                   <MasterTableView NoDetailRecordsText="No notes for this Appointment" AutoGenerateColumns="False" DataKeyNames="notes_id" CommandItemDisplay="Top" CommandItemSettings-AddNewRecordText="Add Notes" AllowAutomaticInserts="true" EditMode="PopUp">
04.                                       <Columns>
05.                                           <telerik:GridEditCommandColumn UniqueName="EditCommandColumn">
06.                                           </telerik:GridEditCommandColumn>
07.                                           <telerik:GridBoundColumn DataField="notes_id" FilterControlAltText="Filter notes_id column" HeaderText="notes_id" ReadOnly="True" SortExpression="notes_id" Visible="true" UniqueName="notes_id">
08.                                           </telerik:GridBoundColumn>
09.                                           <telerik:GridBoundColumn DataField="Subject" FilterControlAltText="Filter Subject column" HeaderText="Subject" ReadOnly="True" SortExpression="Subject" UniqueName="Subject">
10.                                           </telerik:GridBoundColumn>
11.                                       </Columns>
12. 
13.                                       <EditFormSettings EditFormType="Template" InsertCaption="Add new Note" CaptionFormatString="Please enter or update note">
14.                                           <FormTemplate>
15. 
16.                                               <telerik:RadTextBox ID="txtNotesId" Visible="false" Width="200px" runat="server"></telerik:RadTextBox>
17. 
18.                                               Subject
19.                                               <p>
20.                                                   <telerik:RadTextBox ID="txtSubjectNotes" Width="200px" runat="server"></telerik:RadTextBox>
21.                                               </p>
22.                                               <p>
23.                                                   Notes<br />
24.                                                   <telerik:RadTextBox ID="RadTextBox1" TextMode="MultiLine" Rows="10" Columns="10" Width="200px" runat="server"></telerik:RadTextBox>
25.                                               </p>
26. 
27.                                               <telerik:RadButton ID="rdSaveNotes" OnClick="rdSaveNotes_Click" Skin="Bootstrap" BackColor="#512479" ForeColor="White" runat="server" Text="Save Notes"></telerik:RadButton>
28.                                               <telerik:RadButton ID="rdCancel" OnClick="rdCancel_Click1" CommandName="Cancel" Skin="Bootstrap" BackColor="#512479" ForeColor="White" runat="server" Text="Cancel"></telerik:RadButton>
29.                                           </FormTemplate>
30.                                       </EditFormSettings>
31.                                   </MasterTableView>
32.                                   <ClientSettings>
33.                                       <ClientEvents OnPopUpShowing="PopUpShowing" />
34.                                       <Selecting AllowRowSelect="true" />
35.                                   </ClientSettings>
36.                               </telerik:RadGrid>

01.protected void rdSaveNotes_Click(object sender, EventArgs e)
02.{
03.    try
04.    {
05.        int id = Convert.ToInt32(Request.QueryString["id"]);
06.        tblApertureNetNote _note = new tblApertureNetNote();
07. 
08.        _note = _dal.GetNotesById(new Guid(notes_id),_myuser.UserId);
09. 
10.        _note.appointment_id = id;
11.        _note.authUserId = _myuser.UserId;
12.        _note.isActive = true;
13.        _note.isDeleted = false;
14.        _note.subject = txtSubject.Text;
15.        if (_note.EntityState == System.Data.EntityState.Detached)
16.            _dal.Addnotes(_note);
17. 
18.        rgNotes.DataBind();
19.    }
20.    catch (Exception ex)
21.    {
22.        logger.Error("Error in rdSaveNotes_Click function calandar edit.aspx" + ex.ToString());
23.    }
24.}

 

It is txtSubjectNotes.Text i require to access and Notes textbox Please can you advise also how can i close the popup from this button. Many thanks.

Viktor Tachev
Telerik team
 answered on 15 Apr 2016
1 answer
290 views

 

This is really minor, but in the example below, I get Visual Studio warnings that both Calendar and DateInput don't have runat="server". In looking online, I've seen examples where they exist and don't exist, so I'm assuming it doesn't matter. If that's the case, I'll add runat="server" to cut down on all my warnings, but I wanted to double check in case there's any reason not to include runat="server".

 

<telerik:RadDatePicker ID="rdpBatchDate" runat="server" TabIndex="4" Culture="English (United States)">
    <Calendar UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" ViewSelectorText="x" ShowRowHeaders="false">
        <SpecialDays>
            <telerik:RadCalendarDay Repeatable="Today" ItemStyle-BorderColor="Blue">
            </telerik:RadCalendarDay>
        </SpecialDays>
    </Calendar>
    <DatePopupButton HoverImageUrl="" ImageUrl="" TabIndex="-1" ToolTip="Calendar Search" />
    <DateInput DateFormat="M/d/yyyy" DisplayDateFormat="M/d/yyyy" TabIndex="2">
    </DateInput>
</telerik:RadDatePicker>

 

 

 

Kostadin
Telerik team
 answered on 15 Apr 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?