Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
31 views
subject must be Upload by dropping files into grid row.

hi friends,

sorry for posting same question here as I could not decide where it belongs. (admins, please don't get me mad :)

I want to upload image files by dropping them to grid rows.

imagine a product list and customer will drag and drop product images from computer to row that belongs that product. I don't want my client to enter edit mode, upload file and close edit mode, etc.. 

my client can upload multiple files for each row (product) and then I'll analyze and organize images at code side.

any suggestions ?
Hristo Valyavicharski
Telerik team
 answered on 03 Jul 2013
8 answers
230 views
Hi
I load the grid and GridDropDownColumn column from code behind, everty thing works fine except the first row doesn't show the value
thanks
small sample which I found from Forum

<div>
           <telerik:RadGrid runat="server" ID="RadGrid1"
               AutoGenerateColumns="false" AllowPaging="true" AutoGenerateEditColumn="true" >
               <MasterTableView  EditMode="InPlace">
                   <Columns>
                       <telerik:GridBoundColumn DataField="Col1">
                       </telerik:GridBoundColumn>
                       <telerik:GridDropDownColumn DataField="Col2" ListTextField="value" ListValueField="index"
                           UniqueName="DropDownColumn">
                       </telerik:GridDropDownColumn>
                   </Columns>
               </MasterTableView>
           </telerik:RadGrid>
       </div>



code behind

Imports Telerik.Web.UI
Public Class WebForm6
    Inherits System.Web.UI.Page
    Private _isBound As Boolean = False
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
 
    End Sub
 
    Private Sub RadGrid1_ItemCreated(sender As Object, e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemCreated
        If TypeOf e.Item Is GridDataItem Then
            If Not _isBound Then
                DirectCast(DirectCast(RadGrid1.MasterTableView.GetColumnSafe("DropDownColumn"), GridDropDownColumn).ColumnEditor, GridDropDownColumnEditor).DataSource = GetDropDownData()
                _isBound = True
            End If
        End If
    End Sub
 
    Private Sub RadGrid1_NeedDataSource(sender As Object, e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource
        RadGrid1.DataSource = GetGridData()
    End Sub
 
    Private Function GetDropDownData() As DataTable
        Dim dataTable As New DataTable()
        dataTable.Columns.Add("index")
        dataTable.Columns.Add("value")
 
        For i As Integer = 0 To 19
            dataTable.Rows.Add(New Object() {i, i})
        Next
        Return dataTable
    End Function
    Private Function GetGridData() As DataTable
        Dim dataTable As New DataTable()
        dataTable.Columns.Add("Col1")
        dataTable.Columns.Add("Col2")
 
        For i As Integer = 0 To 19
            dataTable.Rows.Add(New Object() {i, i})
        Next
        Return dataTable
    End Function
End Class

Angel Petrov
Telerik team
 answered on 03 Jul 2013
3 answers
184 views
Hi All,
How can I remove extra space in my radnumerictextbox. Whenever I change the width of the textbox it only applies to my textbox but there still about 80px of space after the spinbuttons. I am adding an imagebutton beside it but then it has huge gap between the spinbuttons and the icon and it doesnt look good. Heres the code. Thanks in advance.
<telerik:RadNumericTextBox ID="rntNumber" ShowSpinButtons="true" Width="50px" MaxLength="3" runat="server" Value="50" MinValue="10" MaxValue="200" NumberFormat-DecimalDigits="0">
 </telerik:RadNumericTextBox>
<asp:ImageButton ID="infoBtn" runat="server" width="20px" height="20px" BorderWidth="0px" ImageUrl="../Images/Info.gif" />
RJ
Top achievements
Rank 1
 answered on 03 Jul 2013
3 answers
78 views
Hi,
why does this so called "sprite" images in EditMode? I think that this is a bug.
See picture attached. Is still fixed? What can I do now?

I use this Telerik version 2013.1.417.40.

Thanks,
Mins.
Eyup
Telerik team
 answered on 03 Jul 2013
3 answers
56 views
I am trying to use an external css to design my editor.  In my cs I use this code to inject the css - 

 private void Page_PreRender(object sender, EventArgs e)
 {
  foreach (RadEditor editor in Utility.FindControlsRecursiveByType<RadEditor>(Page))
   editor.CssFiles.Add("~/CSS/HelpEditor.css");
 }

My editor code is this - 
 <tlrk:RadEditor ID="D0_RadArticle" runat ="server" Width="650px" ToolsFile="~/XML/Editor/HelpEditor.xml"
    StripAbsoluteImagesPaths="true">
   <ImageManager ViewPaths="~/Images" />           
  </tlrk:RadEditor>

This works perfectly in IE browsers ( I tested IE7 and up) and in chrome too.  I cannot see the css in firefox alone.  My version is 21.0.

I have also attached screen shot to show how it looks in Firefox and chrome.  Can you please tell me what I might be missing.

Thanks,
Kalyani
Ianko
Telerik team
 answered on 03 Jul 2013
1 answer
301 views
 Hi,
       I am using rad dropdownlist in my project.In My project i show full details in gridview from database on pageload.After that i show the database values in grid view depending upon the selected values in dropdownlist till it works properly.But once i select the dropdown value it shows only the database values in grid view depending upon the selected values.I need to show the full details full details in gridview from database by selecting (select) value in dropdownlist. I want to know how to insert (select) as default value in dropdownlist.
I tried with 'default message' but it doesn't works.Please give me the solution.

Thanks,
 Arun.

Shinu
Top achievements
Rank 2
 answered on 03 Jul 2013
2 answers
451 views

I'm currently exporting to Excel a RadGrid and I have some cells that have the text "1 / 10" meaning that they had 1 hour used for 10 units. When this gets to Excel, it thinks the cell is a date, so it changes the cell to be January-10 which is not what I'm wanting.

I've gone the other direction before (changing a string to a number/date by setting the cell style's mso-number-format property) but I've never had the issue where I needed to make Excel keep the cell as a string and not try to change the format.

How do I do this? I've tried adding a apostrophe to the beginning of the cell text:

e.Cell.Text = String.Format("'{0}", e.Cell.Text);
but that seems to just make Excel display two apostrophe's at the start of the cell.

I'm using an older version of the Grid (2010.2.929.40)
Kostadin
Telerik team
 answered on 03 Jul 2013
1 answer
43 views

I noticed that when we have certain characters on the text field in a DropDownList the control replaces by '?' the visible text. Then when we submit he compares the value the is stored in local variable and detect that they are diferent wich causes trigger the OnSelectIndexChange.

For instance, I have the value CHILDREN'S RIGHTS but when rendering the control replaces by CHILDREN?S RIGHTS.
Thus CHILDREN&#180;S RIGHTS  is diferent from CHILDREN?S RIGHTS, wich I think will cause to trigger the SelectedIndexChanged event

I'm using version 2009.3.1314.35, i don't now if this issue is corrected in newer versions.
Nencho
Telerik team
 answered on 03 Jul 2013
1 answer
105 views
Hello!
Relatively new with Telerik, but I will try my best to explain:
I have a RadGrid where I used

<telerik:RadGrid Width="95%" ID="pogrid" runat="server" AutoGenerateColumns="true" OnColumnCreated="Grid_ColumnCreated" CellSpacing="0" >
    </telerik:RadGrid></div>
and in the Grid_ColumnCreated event, I set some of the properties for those columns..
protected void Grid_ColumnCreated(object sender, Telerik.Web.UI.GridColumnCreatedEventArgs e)
        {
            if (e.Column is GridBoundColumn)
            {
                GridBoundColumn col = (GridBoundColumn)e.Column;
                if (col.DataTypeName != "System.DateTime")
                {
                    col.AllowFiltering = true;  ...


Is there a way that I can make one of the columns a LinkButton? I am looking to fire a report by passing a variable belonging to the item whose button was clicked. Thank you!!!
Princy
Top achievements
Rank 2
 answered on 03 Jul 2013
1 answer
111 views
Hi
I have a RadScheduler sitting within a RadAjaxPanel.
It is binding using a provider that I have written inheriting from DbSchedulerProviderBase
It all works pretty well except I am having the issue that when I switch from business hours view to 24 hour view via the context menu the context menu does not update to "show business hours" it still says "show 24 hours...".
I believe that I have traced the issue to the DOM. The RadContextMenu sits right at the top of my form and outside of the AjaxPanel.
Yes I can and will probably have to override the OnClientTimeSlotContextMenu function and change the text myself based upon the current status. However this appears to be a bug. In a future update can this menu be moved to immediately before, after or inside the schedule DOM element?
<telerik:RadAjaxPanel runat="server" ID="pnlSchedule"
    EnableAJAX="true">
    <telerik:RadScheduler runat="server" id="radSch">
  

<AppointmentContextMenuSettings EnableDefault="True" />

<TimeSlotContextMenuSettings EnableDefault="True" />

  
</telerik:RadScheduler>
</telerik:RadAjaxPanel>
Matthew Botting
Top achievements
Rank 1
 answered on 03 Jul 2013
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?