Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
240 views
Hi,
 Iam trying to save the uploaded image into database and also into folder in my project.Problem is that not able to save image into folder
error:The process cannot access the file because it is being used by another process

protected void RadGrid_Insert(object sender, GridCommandEventArgs e)

{

 

GridEditFormInsertItem InsertItem = e.Item as GridEditFormInsertItem;

try 
{

 

string Name = (InsertItem.FindControl("txbName") as TextBox).Text;

string Address = (InsertItem.FindControl("txtAddress") as TextBox).Text;

string ContactPerson = (InsertItem.FindControl("txtContactPerson") as TextBox).Text;

int PhoneNumber = int.Parse((InsertItem.FindControl("txtPhoneNumber") as TextBox).Text);

 

string EmailID = (InsertItem.FindControl("txtEmail") as TextBox).Text;

RadAsyncUpload radAsyncUpload = InsertItem.FindControl("AsyncUpload1") as RadAsyncUpload;

UploadedFile file = radAsyncUpload.UploadedFiles[0];

string s = file.FileName;

string path = "images/"; 

 

byte[] fileData = new byte[file.InputStream.Length];

file.InputStream.Read(fileData, 0, (

int)file.InputStream.Length);

 

UploadedFile file1 = radAsyncUpload.UploadedFiles[0];

file1.SaveAs(Server.MapPath(path+s));

Jayesh Goyani
Top achievements
Rank 2
 answered on 28 Aug 2011
1 answer
130 views
Hi Telerik Team,

   I am Arvind i am working on the rad Ajax manager, I am using rad Read Pane, inside the radPane i have created a HTML table with ID "messageTable" and i have added this Control (messageTable) to AjaxSettings Updated Control , inside the Table i have added a Asp Place Holder, at runtime i am adding LinkButtons to this and also i have added Event handler for this link buttons, My event handler Appears as follows:

protected void lb_Command(object sender, CommandEventArgs e)
        {
            //CreateLinks();

            Response.ContentType = "application/octet-stream";
                Response.AppendHeader("Content-Disposition", "attachment;filename=" + fileName);
                //string aaa = Server.MapPath(spath + fileName);
                Response.TransmitFile(Server.MapPath("~/" + spath + "/" + fileName));
                Response.End();
        }


on clicking the link the event is being fired and it is connecting to data base and getting the required data, after getting data from database , the data that is being retrieved consists of a file (binary data)  when i try to down load the file i am getting the following error as shown in the figure : "Attachment Error.JPG".

Please help me as soon as possible.

Thanks & Regards
N A Chary.

Jayesh Goyani
Top achievements
Rank 2
 answered on 28 Aug 2011
0 answers
113 views
Hello!
A simple question: I used the image in the grid to export to excel, pdf and word.I want to show hidden column after the grid exported.
How can I put the code in the image click event?

 I know we can put display=true in in the clieck event if there is a button there.
I used GridExporting event and put the display=true code inside. It seem to me that it doesn't work.
 Is it a click event also ? What is the name of the event?

Thanks for any help!

Amy
I used the code. It is working. No help is needed.  Amy

  protected void rg_ItemCommand(object sender, GridCommandEventArgs e)
  {
      if (e.CommandName == RadGrid.ExportToExcelCommandName)
      {
          rg.MasterTableView.GetColumn("x").Visible = false;
          rg.MasterTableView.GetColumn("y").Visible = true;              }
}
Amy Liu
Top achievements
Rank 1
 asked on 28 Aug 2011
9 answers
214 views

I am evaluating the RAD Scheduler for possible purchase and I’m trying to implement a solution where an Exchange 2007 server would be the primary data source for the scheduler.  I have been able to pull in my own mailbox and add, update and delete items just fine but I also need to be able to do this for other users in the organization.  Back in April 2009 another user posted the following thread

“How do I get it to work with public folders or to load another user's calendar (to which the logged in user has access rights in Exchange)?  The provider only takes a username, password, and domain along with the server URL.  I don't see how to specify a particular folder or path.  Looking at Telerik's source code for the Exchange provider, I do see that the DistinguishedFolderIdNameType enumerated date type includes an option for publicfoldersroot, but it doesn't appear to be used anywhere.

Similarly, I'd also like User A, who has access rights to User B's calendar, to be able to do so, but, again, I don't see where I can specify the alternate calendar location.”

Teleriks response was as follows:

“The FindCalendarItems method currently queries only the authenticated users calendar:

DistinguishedFolderIdType[] folderIDArray = new DistinguishedFolderIdType[1];
folderIDArray[0] = new DistinguishedFolderIdType();
folderIDArray[0].Id = DistinguishedFolderIdNameType.calendar;
findItemRequest.ParentFolderIds = folderIDArray;

We can other calendars here as well:

// Identify which folders to search.
List<DistinguishedFolderIdType> folderIDs = new List<DistinguishedFolderIdType>();

DistinguishedFolderIdType ownCalendar = new DistinguishedFolderIdType();
ownCalendar.Id = DistinguishedFolderIdNameType.calendar;
folderIDs.Add(ownCalendar);

DistinguishedFolderIdType otherCalendar = new DistinguishedFolderIdType();
otherCalendar.Id = DistinguishedFolderIdNameType.calendar;

EmailAddressType otherMailbox = new EmailAddressType();
otherMailbox.EmailAddress = "other.user@contoso.com";


otherCalendar.Mailbox = otherMailbox;
folderIDs.Add(otherCalendar);

findItemRequest.ParentFolderIds = folderIDs.ToArray();”

I’ve tried implementing this code but still cannot see any other users on the scheduler.  Is there any other examples or documentation that could help me out here?

Veronica
Telerik team
 answered on 27 Aug 2011
1 answer
117 views
hi,

I used the radscheduler control , when i click on the week tab on top of right side its shows the all the seven days in the bellow scheduler
My problem like this,
 when i click the particular day in the scheduler it show the only particular day  appointments in the top it shows the selected date on top, crome it show the selected day , but in IE9  not compatibility mode and Fire Fox 5 it show the privies day (example  i select the 25 Aug 2011  it show the 24 Aug 2011) .

help me why we got browsers problem , not only this place i got so many  scenarios also , how can i update this type of the issues.

Srinivasarao    

  
Veronica
Telerik team
 answered on 27 Aug 2011
1 answer
248 views
i have a telerik radbutton. on its client clicked a javascript method is called.

 <telerik:RadButton ID="btnOk" runat="server"  OnClientClicked="OK_Clicked" Text="Ok">                       
                    </telerik:RadButton>

//Javascript method
 function OK_Clicked()
 {        
//How can i get the the text value of the radbutton on which clientcliked event this method is called.
    }
Jayesh Goyani
Top achievements
Rank 2
 answered on 27 Aug 2011
12 answers
356 views
Hi,

 I am trying to create this http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/nestedviewtemplate/defaultcs.aspx

100% programmatically.

Can anyone help please?

Thank you!

Dean
Jayesh Goyani
Top achievements
Rank 2
 answered on 27 Aug 2011
0 answers
99 views
Hi,
i am D.Srinivasa,

                       in my project i have a RadGrid to Display a Data from the DataBase, in my RadGrid i have a RadDatePicker Control to display a date from backend,  here enabled the maximum date condition in Raddatepicker,

the following coding is the condition for maximum date operation in RadDatePicker, it checks whether the database can have the data or not, if data is available then it sets the maximum date to that RadDatePicker,

some times it works perfectly but some times it returns error.. 

it returns an error is Specified Cast in Not Valid..

Code Is : 

<telerik:GridTemplateColumn UniqueName="gridActStart" HeaderText="Actual Start" AllowFiltering="false" ItemStyle-HorizontalAlign="Center"><br>
 <
ItemTemplate><br>                      
 <
telerik:RadDatePicker ID="actstart" runat="server" MaxDate='<%#If((Eval("early_start_display") IsNot DBNull.Value), Convert.ToDateTime(Eval("early_start_display")), CType("10/10/2011", System.Nullable(Of DateTime))) %>' Width="100px" Calendar-ShowOtherMonthsDays="false" Calendar-ShowRowHeaders="false" DbSelectedDate='<%# Bind("actual_start") %>' DateInput-DateFormat="MM/dd/yyyy">                     
</
telerik:RadDatePicker><br>                       
</
ItemTemplate><br>                   
 </
telerik:GridTemplateColumn>

and the following attachment is the database for my application. How to resolve this problem,
D.SRINIVASA
Top achievements
Rank 2
 asked on 27 Aug 2011
17 answers
1.9K+ views
I saw a post in Todd Anglin's blog from September about how to format output (font size, etc) of a grid export to PDF.  But I tried the suggestion and the suggested code had no effect on the output.  Is there anywhere I can go for a better discussion of this?
Jorge
Top achievements
Rank 1
 answered on 27 Aug 2011
1 answer
127 views

Hi,
   I have just started using the Telerik controls recently had a question which was frustrating me. I have a grid with a popup edit form. Inside the edit form I want to certain table rows depending on if the user clicks a button. I have registered the Jquery library in my masterpage already, and when i click the button the change happens only for a second then dissapears and the original rows are back. How can I persist the jquery change im trying to make? I even tried with an html button but it still does the same thing.  There has to be a way to do simple functions like hide/show table rows, can someone point that out please look below. This is the table in the Edit pop up form and down below is the Radcodeblock with the javascript. Thanks in advance!

 
<table id="tblEditPopup" style="width:100%; height:100%"
  
<tr id="trProduct"
  
<td align="right"
Select Product:
</td
<td
<telerik:RadComboBox ID="cboxCustomers" runat="server" AutoPostBack="true"
<Items
<telerik:RadComboBoxItem Text="Select Product" /> 
   
<telerik:RadComboBoxItem Text="Apple" Value="Apple" /> 
  
<telerik:RadComboBoxItem Text="Bananas" Value="Bananas" /> 
</Items
</telerik:RadComboBox
</td
</tr>
  
<tr id="trService" style="display:none"
<td align="right"
Select Service:
</td
<td
  
<telerik:RadComboBox ID="cboxServices" runat="server" AutoPostBack="true"
<Items
<telerik:RadComboBoxItem Text="Select Service" /> 
<telerik:RadComboBoxItem Text="Deliver Home" Value="Delivery" />
<telerik:RadComboBoxItem Text="Order By Mail" Value="Mail" /> 
</Items
<telerik:RadComboBox>
  
</td
</tr>
<tr>
<td>

<button id="BtnService" onclick="toggle()" >Choose Service</button>

</td>
</tr>
</table>
  
  
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"
<script type="text/javascript"
  
function toggle() { 
    
$('#trProduct').css('display', 'none'); 
  
  
$('#trService').css('display', 'block'); 
}
  
</script
</telerik:RadCodeBlock
  
   
  
  
Farhan
Top achievements
Rank 1
 answered on 26 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
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
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?