Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
73 views
How to draw the spline chart (line appearnce-smooth) in Q12013 using C# code 
Danail Vasilev
Telerik team
 answered on 29 Apr 2014
3 answers
114 views
Problem is I am Adding a AddNew link button in CommandItem Template So Export buttons not  visible 

Then using the following code works Crome and IE but firefox is showing those buttons again any suggestions !!!!

 <CommandItemTemplate>
  <asp:LinkButton ID="lnkAdd" runat="server" Text="Add New" CommandName="AddNew"></asp:LinkButton>
<asp:Button ID="expbexcel" CommandName="ExportToExcel" CssClass="rgExpXLS" runat="server" />   
 <asp:Button ID="expbdoc" CommandName="ExportToWord" CssClass="rgExpDOC" runat="server" />    
<asp:Button ID="expbpdf" CommandName="ExportToPdf" CssClass="rgExpPDF" runat="server" />   
 <asp:Button ID="expbcsv" CommandName="ExportToCsv" CssClass="rgExpCSV" runat="server" />
 </CommandItemTemplate>

Thanks 
SR.
Shinu
Top achievements
Rank 2
 answered on 29 Apr 2014
1 answer
141 views
I'm using RadGrid in ASPX, .net 4.5. The data comes up and displays in my grid fine, but I cannot update, insert, or delete records. I have followed the sample version as closely as I can:

http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/batch-editing/defaultcs.aspx

When I try to modify data in the grid, then hit Save, the grid reloads and the data is unchanged.

Originally I had the grid wrapped in ajax panel, but when these problems occurred, I removed it. That made not much difference; though when I was using ajax panel, often times clicking the Save icon did absolutely nothing. Or appeared to do nothing. So with that gone, the page/grid does normal postbacks EXCEPT that none of my event handlers are being called. Page_Load gets called, but nothing else (for example RadGrid1_BatchEditCommand, RadGrid1_ItemUpdated). It seems these should be getting called. 

ASPX:

