protected void AttachmentCase_AddClick(object sender, EventArgs e)
{
CaseAgentActions.CaseOpenFile attachment = new CaseAgentActions.CaseOpenFile();
// Attach the file referenced to upload.
if (CaseFile.UploadedFiles.Count > 0)
{
foreach (UploadedFile item in CaseFile.UploadedFiles)
{
attachment.Filename = item.FileName;
byte[] attachmentBytes = new byte[item.InputStream.Length];
item.InputStream.Read(attachmentBytes, 0, attachmentBytes.Length);
attachment.FileData = attachmentBytes;
page.oCaseOpen.Files.Add(attachment);
}
}
AttachmentsGrid.Rebind();
}
<
telerik:RadUpload
ID
=
"CaseFile"
runat
=
"server"
InitialFileInputsCount
=
"3"
MaxFileInputsCount
=
"10"
Width
=
"400px"
></
telerik:RadUpload
>
<
asp:Button
ID
=
"AddFileButton"
runat
=
"server"
Text
=
"Add File"
OnClick
=
"AttachmentCase_AddClick"
Width
=
"120px"
CssClass
=
"Case_Search_Button"
Font-Bold
=
"true"
Font-Size
=
"10px"
Height
=
"20px"
CausesValidation
=
"false"
/>
function CustomerSelectedChanged() {
var comboBox = <%= cmbLookUp.ClientID %>;
var CustomerCode = comboBox.GetValue();
//document.getElementById("<%=txtFrom.ClientID %>").value = 'manik';
<%=rdCallBackCustDetails.ClientID%>.MakeCallback('GetCustomerDetails',CustomerCode);
}
' this is code behind
Private Sub RadCallback1_Callback(ByVal sender As System.Object, ByVal args As Telerik.WebControls.CallbackEventArgs) Handles rdCallBackCustDetails.Callback
If args.CallbackEvent = "GetCustomerDetails" And args.Args <> "" Then
Try
MakeControlsUpdatable()
Dim CustomerData As New FreightComDN.cls_Customer(ConfigurationManager.AppSettings("FreightConStr"))
Dim resultcol As Collection
Dim CustomerCode As String
CustomerCode = args.Args
resultcol = CustomerData.getASpecificCustomer(args.Args)
SetText(Me.txtFrom, resultcol.Item(1).customerName)
CustomerData = Nothing
Catch ex As Exception
End Try
End If
End If
End Sub
Private Function MakeControlsUpdatable()
Try
' set all the controls to be updated
rdCallBackCustDetails.ControlsToUpdate.Add(Me.txtFrom)
Catch ex As Exception
End Try
End Function
Private Sub SetText(ByVal txtBox As TextBox, ByVal txtValue As Object)
Try
txtBox.Text = txtValue
Catch ex As Exception
End Try
End Sub
Hello,
I have an ASP.NET page that contains a standard asp:Label at the top of the page in order to display a page title. Below the page title, there are 2 RadGrid controls. The first grid displays parent records that are stored in a database. When an item is selected in the first grid, the second grid is then populated with child records (stored in the same database). This all works fine.
Because there is a 2 - 3 second wait after selecting an item in the first grid and the time it takes to populate the second grid, I have added a RadAjaxLoadingPanel to my ASP.NET page. This is the first time that I have used a LoadingPanel, so I have followed a Telerik demo as a guide for configuring the LoadingPanel.
When I now open my ASP.NET page and click on an item in the first grid, the LoadingPanel appears for about 3 seconds, and then everything on the page disappears, except for the title at the top of the page. Both grids are gone; neither of them are visible on the page. What would cause this to happen? I have double and triple-checked the settings of my LoadingPanel, comparing them to the settings shown in the Telerik demo (http://demos.telerik.com/aspnet-ajax/ajax/examples/loadingpanel/loadingimages/defaultcs.aspx). I have also googled this issue for help, but I cannot determine what I am missing.
Has anyone seen a problem like this and how do I resolve the problem?
Thank you,
Steven