Telerik Forums
UI for ASP.NET AJAX Forum
8 answers
726 views
Hello,
  I am using radgrid to display the data. I want to set the background colour of the parent row of the detail table in the rad grid.I want the colour from the start (extreme left) so that it covers the expandcol cell of master table too.
Please suggest.
Konstantin Dikov
Telerik team
 answered on 10 Jun 2014
1 answer
396 views
hi

I am always getting file count 0 and i don't know why? Is there anything i need to add in the web config file? Or is there anything that i may have missed? Please help. Thanks a lot

<telerik:RadAsyncUpload ID="upload" runat="server" AllowedFileExtensions="jpg,png,gif" Skin="Metro" InputSize="50">
                                <Localization Select="Browse" />
                            </telerik:RadAsyncUpload>

Protected Sub btnUpload_Click(sender As Object, e As EventArgs) Handles btnUpload.Click
        Dim stdWidth As Integer
        Dim stdHeight As Integer
        Dim filenameext As String = "None"
        Try
            Dim i As Integer = upload.UploadedFiles.Count
            If upload.UploadedFiles.Count > 0 Then
                For Each f As UploadedFile In upload.UploadedFiles
                    Dim filename As String = Session("accountid").Replace("-", "0")
                    Dim target As String = Server.MapPath(filename)
                    Dim filepath As String = "~/images/pic" & filename
                    If Not Directory.Exists(target) Then
                        Directory.CreateDirectory(Server.MapPath(filepath))
                    End If

                    Using originalimage As New Bitmap(f.InputStream)

                        Dim NewSize As System.Drawing.Size = New System.Drawing.Size(stdWidth, stdHeight)
                        Dim newimg As New Bitmap(NewSize.Width, NewSize.Height, PixelFormat.Format16bppRgb555)
                        Dim g As Graphics = Graphics.FromImage(newimg)
                        g.InterpolationMode = InterpolationMode.HighQualityBicubic
                        g.CompositingQuality = CompositingQuality.HighQuality
                        g.SmoothingMode = SmoothingMode.HighQuality
                        g.DrawImage(originalimage, New Rectangle(0, 0, 120, 120))
                        newimg.Save(Path.Combine(Server.MapPath(filepath), filename + f.GetExtension))
                        g.Dispose()
                        originalimage.Dispose()

                    End Using
                Next
            Else
                filenameext = "None"
            End If
        Catch ex As Exception
         
        End Try
    End Sub
Plamen
Telerik team
 answered on 10 Jun 2014
1 answer
75 views
Hi

I have a tree view inside a radcomboBox. This contains a list of location some 2 deep some 3.

Is it possible to collapse the 3rd level so that the top 2 are expanded, only the lower levels (if any exist) are collapsed.

Andy
Plamen
Telerik team
 answered on 10 Jun 2014
1 answer
120 views
Hi,

I am trying to get a RadTreeView to display some very basic data from a SQL Database.

The data is already filtered from the SQL Server so what ever the SQL Server finds, I want to display it all. There is no sort of Row 1 links with Row 2. They are all unique.
The format of the query is
ID, Date, Description.

What I am trying to do is get the Date displayed in the first node, and when it has been clicked, I would want the Description to be down below it.

I have attached a sample image on how it looks now.

My current code is very basic which is below.

<telerik:RadTreeView runat="server" ID="RadTreeView2" Skin="Metro" DataSourceID="GetNotesTicket" datatextfield="Date">
 
                                          
                                       </telerik:RadTreeView>




I have played around with trying to use DataBindings and Notes. As well as trying to use DataFieldID, DataValueField but still not happening.

I ideally would want to display it in a Template the Description so that the user can edit the data using a RadFormWindow so I would be putting some buttons in there to.

This is the closest example I can find on how I want it to work until I start looking at the button clicks. Link

Any help would be useful.

Thanks,




 












Plamen
Telerik team
 answered on 10 Jun 2014
1 answer
109 views

I am getting a strange error when I try to insert records on a sub radgrid and I still have one other to build in yet.  What happens is that it grabs all the fields and inserts into the database just fine, but when it rebinds it tells me that the intPositionId from the sub table does not exist.  The following is the error that it gieves me.  This is the PK of of sub table and is inserted fine, like I said its just on rebinding of the table that it goes whacky, but if I leave page and come back normal everything I inserted is there and it works just fine.  It has something to do with the postback and rebind.  If I take out postback rebind it works just fine but then the data inserted is not there.


if (e.CommandName == RadGrid.PerformInsertCommandName && e.Item.OwnerTableView.Name == "Positions")
       {
           GridEditableItem item = e.Item as GridEditableItem;
           GridDataItem parentItem = e.Item.OwnerTableView.ParentItem;
           //int sectionId = Convert.ToInt32(item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["intSectionId"]);
           int secId = Convert.ToInt32(parentItem.OwnerTableView.DataKeyValues[parentItem.ItemIndex]["intSectionId"]);
           TextBox descrip = (TextBox)item.FindControl("txtdescription");
           TextBox scale = (TextBox)item.FindControl("txtScale");
           TextBox posType = (TextBox)item.FindControl("txtPosType");
           TextBox grade = (TextBox)item.FindControl("txtGrade");
 
           sql = "Execute usp_InsertPosition " + secId + ", '" + c.SanitizeString(descrip.Text) + "', '" + c.SanitizeString(scale.Text) + "', '" + c.SanitizeString(posType.Text) + "', '" + c.SanitizeString(grade.Text) + "'";
 
           c.InsertUpdateDelete(sql);
           myradGrid.Rebind();  """"""If I remove works fine but in sub grid gives below error.
       }


