Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
378 views

I have RADUpload component on a page that allows for uploads of files to the server and inserting of records onto a database after the upload is complete.

Here’s the scenario, a file is uploaded via the RADUpload component. After a successful upload, a table in the database called FILES is populated with data about the uploaded file (ie file name, size, mime type, etc). After data is inserted into the FILES table via stored procedure, the primary key of that recently inserted record is returned to my application via a Scope Identity request. I will call this primary key IDFILES.

After the IDFILES primary is returned to my application, I then grab that data, and perform another insert—this time to a different table called PLANSETS.

All the above is done automatically for every uploaded file.

All the above functions with no problems—unless you are uploading multiple files using that one RADUPLOAD component. However, if you upload more than one file, only the last uploaded file returns the IDFILES data.

Is there a workaround in RADupload that allows me to be able to see that IDFILES even if multiple files are being uploaded?

My code is below:

 

        If ruShell.UploadedFiles.Count > 0 Then

            For Each validFile As UploadedFile In ruShell.UploadedFiles

                Dim targetFolder As String = Server.MapPath("/Plansets/" & rcbStreets.SelectedValue & "/" & rcbAddresses.SelectedValue & "/1")

                'Dim targetFolder As String = "~/Plansets/" & rcbStreets.SelectedValue & "/" & rcbAddresses.SelectedValue & "/1"

                validFile.SaveAs(Path.Combine(targetFolder, validFile.GetName()), True)

 

                sqlPlansetFiles.InsertParameters("description").DefaultValue = validFile.GetNameWithoutExtension

                sqlPlansetFiles.InsertParameters("contenttype").DefaultValue = validFile.ContentType

                sqlPlansetFiles.InsertParameters("size").DefaultValue = validFile.ContentLength

                sqlPlansetFiles.InsertParameters("extension").DefaultValue = validFile.GetExtension

                sqlPlansetFiles.InsertParameters("filename").DefaultValue = validFile.GetName

                sqlPlansetFiles.InsertParameters("path").DefaultValue = "~\Plansets\" & rcbStreets.SelectedValue & "\" & rcbAddresses.SelectedValue & "\1\" & validFile.GetName

 

                sqlPlansetFiles.Insert()

                'Label1.Text = sqlPlansetFiles.InsertParameters("newIDPlansetFiles").DefaultValue.ToString

 

                sqlPlansets.InsertParameters("idaddresses").DefaultValue = rcbAddresses.SelectedValue

                sqlPlansets.InsertParameters("idPlansetTypes").DefaultValue = "1"

                sqlPlansets.InsertParameters("idplansetcategory").DefaultValue = "1"

                sqlPlansets.InsertParameters("isdeleted").DefaultValue = "0"

                sqlPlansets.InsertParameters("idplansetfiles").DefaultValue = idPlansetFiles

                sqlPlansets.InsertParameters("modifieddate").DefaultValue = Now

                sqlPlansets.Insert()

 

            Next

            'labelNoResults.Visible = False

            'repeaterValidResults.Visible = True

            'repeaterValidResults.DataSource = RadUpload1.UploadedFiles

            'repeaterValidResults.DataBind()

        Else

            'labelNoResults.Visible = True

            'repeaterValidResults.Visible = False

        End If

 

    Private Sub sqlPlansetFiles_Inserted(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceStatusEventArgs) Handles sqlPlansetFiles.Inserted

        'Label1.Text = sqlPlansetFiles.InsertParameters("newIDPlansetFiles").DefaultValue.ToString

 

 

        idPlansetFiles = Convert.ToInt32(e.Command.Parameters("@newIDPlansetFiles").Value)

 

       

        'Label1.Text = newProductID

    End Sub

PJ Rodriguez
Top achievements
Rank 1
 answered on 03 Jun 2009
2 answers
137 views
Is there a way to position the window based on the element  than opened it? Similar to tooltip's "relelativeto" property? 

My preference would be tooltip, but I can't accomplish it because of an issue currently being reviewed by support. 
Scott
Top achievements
Rank 2
 answered on 03 Jun 2009
2 answers
84 views
I have the requirement, in numerous screens whereas the user will be presented with
textbox(s) to enter search criteria, and upon their entry of one or many search items
we wil retrieve the data and bind it to the grid.

When the screen opens where is a BIG HOLE in it where I was hoping some type of
placeholder, etc would display the results grid. I have googled and tried some of the
solutions to no avail.

I would love to have a something there to indicate "This is where the search results" are
going to go, possibly with the actual column headings?

Thanks!

Jim Douglas
James
Top achievements
Rank 1
 answered on 03 Jun 2009
4 answers
66 views
Hi guys,

I've been trying to implement self-referencing hierarchy in a grid, but not getting it to work.

Documentation:
http://www.telerik.com/help/aspnet-ajax/grdselfreferencinghierarchy.html

Demo:
http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/selfreferencing/defaultcs.aspx

The problem is that when I click the expand button nothing happens. In Firebug I get the following description:

_353.parentNode is undefined 
_toggleExpand()(click clientX=28, clientY=194, undefined)ScriptRe...=318ed896 (line 4864) 
onclick(click clientX=28, clientY=194)zZ2%2F3o...vQw%3D%3D (line 2) 
[Break on this error] var _355=_353.parentNode.parentNode; 