<telerik:RadScriptManager runat="server" ID="RadScriptManager1" /><br>                <telerik:RadListBox runat="server" ID="SavedChangesList" Width="600px" Height="200px" Visible="false"></telerik:RadListBox><br>                <telerik:RadGrid ID="RadGrid1" GridLines="None" runat="server" AllowAutomaticDeletes="True"<br>                    AllowAutomaticInserts="True" PageSize="10" Skin="Default" OnItemDeleted="RadGrid1_ItemDeleted" OnItemInserted="RadGrid1_ItemInserted"<br>                    OnItemUpdated="RadGrid1_ItemUpdated" OnPreRender="RadGrid1_PreRender" AllowAutomaticUpdates="True" AllowPaging="True"<br>                    AutoGenerateColumns="False" Width="1000px" OnBatchEditCommand="RadGrid1_BatchEditCommand" DataSourceID="sqlContractMatrix"><br>                    <MasterTableView CommandItemDisplay="TopAndBottom" DataKeyNames="ID" DataSourceID="sqlContractMatrix" HorizontalAlign="NotSet" EditMode="Batch" AutoGenerateColumns="False"><br>                        <BatchEditingSettings EditType="Cell" /><br>                        <SortExpressions><br>                            <telerik:GridSortExpression FieldName="SiteID,ProductID" SortOrder="Descending" /><br>                        </SortExpressions><br>                        <Columns><br>                            <telerik:GridTemplateColumn HeaderText="Site" HeaderStyle-Width="150px" UniqueName="SiteID" DataField="SiteID"><br>                                <ItemTemplate><br>                                    <%# Eval("SiteName") %><br>                                </ItemTemplate><br>                                <EditItemTemplate><br>                                    <telerik:RadDropDownList runat="server" ID="ddlSites" AppendDataBoundItems="true" DataValueField="SiteID" DataTextField="SiteName" DataSourceID="sqlSites"><br>                                            <br>                                    </telerik:RadDropDownList><br>                                </EditItemTemplate><br>                            </telerik:GridTemplateColumn><br> <br>                            <telerik:GridTemplateColumn HeaderText="Product" HeaderStyle-Width="150px" UniqueName="ProductID" DataField="ProductID"><br>                                <ItemTemplate><br>                                    <%# Eval("ProductName") %><br>                                </ItemTemplate><br>                                <EditItemTemplate><br>                                    <telerik:RadDropDownList runat="server" ID="ddlProducts" DropDownWidth="250" DropDownHeight="400" DefaultMessage="Product" AppendDataBoundItems="true" DataValueField="ProductID" DataTextField="ProductName" DataSourceID="sqlProducts"><br>                                            <br>                                    </telerik:RadDropDownList><br>                                </EditItemTemplate><br>                            </telerik:GridTemplateColumn><br>                                <br>                            <telerik:GridAttachmentColumn DataSourceID="sqlContractMatrix" MaxFileSize="1048576" HeaderStyle-Width="250px"<br>                                EditFormHeaderTextFormat="Upload File:" HeaderText="HTML Template" AttachmentDataField="BinaryData"<br>                                AttachmentKeyFields="ID" FileNameTextField="TemplateFileBinary" DataTextField="TemplateFileBinary"<br>                                UniqueName="TemplateFileBinary"><br>                            </telerik:GridAttachmentColumn><br> <br>                            <%--<br>                            <telerik:GridBoundColumn DataField="TemplateFile" HeaderStyle-Width="200px" HeaderText="Template"<br>                                SortExpression="TemplateFile" UniqueName="TemplateFile"><br>                            </telerik:GridBoundColumn><br>                            --%><br> <br>                            <telerik:GridBoundColumn DataField="PDFName" HeaderStyle-Width="200px" HeaderText="PDF Name"<br>                                SortExpression="PDFName" UniqueName="PDFName"><br>                            </telerik:GridBoundColumn><br>                            <telerik:GridButtonColumn ConfirmText="Delete this record?" ConfirmDialogType="RadWindow"<br>                                ConfirmTitle="Delete" HeaderText="Delete" HeaderStyle-Width="50px" ButtonType="ImageButton"<br>                                CommandName="Delete" Text="Delete" UniqueName="DeleteColumn"><br>                            </telerik:GridButtonColumn><br>                        </Columns><br>                    </MasterTableView><br>                </telerik:RadGrid><br>                <asp:SqlDataSource ID="sqlContractMatrix" runat="server" ConnectionString="<%$ ConnectionStrings:FitTrack %>"<br>                    DeleteCommand="DELETE FROM ContractMatrix WHERE ID = @ID" <br>                    InsertCommand="INSERT INTO ContractMatrix (SiteID, ProductID, TemplateFile, PDFName, LastModifiedDate, LastModifiedByID) VALUES (@SiteID, @ProductID, @TemplateFile, @PDFName, @LastModifiedDate, @LastModifiedByID)"<br>                    UpdateCommand="UPDATE ContractMatrix SET SiteID = @SiteID, ProductID = @ProductID, TemplateFile = @TemplateFile, PDFName = @PDFName, LastModifiedDate = GETDATE(), LastModifiedByID = @LastModifiedByID WHERE ID = @ID"><br>                    <DeleteParameters><br>                        <asp:Parameter Name="ID" Type="Int32"></asp:Parameter><br>                    </DeleteParameters><br>                    <InsertParameters><br>                        <asp:Parameter Name="SiteID" Type="Int32"></asp:Parameter><br>                        <asp:Parameter Name="ProductID" Type="Int32"></asp:Parameter><br>                        <asp:Parameter Name="TemplateFile" Type="String"></asp:Parameter><br>                        <asp:Parameter Name="PDFName" Type="String"></asp:Parameter><br>                    </InsertParameters><br>                    <UpdateParameters><br>                        <asp:Parameter Name="SiteID" Type="Int32"></asp:Parameter><br>                        <asp:Parameter Name="ProductID" Type="Int32"></asp:Parameter><br>                        <asp:Parameter Name="TemplateFile" Type="String"></asp:Parameter><br>                        <asp:Parameter Name="PDFName" Type="String"></asp:Parameter><br>                        <asp:Parameter Name="ID" Type="Int32"></asp:Parameter><br>                    </UpdateParameters><br>                </asp:SqlDataSource><br>                <br>                <!-- SQL data sources for various lookup tables --><br>                <asp:SqlDataSource ID="sqlSites" runat="server" ConnectionString="<%$ ConnectionStrings:FitTrack %>" ProviderName="System.Data.SqlClient" SelectCommand="SELECT SiteID, SiteName FROM gym.Site ORDER BY SiteID"></asp:SqlDataSource><br>                <asp:SqlDataSource ID="sqlProducts" runat="server" ConnectionString="<%$ ConnectionStrings:FitTrack %>" ProviderName="System.Data.SqlClient"></asp:SqlDataSource>

