Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
198 views
Hello,

How do we prevent the tooltip from appearing in the RadEditor?



Thank You!
Rumen
Telerik team
 answered on 06 Jun 2013
1 answer
115 views
Hi,
Is it possible to pass the contents of the RadEditor to and from an IFrame and the parent page? We would like to add a web resource IFrame, utilizing the RadEditor, to our CRM Dynamics 2011 Online account. We want to be able to load some html from the parent page into the IFrame containing the Editor, edit the HTML in the Editor, then pass it back to the parent CRM page (entity) and save it back. The IFrame .aspx page and the parent CRM Online entity page are on different domains, of course, so not sure where to start with this. Any help, examples, or suggestions would be greatly appreciated!

Thank you very much!
Randy Sullivan 
Vessy
Telerik team
 answered on 06 Jun 2013
3 answers
90 views
<telerik:RadGrid ID="RadGrid1" runat="server" OnNeedDataSource="RadGrid1_NeedDataSource"
            AutoGenerateColumns="false" onitemcommand="RadGrid1_ItemCommand">
            <MasterTableView AutoGenerateColumns="false">
                <Columns>
                    <telerik:GridTemplateColumn>
                        <ItemTemplate>
                            <asp:CheckBox ID="CheckBox1" runat="server"   />
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn UniqueName="employeenaem" HeaderText="EmployeeName">
                        <ItemTemplate>
                            <%#Eval("Employeename") %>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn UniqueName="employeeDesgination" HeaderText="EmployeeDesignation">
                        <ItemTemplate>
                            <%#Eval("EmployeeDesignation")%>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn UniqueName="Salary" HeaderText="salary">
                        <ItemTemplate>
                            <%#Eval("EmployeeSalary") %>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
        <telerik:RadButton ID="RadButton1" runat="server" Text="Print"
        onclick="RadButton1_Click">
        </telerik:RadButton>
  .aspx.cs 

  protected void RadButton1_Click(object sender, EventArgs e)
    {
        PrintDocument pd = new PrintDocument();
        foreach (GridDataItem item1 in RadGrid1.SelectedItems)
        {  
            CheckBox ChkedList = (CheckBox)item1.FindControl("CheckBox1");

           
        }
    }

In the above code, I have check box in grid-template....column...when user  selected check box ...i want to know "row index" as well as ....How many rows are selected based on check box checked by user .
I am used   Radgrid1.selectedItems....it's not working,  i am selected ......check-box and then click on  "Print" button ...not getting selected items count...

but it's working other project fine.....Where I am done wrong....what is the  reason....any better solution to get the items.....
and Row indexes of selected items....
replay me.....

Princy
Top achievements
Rank 2
 answered on 06 Jun 2013
2 answers
179 views
Hi
 I want to disable filter of a particular column. How can I have this done.  I have set filtering to entire radgrid.
thnks
savyo
Princy
Top achievements
Rank 2
 answered on 06 Jun 2013
1 answer
141 views
Hi
I've got a user control that I've added to a RadWindow, it's an edit page that is opened inside a modal when a row in a grid is clicked instead of redirecting to a new page. To accomplish this in the click event on the row a new User Control is instantiated, data from the row applied to public properties and then the user control is added to the RadWindows list of controls

It loads fine and but when I click anything that causes postback in the edit page inside of the RadWindow the window disappears and no breakpoints in my code behind is hit. 

I have confirmed that postback causes the webform to postback and not the user control in the RadWindow.

Is there any way around this? 
Marin Bratanov
Telerik team
 answered on 06 Jun 2013
2 answers
98 views

Hi,

I have a problem when updating RadGrid that contains Bound columns, ItemTemplate and EditItemTemplate columns. Whenever I click update button on a row, the update does not work and no error message I get. Below I provided my code. Please help.

<telerik:RadGrid ID="RadGrid1" runat="server"  OnItemDataBound="OnItemDataBoundHandler"
     AllowPaging="True" 
 