It points to:
ScriptResource.axd?d=f5247yF8mFQSNUezaysMu7egrLBLdhSVt05lttKDr_VMDoiX_VRdIH7dxSOgEVvXEncLy5lBAmaFxHk85Zb9Tw2&t=318ed896

Does anyone have a clue what might be going on here?

Regards,
-DJ-
-DJ-
Top achievements
Rank 1
 answered on 03 Jun 2009
1 answer
92 views
Hi,

I am having a scenario as on grid paging need to display some custom values in a lable i.e. when I change grid page the value of a lable should get changed. But as Ajax asynchronous post back is used for paging even if I write lable value change code inside page index changed event it will not get reflected. To work that I used updatepanel. I kept that lable inside updatepanel and called Update() method of panel inside page index chagned method of grid. But still the lable value is not getting changed.

Can you please provide me a link where I can see an example in which on page index changed of a grid some other panel control values getting changed?

Thanks,
Avi
Veli
Telerik team
 answered on 03 Jun 2009
2 answers
103 views
I am looking for styling info on the resource grouping row header - which displays the resource name.

For some reason the text seems to be larger than the other text in the scheduler - about the same size as the large date font in the header. (I'm using embeded skins) The large text is being cut-off by the calendar to the right of this row header.

I found this post: http://www.telerik.com/community/forums/aspnet-ajax/scheduler/radscheduler-style.aspx

Which describes the .rsVerticalHeaderTable styles. Is this the correct style attribute for this area? If so, is there any way to modify this style without modifying the full skin? I want to continue to use embeded skins, just reduce the font size for all skins in this area. Can I simply just add a <script type="text/css"> tag to my page modifying this style to have it affect the scheduler regardless of what skin is selected? Alternatively, if there was a way to force this text to wrap at the border of the calendar, that would suffice.

Thank you.
Joe
Top achievements
Rank 1
 answered on 03 Jun 2009
9 answers
254 views
Hi,
   I have an app (RADGRID, formtemplate) where I have a user defined button. I have the form is displayed with the button on the form.  Right now the only thing the button should do when I click it is to simply redisplay the form. This works ok when the form is in insert mode. But when it is in edit mode and I click the button, the app is redisplayed with the header portion being displayed twice, one on top of the other ............

Before Button pressed while in edit mode...                              After button pressed while in edit mode ...

GRIDHEADER                                                                           GRIDHEADER
COMMANDTEMPLATE                                                             COMMANDTEMPLATE
COLUMNHEADER                                                                     COLUMNHEADER
FORMTEMPLATE                                                                     GRIDHEADER
GRID                                                                                         COMMANDTEMPLATE
PAGER                                                                                      COLUMNHEADER
                                                                                                 FORMTEMPLATE
                                                                                                  GRID
                                                                                                  PAGER
  
   I am wondering what the edit mode is doing (maybe in itemcreated) that is not being done when the form is in edit mode ? Any place I can go to read up on the edit and insert form cycle ?

  thanks for your time
Sebastian
Telerik team
 answered on 03 Jun 2009
0 answers
96 views
I have  a asp chart in a hierarchical grid.
When the detail table details are clicked the chart disappears.
Any way to avoid this?


kollam2003
Top achievements
Rank 1
 asked on 03 Jun 2009
1 answer
130 views
Hi,

Is it possible to change the seperator (forward slash) that the FullPath property of a RadTreeNode uses to another character ?

Thanks,
Nicolas

NS
Top achievements
Rank 1
 answered on 03 Jun 2009
0 answers
96 views
The control renders but in only 4 pixels as a block. If i manually enter items into the control then they show up, however when i'm trying to use my datasource the items don't. Heres my query...i have done something similar to this in the past with the same control and it worked, however this is not. I'm almost certain it might be my query so i figure a 2nd pair of eyes looking at it might notice something i haven't?
select 0 [id],'Select a Location'[Name],0 [ParentID],0 [Realid] 
-- 
union 
-- 
select 2 [id],'Dispatch'[Name],0 [ParentID],-2 [Realid] 
-- 
union 
-- 
select 3 [id],'Myself'[Name],0 [ParentID],-3 [Realid] 
-- 
union 
-- 
select 4 [id],'Another Rep'[Name],0 [ParentID],-4 [Realid] 
-- 
union 
-- 
select 5 [id],'Queue'[Name],0 [ParentID],-5 [Realid] 
-- 
union 
-- 
select 6 [id],'Close'[Name],0 [ParentID],-6 [Realid] 
-- 
union 
-- 
--Reps 
select (id+4)id ,Name,4 [ParentID],id [Realid] 
from tbluser  
where id > 1 and isrep=-1  
-- 
union 
-- 
--Queues 
select (id+4)id,Name,5 [ParentID],id [Realid] 
from tblqueue 
where (inactivedate is nulland isrepspecific=0 and id<>-2147483645 and Name<>'Application - Practice Manager' and Name<>'Application - FlowCast' 
--order by id asc 
-- 

Ben
Top achievements
Rank 1
 asked on 03 Jun 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
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
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?