Hello,
I am using a RadGrid (Batch mode) where I can fill textboxes and in each row I have a GridButtonColumn that opens a PopUp to fill other informations related to that row.
As u know, the save of these data (in RadGrid and in the PopUp), must happen in the server side so the unsaved data in the RadGrid will be lost. I thought about saving changes in RadGrid on GridButtonColumn Click but the Btach Edit Command is not fired on that click. This action worked very well on click event of a button outside the RadGrid.
Thanks for helping,
ABITAR
Is it possible to use images for labels instead of text like we are able to do with the older RadChart control. See attached image for an example of what I am wanting to do.
Thanks for the help.
protected void Page_Load(object sender, EventArgs e)
{
var summary = new SalesReports().GetSalesRepresentativeSummary();
this.RadRotator.DataSource = summary;
this.RadRotator.DataBind();
}
protected void RadRotator_ItemDataBound(object sender, RadRotatorEventArgs e)
{
try
{
SalesRepresentativeSummary salesRepresentativeSummary = (SalesRepresentativeSummary)e.Item.DataItem;
if (salesRepresentativeSummary != null)
{
// Populate sub section repeater
RadHtmlChart SalesRepPerformanceRadHtmlChart = (RadHtmlChart)e.Item.FindControl("SalesRepPerformanceRadHtmlChart");
if (SalesRepPerformanceRadHtmlChart != null)
{
SalesRepPerformanceRadHtmlChart.DataBinding += new EventHandler(SalesRepPerformanceRadHtmlChart_DataBinding);
// Show only active ones
SalesRepPerformanceRadHtmlChart.DataSource = new List<
SalesRepresentativeSummary
> { salesRepresentativeSummary };
SalesRepPerformanceRadHtmlChart.DataBind();
}
}
}
catch (Exception ex)
{
}
}
protected void SalesRepPerformanceRadHtmlChart_DataBinding(object sender, EventArgs e)
{
try
{
RadHtmlChart SalesRepPerformanceRadHtmlChart = (RadHtmlChart)sender;
if (SalesRepPerformanceRadHtmlChart != null)
{
// I need to find the IList<SalesRepresentativeSummary> and bind to the chart
IList<
SalesRepresentativeSummary
> dataItem = (List<
SalesRepresentativeSummary
>)SalesRepPerformanceRadHtmlChart.NamingContainer;
SalesRepPerformanceRadHtmlChart.ChartTitle.Text = "Hello" + " - It works";
}
}
catch (Exception ex)
{
}
}
I can't seem to find any documentation pointing to an issue with the Export to ICalendar, which we have had working in our projects for years.
With this latest build, it seems that the file exports but it doesn't contain any appointments.
Has anyone else encountered this?
Hello,
I have a radasyncupload inside a datagrid footer. The files uploads to the temporary folder but when I check for UploadedFiles.Count on the Datagrid.ItemCommand event the count is 0.
Is there a problem with using radasyncupload inside a datagrid control?
<
asp:datagrid
id
=
"grdDocumentUpload"
runat
=
"server"
CssClass
=
"GridStandard"
CellPadding
=
"3"
ShowFooter
=
"True"
AutoGenerateColumns
=
"False"
DataKeyField
=
"rupID"
AllowSorting
=
"true"
>
<
HeaderStyle
CssClass
=
"GridHeaderStandard"
></
HeaderStyle
><
ItemStyle
CssClass
=
"GridItemStyleStandard"
></
ItemStyle
><
br
> <
AlternatingItemStyle
CssClass
=
"GridAlternatingItemStyleStandard"
></
AlternatingItemStyle
><
br
> <
Columns
><
br
> <
asp:TemplateColumn
> <
br
> <
FooterTemplate
><
br
> <
asp:ImageButton
id
=
"imbAddDocumentUpload"
Runat
=
"server"
ImageUrl
=
"images/Icons/icoSave_Enabled.gif"
<br> CommandName="Add" AlternateText="Save New Upload"></
asp:ImageButton
><
br
> </
FooterTemplate
> <
br
> </
asp:TemplateColumn
> <
br
> <
br
> <
asp:TemplateColumn
HeaderText
=
"File"
SortExpression
=
"rupUploadPath"
><
br
> <
ItemTemplate
><
br
> <
asp:HyperLink
ID
=
"hypUploadPath"
Text='<%# DataBinder.Eval(Container.DataItem,"rupUploadPath") %>' Target="_blank" NavigateUrl='<%# DataBinder.Eval(Container.DataItem,"rupUploadPath") %>' CssClass="HyperlinkStandard" runat="server"></
asp:HyperLink
><
br
> </
ItemTemplate
><
br
> <
FooterTemplate
><
br
> <%--<
INPUT
class
=
"LabelStandard"
id
=
"filUploadFile"
type
=
"file"
size
=
"25"
runat
=
"server"
>--%><
br
> <
div
class
=
"qsf-demo-canvas"
><
br
> <
telerik:RadAsyncUpload
runat
=
"server"
ID
=
"AsyncUpload1"
HideFileInput
=
"true"
Skin
=
"Silk"
MultipleFileSelection
=
"Automatic"
PostbackTriggers
=
"cmdSaveUpload"
DropZones
=
".DropZone1"
OnClientValidationFailed
=
"validationFailed"
UploadedFilesRendering
=
"BelowFileInput"
Localization-Select
=
"Browse"
TemporaryFolder
=
"D:\Websites\Uploads\"
/><
br
> <
div
class
=
"DropZone1"
> <
br
> <
p
>Drop Files Here</
p
><
br
> </
div
><
br
> </
div
><
br
> </
FooterTemplate
><
br
> </
asp:TemplateColumn
><
br
> </
asp:datagrid
>
Private Sub grdDocumentUpload_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles grdDocumentUpload.ItemCommand
' Declare procedure scope variables
Dim arySQL(0) As String
Dim lngDocumentUploadID As Long
Dim strErrorMessage As String = ""
Dim filUploadPath As HtmlInputFile
Dim txtDescription As TextBox
Dim hypUploadPath As HyperLink
Dim ddlUploadType As DropDownList
Dim ddlClientAccess As DropDownList
Dim strHTTP As String
Dim chkRequireElectronicSignatureClient As CheckBox
Dim chkRequireElectronicSignatureSpouse As CheckBox
Dim AsyncUpload1 As Telerik.Web.UI.RadAsyncUpload
' Declare variables for file upload
Dim strFileNamePath As String
Dim strFileNameOnly As String
Dim strFilePath As String
Dim strExtension As String
Dim lngCounter As Long = 1
Dim lngLength As Long = 0
Dim lngIndexOfPeriod As Long = 0
Dim strTemporaryFileNameOnly As String
Dim strUploadPath As String = ""
Dim strFilename As String = ""
' Clear user search criteria
GetPageInput()
lblMessage.Text = ""
' Get the HTTP
If UCase(Request.ServerVariables("HTTPS")) = "ON" Then strHTTP = "https://" Else strHTTP = "http://"
strHTTP = strHTTP & Request.ServerVariables("HTTP_HOST") & Request.ApplicationPath
' Get the upload path from web.config
Try
strUploadPath = ConfigurationManager.AppSettings("UploadPath").ToString
Catch ex As Exception
strUploadPath = ""
End Try
If e.CommandName = "Add" Then
lngDocumentUploadID = 0
AsyncUpload1 = CType(e.Item.FindControl("AsyncUpload1"), Telerik.Web.UI.RadAsyncUpload)
If strErrorMessage = "" Then
' Check to make sure the file has been posted
If AsyncUpload1.UploadedFiles.Count = 0 Then
strErrorMessage = "You need to upload at least one file."
End If
For Each filFile As Telerik.Web.UI.UploadedFile In AsyncUpload1.UploadedFiles
If filFile.FileName.ToString <> "" Then
'CODE TO SAVE THE FILE
End If
Next
Else
lblMessage.Text = strErrorMessage & "<
br
>"
lblMessage.CssClass = "ErrorStandardBold"
End If
ElseIf e.CommandName = "Cancel" Then
grdDocumentUpload.EditItemIndex = -1
grdDocumentUpload.ShowFooter = True
lblMessage.Text = ""
lblMessage.CssClass = ""
End If
End Sub
It always shows a count of 0 for the uploaded files count. If I move it outside of the datagrid it works.
Please help.
Hello,
Calling WCF Service, with ClientDataSource, works fine when IIS Authentication set to Anonymous Authentication.
But when I change it to Windows Authentication - It doesn't work.
How can I fix it? Thank you.
Hi guys,
I've been kinda pulling my hair out over this one, I'm trying to get Wizard validation working and I don't know if its just something in my project or what, but no matter what I do, they will not fire.
I've gone as far as copying the example from the Wizard Validation article (http://www.telerik.com/help/aspnet-ajax/wizard-validation.html) and it still will not fire. Am I missing something? Maybe some project level setting? Like I said, I feel like I'm taking crazy pills :P
Thanks in advance!
My entire test page, the validation does not fire:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<
html
xmlns
=
'http://www.w3.org/1999/xhtml'
>
<
head
runat
=
"server"
>
<
title
>Telerik ASP.NET Example</
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
telerik:RadScriptManager
runat
=
"server"
ID
=
"RadScriptManager1"
/>
<
telerik:RadSkinManager
ID
=
"RadSkinManager1"
runat
=
"server"
ShowChooser
=
"true"
/>
<
div
>
<
telerik:RadWizard
ID
=
"RadWizard6"
runat
=
"server"
>
<
WizardSteps
>
<
telerik:RadWizardStep
ID
=
"RadWizardStep1"
CausesValidation
=
"true"
Title
=
"Personal Info"
runat
=
"server"
StepType
=
"Step"
ValidationGroup
=
"personalInfo"
>
<
div
class
=
"inputWapper first"
>
<
asp:Label
ID
=
"Label3"
Text
=
"First Name: *"
runat
=
"server"
AssociatedControlID
=
"FirstNameTextBox"
/>
<
telerik:RadTextBox
ID
=
"FirstNameTextBox"
runat
=
"server"
ValidationGroup
=
"personalInfo"
Width
=
"320px"
></
telerik:RadTextBox
>
<
asp:RequiredFieldValidator
ID
=
"FirstNameRequiredFieldValidator"
runat
=
"server"
ControlToValidate
=
"FirstNameTextBox"
EnableClientScript
=
"true"
ValidationGroup
=
"personalInfo"
ErrorMessage
=
"required field"
CssClass
=
"validator"
ForeColor
=
"Red"
></
asp:RequiredFieldValidator
>
</
div
>
</
telerik:RadWizardStep
>
<
telerik:RadWizardStep
Title
=
"SecondStep"
>
<
asp:TextBox
ID
=
"TextBox1"
runat
=
"server"
></
asp:TextBox
>
</
telerik:RadWizardStep
>
</
WizardSteps
>
</
telerik:RadWizard
>
</
div
>
</
form
>
</
body
>
</
html
>
Hi I have a RadMenu that I am populating dynamically through the code behind. I need to add checkboxes to each child item that allows the user to make a selection or multiple selections in the menu. Is it possible to do this? Someone had suggested to me that I try and nest a RadComboBox inside of the RadMenu, but I'm having no luck with that. I will paste my code below if it will help.
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<telerik:RadMenu ID="handsetMenu" runat="server">
<Items>
</Items>
</telerik:RadMenu>
</ContentTemplate>
</asp:UpdatePanel>
Code Behind:
protected void createFilter(int categoryid)
{
List<int> productIds = new List<int>();
DataRow[] productRow = CategoriesProductsData.Tables["Products"].Select("Category_ID = " + 573);
productIds = productRow.Select(p => int.Parse(p["Product_ID"].ToString())).ToList();
ITCProductService pService = new TCProductServiceClient();
var productTuples = (pService.GetProductsAttributes(productIds));
List<Tuple<int, CustomAttribute>> customAttributes = new List<Tuple<int, CustomAttribute>>();
foreach (var productTuple in productTuples)
{
foreach (var attributeTuple in productTuple.m_Item2)
{
var customAttribute = new Tuple<int, CustomAttribute>(productTuple.m_Item1, new CustomAttribute(attributeTuple));
customAttributes.Add(customAttribute);
}
}
List<CustomAttributeCategory> categories = new List<CustomAttributeCategory>();
var categoryList = customAttributes.Select(a => a.Item2).Select(a => a.Attribute.Category).GroupBy(a => a.AttributeCategoryId);
var CatProdList = new List<CustomAttributeCategory>();
foreach (var category in categoryList)
{
var CatProd = new CustomAttributeCategory();
var prodIDList = from product in customAttributes
where product.Item2.Attribute.CategoryId == category.Key
select Tuple.Create(product.Item1, product.Item2);
CatProd.Category = customAttributes.Select(a => a.Item2.Attribute.Category).Where(a => a.AttributeCategoryId == category.Key).FirstOrDefault();
CatProd.ProdAttributesTuple = new List<Tuple<int, CustomAttribute>>();
CatProd.ProdAttributesTuple = prodIDList.ToList();
CatProdList.Add(CatProd);
}
foreach (var cat in CatProdList)
{
var itemCategory = new RadMenuItem(cat.Category.Name);
handsetMenu.Items.Add(itemCategory);
var option = cat.ProdAttributesTuple.GroupBy(a => a.Item2.Attribute.Value).ToList();
foreach (var attr in option)
{
itemCategory.Items.Add(new RadMenuItem(attr.Key));
}
}
}
protected void handsetMenu_ItemDataBound(object sender, RadMenuEventArgs e)
{
DataRowView row = (DataRowView)e.Item.DataItem;
}
public class CustomAttributeCategory
{
public AttributeCategoryModel Category { get; set; }
public List<Tuple<int, CustomAttribute>> ProdAttributesTuple { get; set; }
}
public class CustomAttribute
{
public AttributeModel Attribute { get; set; }
public List<int> ProductIds { get; set; }
public CustomAttribute(AttributeModel attribute)
{
Attribute = attribute;
ProductIds = new List<int>();
}
}