C#: 
protected void RadGrid1_BatchEditCommand(object sender, Telerik.Web.UI.GridBatchEditingEventArgs e)<br>        {<br>            SavedChangesList.Visible = true;<br>        }<br> <br>        protected void RadGrid1_ItemUpdated(object source, Telerik.Web.UI.GridUpdatedEventArgs e)<br>        {<br>            GridEditableItem item = (GridEditableItem)e.Item;<br>            string id = item.GetDataKeyValue("ID").ToString();<br>            if (e.Exception != null)<br>            {<br>                e.KeepInEditMode = true;<br>                e.ExceptionHandled = true;<br>                NotifyUser("Record with ID " + id + " cannot be updated. Reason: " + e.Exception.Message);<br>            }<br>            else<br>            {<br>                NotifyUser("Record with ID " + id + " is updated!");<br>            }<br>        }<br> <br>        protected void RadGrid1_ItemInserted(object source, GridInsertedEventArgs e)<br>        {<br>            if (e.Exception != null)<br>            {<br>                e.ExceptionHandled = true;<br>                NotifyUser("Product cannot be inserted. Reason: " + e.Exception.Message);<br>            }<br>            else<br>            {<br>                NotifyUser("New product is inserted!");<br>            }<br>        }<br> <br>        protected void RadGrid1_ItemDeleted(object source, GridDeletedEventArgs e)<br>        {<br>            GridDataItem dataItem = (GridDataItem)e.Item;<br>            string id = dataItem.GetDataKeyValue("ID").ToString();<br>            if (e.Exception != null)<br>            {<br>                e.ExceptionHandled = true;<br>                NotifyUser("Product with ID " + id + " cannot be deleted. Reason: " + e.Exception.Message);<br>            }<br>            else<br>            {<br>                NotifyUser("Product with ID " + id + " is deleted!");<br>            }<br> <br>        }


Please help. Why are the data updates not occurring?
Princy
Top achievements
Rank 2
 answered on 29 Apr 2014
1 answer
89 views
I have a RadTileList that includes Tiles in the ASPX markup as well as others that are dynamically created on the server (not databound).

Why can't I remove a RadTile that was defined in the ASPX markup from the code behind?  in the snippet below - the tile reference is found - but .Remove does nothing.  

Dim tile = RadTileList1.GetAllTiles.Find(Function(x) x.ID = item.ID)
If tile IsNot Nothing Then
    RadTileList1.GetAllTiles.Remove(tile)
End If
Marin Bratanov
Telerik team
 answered on 29 Apr 2014
1 answer
262 views
Could someone tell me which version was the Resize option added to the textbox?

We have a system that is currently still using Q3 2010 (outside of our control) and while I can add it to the html without it causing an error, it doesn't actually do anything so I'm guessing it was added after this version and just want confirmation....

Thanks
Shinu
Top achievements
Rank 2
 answered on 29 Apr 2014
1 answer
690 views
Hello,

I want to add some images to my database to a binary data field.
But the image sould always the same size. But the original file can be different.
When i add the fila via Async upload, the file must first resize to my dimensions and fit the longer edge. Then the crop tool should run automatically and appears on imageEditor (no other tools) and the user sould set the crop the image by the correct aspect ratio.

At the final i want it save as a binary file to my database.

What i want is all images in my database sould 800 px x 300 px. But this is not a most common used ratio. Images must resized and cropped. This is ok but the image must always cropped by the user, because it can crop a false side if i make this automatically.

I dont want a tool inside my imageEditor. The crop will run after the upload and users will crop the image only at 800x300 and click a button to finish the proces.

