Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
42 views
I have a grid that works great.

When I edit it I fill a combo box with data.  Everything works great until I change EditMode to InPlace.  When I do that the combo box has the DataTextField in its SelectedValue field.

Here is how I load the data into the RadComboBox.

ddlSecurityRole.DataSource = ocRoles
ddlSecurityRole.DataTextField = "Description"
ddlSecurityRole.DataValueField = "ID"
ddlSecurityRole.DataBind()

When I read the data I do this.
O.ID_SecurityRole = CLng(DirectCast(objEI("SecurityRole").Controls(0), RadComboBox).SelectedValue)

If I have EditMode="InPlace" in my MasterTableView tag then the .SelectedValue equals the Description instead of the ID.

If I remove EditMode="InPlace" then .SelectedValue equals the ID.
Jayesh Goyani
Top achievements
Rank 2
 answered on 08 Jul 2013
2 answers
169 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
284 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
89 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
65 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
77 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
210 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
354 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
251 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
207 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?