Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
200 views
i want to Display  InvalidStyle and ErrorMessage inside RadInput,but only display style, the errorMessage not display
code like this

<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <div>
        <telerik:RadTextBox ID="txtAppId" runat="server" Width="300" AutoPostBack="false">
        </telerik:RadTextBox>
        <asp:RequiredFieldValidator ID="TextBoxRequiredFieldValidator" runat="server" Display="None"
            ControlToValidate="txtAppId" Text="*" ErrorMessage="NOT NULL">                          
        </asp:RequiredFieldValidator>
    </div>
    </form>
</body>
</html>
<script type="text/javascript">
    function ValidatorUpdateDisplay(val) {
        //debugger
        if (typeof (val.display) == "string") {
            if (val.display == "None") {
                ValidatorUpdateDisplayEnd(val);
                return;
            }
            if (val.display == "Dynamic") {
                val.style.display = val.isvalid ? "none" : "inline";
                return;
            }
        }
        if ((navigator.userAgent.indexOf("Mac") > -1) &&
        (navigator.userAgent.indexOf("MSIE") > -1)) {
            val.style.display = "inline";
        }
        val.style.visibility = val.isvalid ? "hidden" : "visible";
    }
 
    function ValidatorUpdateDisplayEnd(args) {
        //debugger
        var textbox = $find(args.controltovalidate);
        if (textbox) {
            if (args.isvalid) {
                textbox._invalid = false;
                textbox.updateCssClass();
            }
            else {
                textbox.set_textBoxValue("NOT NULL");
                textbox._invalid = true;
                textbox.updateCssClass();
            }
        }
    }
</script>

parlardin
Top achievements
Rank 1
 answered on 08 Jul 2013
1 answer
342 views
Hi, 

In RadAutoCompleteBox, when we add tokens, each one has a button to remove it from the list.
The tooltip for the button has text 'remove token'.
 Is it possible to change the text on the tooltip for this button to something other than 'remove token'.

I've seen a similar question for changing the remove icon image but not sure how to go about it for tooltip.

Thanks
Laurence
Top achievements
Rank 1
 answered on 07 Jul 2013
3 answers
117 views
Hi,

        I used the textbox in edit template for update the values in gridview. But I got the problem(Collection was modified; enumeration operation may not execute.) .Please give me the solution.