So how can i make this? Is there a sample that i can use it?

Slav
Telerik team
 answered on 29 Apr 2014
1 answer
68 views
How to init/configure telerik controls to look similar on every website page? I.e. very similar what I can do with theme's skin for asp.net controls.
E.g. have all DatePickers with the parameters below.
<telerik:RadDatePicker runat="server" Width="140px"
    DateInput-EmptyMessage="mm/dd/yyyy" MinDate="2000-01-01">
</telerik:RadDatePicker>
Marin Bratanov
Telerik team
 answered on 29 Apr 2014
3 answers
92 views
The width of a splitter pane is sometimes calculated as 0 when the splitter is inside a PageView that is inside a splitter and the Selected property of the PageView is being set in a server side event.

Here is a demo of the error.  By clicking the Next Tab button it is changing the selected PageView.  RadPane7 and RadPane8 inside PV0 will end up with a width of 0.
​
<%@ Page Language="VB" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<!DOCTYPE html>
 
<script runat="server">
    Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
        If Page.IsPostBack = False Then
            MultiPage.PageViews(0).Selected = True
        End If
    End Sub
     
    Protected Sub NextButton_Click(sender As Object, e As EventArgs) Handles NextButton.Click
        Dim TabIndex As Integer = 0
 
        If TabIndexLabel.Text = 0 Then
            TabIndex = 1
        End If
     
        TabIndexLabel.Text = TabIndex
        MultiPage.PageViews(TabIndex).Selected = True
    End Sub
</script>
 
<head runat="server">
    <title></title>
</head>
<body>
  <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
         
        <asp:Label ID="TabIndexLabel" runat="server" Text="0" Visible="false"></asp:Label>
 
        <telerik:RadSplitter ID="RadSplitter1" runat="server">
            <telerik:RadPane ID="RadPane1" runat="server" Scrolling="None" Width="100px">
                <asp:Button ID="NextButton" runat="server" Text="Next Tab" />
            </telerik:RadPane>
 
            <telerik:RadPane ID="RadPane2" runat="server" Scrolling="None">
                <telerik:RadMultiPage ID="MultiPage" runat="server">
                    <telerik:RadPageView ID="PV0" runat="server">
                        <telerik:RadSplitter ID="Splitter0" runat="server">
                            <telerik:RadPane ID="RadPane7" runat="server">
                            </telerik:RadPane>
 
                            <telerik:RadPane ID="RadPane8" runat="server">
                            </telerik:RadPane>
                        </telerik:RadSplitter>
                    </telerik:RadPageView>
 
                    <telerik:RadPageView ID="PV1" runat="server">
                        <telerik:RadSplitter ID="Splitter1" runat="server">
                            <telerik:RadPane ID="RadPane13" runat="server">
                            </telerik:RadPane>
 
                            <telerik:RadPane ID="RadPane14" runat="server">
                            </telerik:RadPane>
                        </telerik:RadSplitter>
                    </telerik:RadPageView>
                </telerik:RadMultiPage>
            </telerik:RadPane>
        </telerik:RadSplitter>
  </form>
</body>
</html>
Dobromir
Telerik team
 answered on 29 Apr 2014
1 answer
1.0K+ views

On the RadDatePicker control, having the MinDate default set to only 1/1/1980 -- which is by design -- is bizarre.

Now that we learned about it (via customer complaint that threw a big generic error message across the page) it's annoying to set all my MinDates to a far less value. Any reason you can't make it at least 1/1/1900 or 1/1/1000?

Also, are there any other Telerik date controls with this odd limitation? I want to know so I can change them all as well, rather than have a customer discover it.
Vasil
Telerik team
 answered on 29 Apr 2014
1 answer
45 views
In http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/filteringcombo/defaultcs.aspx with "Contains" filtering it is possible to start typing, e.g. "fr" than leave it as is, i.e. the combobox will have text "fr" which does not match to any item.
How to force the user either to select an dropdown item or on cleanup the incomplete combobox value?
If that is not possible how to make sure that the item is selected?
Hristo Valyavicharski
Telerik team
 answered on 29 Apr 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?