intPositionId is neither a DataColumn nor a DataRelation for table .
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
 
Exception Details: System.ArgumentException: intPositionId is neither a DataColumn nor a DataRelation for table .
 
Source Error:
 
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 
 
Stack Trace:
 
 
[ArgumentException: intPositionId is neither a DataColumn nor a DataRelation for table .]
   System.Data.DataRowView.get_Item(String property) +1353926
   Telerik.Web.UI.GridTableView.PopulateDataKey(Object dataItem, DataKey key, String name) +86
   Telerik.Web.UI.GridTableView.PopulateDataKeys(Object dataItem) +194
 
[GridException: There was a problem extracting DataKeyValues from the DataSource. Please ensure that DataKeyNames are specified correctly and all fields specified exist in the DataSource.]














































Princy
Top achievements
Rank 2
 answered on 10 Jun 2014
3 answers
356 views
How can I redirect the user to a required page on radalert. This is my radalert

string scriptstring = "radalert('You must save Location for Employee..', 250, 80,'Information');";
                        ScriptManager.RegisterStartupScript(this, this.GetType(), "radalert", scriptstring, true);
Here after clicking Ok I would like to redirect the user to that particular page can some one help me
Shinu
Top achievements
Rank 2
 answered on 10 Jun 2014
8 answers
85 views
Hello, I have created a web part using a RadScheduler and have followed all the instructions to add RadAjaxManager support for the scheduler.

This all works fine but I have noticed an issue with the advanced edit/insert form.

The scheduler is configured to use the advanced form (StartInsertingInAdvancedForm) and when I double click a time slot, the advanced editor opens up.

However, if a user forgets to enter text in the Subject textbox and clicks Save, the Subject textbox border changes to red to prompt the user to enter the subject text. But once this has happened, clicking on Save, Cancel or the X to close the advanced edit form has no effect at all. Nothing happens. And due to the modal nature of the advanced edit form, the only way to go back to the scheduler itself is to refresh the page, losing any changes the user has made.

I have tested this without the AjaxManager and this issue does not appear - so must be to do with ajaxifying the scheduler.

Any ideas why this might happen?

Thanks,
Jonathan
Plamen
Telerik team
 answered on 10 Jun 2014
1 answer
335 views
Hai All I am new to telerik i have a Radbutton when i click on button it will do some operation and at the same time it will show radwindow with yes and no buttons if you 
click on yes it will show alert message saved sucessfully when i click on ok it will go to another page 

Exmple:

<asp:Button ID="Button1" runat="server" Text="Save" CssClass="btnSaveForm" OnClick="btnTotalaSave_Click" />
        
Shinu
Top achievements
Rank 2
 answered on 10 Jun 2014
1 answer
52 views
Hello, 
I was wondering if the listbox drag and drop functionality would be good for the following scenario: building a toy.

The source listbox will contain items (e.g. toy components) that can be double-clicked or dragged over to the destination listbox. 
The destination listbox will contain all the items needed to build the toy. There can be one or more items from the source listbox that can be added to the destination listbox. 

For example: Building a car. 
- in source listbox select the wheels and drag it to the destination listbox. 
- the wheels in the source listbox should still be there for me to re-select it again and drag it to the destination listbox because a car needs two sets of wheels. 
- if we wanted, we can drag another set of wheels to the car.

Question:
is there a setting where i drag and drop but have the item not being removed in the source listbox so I can keep on selecting and dragging it over to the destination listbox?
or is this something that i need to do client-side or server-side?
thanks for the help.
mike
Top achievements
Rank 1
 answered on 10 Jun 2014
3 answers
1.8K+ views
In my ASP.NET 4.0 project, I have many RadWindow-powered dialog boxes that are defined like this partial code example:

<telerik:RadWindow ID="rwChangePassword" runat="server" Behaviors="Close,Move" EnableShadow="true" VisibleStatusbar="false" VisibleTitlebar="true" AutoSize="true" Modal="true">
  <ContentTemplate>
    <div class="dialogMain smallText" style="width:330px">
      <asp:UpdatePanel ID="UpdatePanel2" runat="server">
        <ContentTemplate>
          <div style="margin:10px 0 0 5px">
            <div style="width:95%">
              Please enter the user's new password, enter it a second time to confirm, and then press OK:
            </div>
            .
            .
            .

To turn them on/off I use server-side code like this:

public bool ModalDialogIsActive
{
  get
  {
    return Convert.ToBoolean(ViewState["ModalDialogIsActive"]);  // Note: Returns 'false' if the value is 'null'
  }
 
  set
  {
    if (value)
      Website.Common.ShowDialog(rwChangePassword);
    else
      Website.Common.HideDialog(rwChangePassword);
 
    ViewState["ModalDialogIsActive"] = value;
  }
}

That all works fine.  But now I'm trying to introduce a title to such a dialog, which I will dynamically generate depending on various factors.  For example, for the Change Password dialog box above, I might have a title like "Changing Password for John Smith".

I tried doing this by simply setting the Title property of the RadWindow before activating the dialog box.  Here's an example:

rwChangePassword.Title = "Changing Password for " + userName;
ModalDialogIsActive = true;

This didn't work though.  No matter what I tried, the title always remained blank.

So how does one dynamically set the Title of a RadWindow?

Robert



Raj
Top achievements
Rank 1
 answered on 09 Jun 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?