………..
 
    <Columns>
     <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
 
                    <ItemStyle CssClass="MyImageButton"></ItemStyle>
 
                </telerik:GridEditCommandColumn>
 
        <telerik:GridBoundColumn DataField="idCol" DataType="System.Int64"
            FilterControlAltText="Filter idCol column" HeaderText="idCol" ReadOnly="True"
            SortExpression="idCol" UniqueName="idCol">
        </telerik:GridBoundColumn>
 
        <telerik:GridBoundColumn DataField="bondNo"
            FilterControlAltText="Filter bondNo column" HeaderText="bondNo"
            SortExpression="bondNo" UniqueName="bondNo" EditFormColumnIndex="0">
        </telerik:GridBoundColumn>
 
         <telerik:GridTemplateColumn HeaderText="OrderNo" ItemStyle-Width="240px">
                    <ItemTemplate>
                        <%#DataBinder.Eval(Container.DataItem, "OrderNo")%>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <telerik:RadComboBox runat="server" ID="RadComboBox1" DataTextField="OrderNo"
                            DataValueField="OrderNo" AutoPostBack="true" OnSelectedIndexChanged="OnSelectedIndexChangedHandler" >
                          
                        </telerik:RadComboBox>
                    </EditItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn HeaderText="OrderItem" ItemStyle-Width="240px">
                    <ItemTemplate>
                        <%#DataBinder.Eval(Container.DataItem, "OrderItem")%>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <telerik:RadComboBox runat="server" ID="RadComboBox2" DataTextField="OrderItem" DataValueField="ItemNo">
                        
                       </telerik:RadComboBox>
                    </EditItemTemplate>
                </telerik:GridTemplateColumn>
 
    </Columns>
Protected Sub OnItemDataBoundHandler(sender As Object, e As GridItemEventArgs) Handles RadGrid1.ItemDataBound
 
    If e.Item.IsInEditMode Then
        Dim editItem As GridEditFormItem = CType(e.Item, GridEditFormItem)
 
        Dim id3 As String = editItem.GetDataKeyValue("IdCol").ToString()
        Dim ds As New DataSet
        ds = GetOrderNo(id3)
        Dim ordNo, itemNo As String
        ordNo = ds.Tables(0).Rows(0)(0)
        itemNo = ds.Tables(0).Rows(0)(1).ToString().Trim()
 
        Dim OrderCombo As RadComboBox = TryCast(e.Item.FindControl("RadComboBox1"), RadComboBox)
        OrderCombo.DataSource = GetDataTable("SELECT OrderNo FROM Orders")
        OrderCombo.DataBind()
        OrderCombo.SelectedValue = ordNo
 
        Dim ItemCombo As RadComboBox = TryCast(editItem.FindControl("RadComboBox2"), RadComboBox)
        ItemCombo.DataSource = GetDataTable("SELECT ItemNo,ItemNo as OrderItem FROM Order_Items where OrderNo='" & ordNo & "'")
        ItemCombo.DataBind()
        ItemCombo.SelectedValue = itemNo
 
    End If
 
End Sub
Amar
Top achievements
Rank 1
 answered on 06 Jun 2013
2 answers
114 views
I'm using v2011.3.1305.40, VS2010, & IE8.  I'm attempting to export a custom header above the grid.  Everything is working fine except cell A1 had a border around it by default.  Please see attatchment.  I was able to reproduce the issue at the simplest level.  How can I make this not happen?

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="TestGrid.aspx.vb" Inherits="Pages_Business_TestGrid" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
        <telerik:RadGrid ID="dg" runat="server" AutoGenerateColumns="false">            
            <MasterTableView>
                <Columns>
                    <telerik:GridBoundColumn HeaderText="ID" DataField="ID"></telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
        <asp:Button ID="btnExport" runat="server" Text="Export" />
    </div>
    </form>