My Code behind code:

 protected void RadGrid1_UpdateCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
        {
            GridDataItem id = (e.Item as GridDataItem);
            string Empid = id.OwnerTableView.DataKeyValues[id.ItemIndex]["EmpId"].ToString();
            foreach (GridDataItem item in RadGrid1.MasterTableView.Items)
            {
                TextBox txtleavetaken = (TextBox)item.FindControl("txttakenleave");
                TextBox txtleaveremain = (TextBox)item.FindControl("txtleavecount");
                TextBox txttotalworkdays = (TextBox)item.FindControl("txttotalworkdays");
                TextBox txtadvance = (TextBox)item.FindControl("txtadvance");
                TextBox txtbonus = (TextBox)item.FindControl("txtbonus");
                TextBox txtothers = (TextBox)item.FindControl("txtothers");
                TextBox txttotalsalary = (TextBox)item.FindControl("txttotalsalary");
                objpl.empname = Empid.ToString();
                objpl.takenleave = txtleavetaken.Text;
                objpl.leave = txtleaveremain.Text;
                objpl.totalworkdays = txttotalworkdays.Text;
                objpl.empadvance = txtadvance.Text;
                objpl.bonus = txtbonus.Text;
                objpl.empothers = txtothers.Text;
                objpl.totalsalary = txttotalsalary.Text;
                objbl.updatesalarydetail(objpl);
                fullviewstaff();
            }



Thanks,
Arun.
Jayesh Goyani
Top achievements
Rank 2
 answered on 06 Jul 2013
1 answer
83 views
Hello,

How to add legend in Pie chart dynamically.

like diff. data with diff. label
Ajay
Top achievements
Rank 1
 answered on 06 Jul 2013
1 answer
116 views
I need to do an insert of a details record but I need to obtain the master record ID.  During the InsertCommand event, I have the GridDataInsertItem and I then create a GridTableView of the master table using this:

Dim parenttable As GridTableView = inserteditem.OwnerTableView.ParentItem.OwnerTableView


I used this article thinking it would work as it mentions the GridTableView but I've come up blank.  How can I obtain the value?
Jayesh Goyani
Top achievements
Rank 2
 answered on 06 Jul 2013
2 answers
252 views
I have a Gridview that that has some radbuttons. One of them allows the user to fill the pdf document and another Radbutton displays the pdf besides GridView. Once I fill the pdf document and click on view pdf button the pdf opens fine besides the gridview. However, the problem is if I click Close button in the RadWindow. Click on Fill to fill the document and click on view pdf Radbutton again to open the pdf it does not open. I am not sure why. Please advise!

I have tried using

string script = "<script language='javascript'>function f(){ShowPDFDocument('" + title + "', '" + url + "');Sys.Application.remove_load(f);}; Sys.Application.add_load(f);</script>";

         
but that didn't help.

Here is some code from my application.  
<telerik:RadAjaxPanel runat="server" LoadingPanelID="LoadingPanel1">
<telerik:RadPageView runat="server" ID="tpDocuments">
                    <asp:Panel ID="pnlDocuments" CssClass="Clear" runat="server">
<div id="divDocuments">
<asp:GridView>
<asp:TemplateField ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Left" HeaderStyle-BorderColor="#2F4F4F"
ItemStyle-BorderColor="#2F4F4F" ItemStyle-VerticalAlign="Top">
<ItemTemplate>
<telerik:RadButton ID="rdFill" CssClass="AddMargin" CommandArgument="" CommandName="cnFill"
runat="server" CausesValidation="False" Icon-PrimaryIconUrl="~/images/fill.gif"
Skin="Vista" Text="Fill" ToolTip="Fill document" />
</ItemTemplate>
</asp:TemplateField>
 
<asp:TemplateField HeaderStyle-BorderColor="#2F4F4F" ItemStyle-Width="5%" ItemStyle-BorderColor="#2F4F4F"
 HeaderText="View <br/>Doc" ItemStyle-VerticalAlign="Middle" ItemStyle-HorizontalAlign="Left">
 <ItemTemplate>
<telerik:RadButton ID="imgViewImage" runat="server" Width="16px" Height="16px" OnClick="imgViewImage_Click"
 ToolTip="View Document">
 <Image ImageUrl="~/images/preview.gif" IsBackgroundImage="false" />
 </telerik:RadButton>
 </ItemTemplate>
 </asp:TemplateField>
</div>
<div id="divDisplayPDFDocument" class="divDisplayPDFDocument">
</div>

 

 

 

</telerik:RadAjaxPanel>
  <telerik:RadWindow runat="server" ID="PDFDocument" OffsetElementID="divDisplayPDFDocument" Modal="false" Behaviors="Close" VisibleStatusbar="false" VisibleTitlebar="True"
      ReloadOnShow="true" RestrictionZoneID="divDisplayPDFDocument" InitialBehaviors="Close">
  </telerik:RadWindow>

 

<telerik:RadWindow runat="server" ID="PDFWindow" Modal="true" Behaviors="Close, Resize"
    VisibleStatusbar="false" VisibleTitlebar="True" InitialBehaviors="Close, Resize"
    ShowContentDuringLoad="true" VisibleOnPageLoad="false" ReloadOnShow="true" Overlay="true"
    OnClientBeforeClose="PDFWindowBeforeClose" Width="800px" Height="600px">
</telerik:RadWindow>


Server side code

 

 

string title = System.IO.Path.GetFileNameWithoutExtension(tmpDir);
string url = "ViewFilingPreview.aspx?length=" + doc.Filesize + "&ext=" + System.IO.Path.GetExtension(tmpDir).Replace(".", "") + "&file=" + System.IO.Path.GetFileNameWithoutExtension(tmpDir);
string script = "ShowPDFDocument('" + title + "', '" + url + "');";
ScriptManager.RegisterStartupScript(this, GetType(), "ShowPDF", script, true);

 

Client Side code

 

function ShowPDFDocument(title, url) {
var oWnd = $find("<%= PDFDocument.ClientID %>");
oWnd.set_title(title);
oWnd.setUrl(url);
SetPDFSize(oWnd);
// oWnd.set_restrictionZoneID("divDisplayPDFDocument");
// oWnd.argument = title;
// oWnd.remove_pageLoad(windowLoad);
// oWnd.add_pageLoad(windowLoad);
 oWnd.show();
}

 

 

 

 

 

 

 

 

 

 


 


 

 

 

Jinisha
Top achievements
Rank 1
 answered on 05 Jul 2013
2 answers
416 views
Hi, I have the following html button:
<input type="button" id="SubmitEnviado" runat="server" style="display: none !important" onserverclick="SubmitEnviado_Click" />


I need to hide it.

So i tried adding the following to my project's css:
a.rfdSkinnedButton, #ctl00_ContentPlaceMaster_SubmitEnviado, #ctl00$ContentPlaceMaster$SubmitEnviado, #ctl00_ContentPlaceMaster_SubmitEnviado
{
    display: none !important;
}

Its not working.
How can i hide this button ?

Thanks in advance.
Alexandre
Top achievements
Rank 1
 answered on 05 Jul 2013
5 answers
303 views
Hi,

I noticed in the below thread that frozen columns are not supported in mobile browsers. Can you provide a list of RadGrid functionality that is not supported in mobile browsers?

http://www.telerik.com/community/forums/aspnet-ajax/grid/radgrid-frozen-columns-problem-on-safari-browser-in-apple-ipad.aspx


Thanks,

Ryan
Fraser
Top achievements
Rank 1
 answered on 05 Jul 2013
5 answers
244 views
I am trying to export a table from radeditor to pdf.  I have copied exactly the code in the demo and the pdf shows blank.

        <asp:button runat="server" ID="btnExport" Text="Generate PDF" OnClick="btnExport_Click"/>

        <telerik:RadEditor ID="RadEditor1" runat="server" ContentFilters="DefaultFilters,PdfExportFilter"  Visible="false" >
 <Content>
same code from demo
          </Content>
        </telerik:RadEditor>

        protected void btnExport_Click(object sender, EventArgs e)
        {           
RadEditor1.ExportToPdf();
        }

How can I get the table to export
Ivaylo
Telerik team
 answered on 05 Jul 2013
2 answers
256 views
I'm attaching a jpg of what I see.  I want the export to word and export to excel buttons to go away and for the row that contains them to go away.  Here's the code from my .aspx file:

<telerik:RadGrid ID="rgFields" runat="server" OnNeedDataSource="rgFields_NeedDataSource"
    AutoGenerateColumns="False" CellSpacing="0" GridLines="None" OnItemDataBound="rgFields_ItemDataBound"
    OnItemCreated="rgFields_ItemCreated" MasterTableView-CommandItemDisplay="None">
    <MasterTableView DataKeyNames="FieldID" AllowFilteringByColumn="false" AllowSorting="false" AllowPaging="false" PageSize="1000"
        CommandItemSettings-ShowExportToExcelButton="false" CommandItemSettings-ShowExportToWordButton="false"
        CommandItemSettings-ShowAddNewRecordButton="false" CommandItemSettings-ShowRefreshButton="false">
        <Columns>
            <telerik:GridBoundColumn AutoPostBackOnFilter="true" DataField="FieldName" HeaderText="Field" UniqueName="FieldName">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn AutoPostBackOnFilter="true" DataField="FieldType.FieldTypeName" HeaderText="Type" UniqueName="FieldTypeName">
            </telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

The only other thing I have going on is I reference a skin in App_Themes that has the following code:

<telerik:RadGrid runat="server" AllowPaging="True" AllowSorting="True"
    AllowFilteringByColumn="true" GridLines="None" AutoGenerateColumns="False" Skin="Default"
    PagerStyle-AlwaysVisible="true" PagerStyle-PageSizeLabelText="Number of entries per page:">
    <MasterTableView CommandItemDisplay="top">
        <CommandItemSettings ShowExportToWordButton="True" ShowExportToExcelButton="True" />
        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="True">
            <HeaderStyle Width="20px" />
        </RowIndicatorColumn>
        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True">
            <HeaderStyle Width="20px" />
        </ExpandCollapseColumn>
    </MasterTableView>
    <HeaderStyle Font-Bold="true" VerticalAlign="top" />
    <ExportSettings ExportOnlyData="True" IgnorePaging="True" OpenInNewWindow="True" />
    <GroupingSettings CaseSensitive="false" />
    <AlternatingItemStyle VerticalAlign="Top" />
    <ItemStyle VerticalAlign="Top" />
</telerik:RadGrid>

I'm guessing that this might be messing me up, but I can't figure out how/why.  I'd like to keep the skin, as it works well for 99% of my grids.

Any ideas would be much appreciated.

Thanks!

Laurie
Laurie
Top achievements
Rank 2
 answered on 05 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?