</body>
</html>
Partial Class Pages_Business_TestGrid
    Inherits System.Web.UI.Page
  
    Protected Sub dg_NeedDataSource(sender As Object, e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles dg.NeedDataSource
        Dim dt As New DataTable
        Dim r As DataRow
        Dim col As New DataColumn("ID", GetType(Integer))
        dt.Columns.Add(col)
        For i As Integer = 1 To 10
            r = dt.NewRow
            r("ID") = i
            dt.Rows.Add(r)
        Next
        dg.DataSource = dt
    End Sub
  
    Protected Sub btnExport_Click(sender As Object, e As System.EventArgs) Handles btnExport.Click
        Dim sb As New StringBuilder
        sb.Append("<table>")
        sb.Append("<tr>")
        sb.Append("<table >")
        sb.Append("<tr>")
        sb.Append("<td>Date : </td>")
        sb.Append("<td>")
        sb.Append(Now.ToShortDateString)
        sb.Append("</td>")
        sb.Append("</tr>")
        sb.Append("<tr>")
        sb.Append("<td>Time : </td>")
        sb.Append("<td>")
        sb.Append(Now.ToShortTimeString)
        sb.Append("</td>")
        sb.Append("</tr>")
        sb.Append("<tr>")
        sb.Append("<td> </td>")
        sb.Append("<td></td>")
        sb.Append("</tr>")
  
        dg.MasterTableView.Caption = sb.ToString
        dg.ExportSettings.OpenInNewWindow = True
        dg.ExportSettings.ExportOnlyData = True
        dg.ExportSettings.IgnorePaging = True
        dg.ExportSettings.Excel.Format = Telerik.Web.UI.GridExcelExportFormat.Html
  
        dg.MasterTableView.ExportToExcel()
  
        sb.Append("</table>")
        sb.Append("</tr>")
        sb.Append("</table>")
    End Sub
  
End Class
Rob
Top achievements
Rank 1
 answered on 06 Jun 2013
1 answer
90 views
Hello,

     We have a requirement to allow the user to enter values on a RadWindow (modal type). Based on those values we need to execute business logic on the server and then set a drop down on the next RadWindow. The problem I am facing is that currently we have these set up as one window with separate panels. The first panel is toggled to the next when the first submit is clicked on the window. The second panel should then contain a constrained dropdown of email addresses. I would like this logic to remain on the server as it hits Active Directory and several other business classes in our code. The window is running on client side so even if I call a server side method (onprerender or onpreinit on the window) the next panel is toggled simultaneously and I am unable to set the dropdown contents on the second panel. I thought about just calling another radwindow from code behind. Is there any other way or is this the preferred method to achieve our goals?

Grid - Button click which opens....

Window1 - User answers values that drive drop down on..

Window2 - Contains dropdown that is based on Window1 answers.

-Thanks
Marin Bratanov
Telerik team
 answered on 06 Jun 2013
1 answer
133 views
Hello

I am new to Rad grid. as per the client requirement i have to create one level Hierarchy grid with Insert/Update/Delete. I want to bind the grid using NeedDataSource event i don't want to use SqlDataSource. My main grid will get populated using one Data Table Customer and Child Grid Will get Populate using different Data table order e.g.
                   DTCustomer                  DTOrder
CustomerID Name ContactNumber CustomerID  OrderNumber  OrderAmount
1 ABC 12345   1       1    100
2 PQR 345   2       2    200
3 XYZ 1456   3       3    300

Please Let me know that how can I bind the grid on NeedDataSource Event so that it will display Customer Data as Parent and Order Data as a Child.
Also please let me know that how can i implement the server side  logic to Insert/Update/Delete data to respective tables.
i have refer the example given on  http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/threelevel/defaultcs.aspx
URL but i don't  want to use Automatic Insert/Update/Delete.


Jayesh Goyani
Top achievements
Rank 2
 answered on 06 Jun 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?