Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
47 views
Hi Telerik team,
We are using telerik editor for moss 2007 but its take lots of space in page so user wants to use telerik editor with Out of Box experience of MOSS editor something like in image called oob.png and which if you click on edit content u will see editor which take only small space.
please find attachment of image for both case (out Of box and Telerik)
File name oob.png for Out of box sharepoint experience without telerik
File telerik.png with Telerik RadEditor for moss which has big box for editor.

Please advise

Thanks
Ronak
Rumen
Telerik team
 answered on 11 Apr 2012
1 answer
131 views
I have context menu with a lot of items in second level(>50).
I set RadMenuItem.GroupSettings.Height = 200px for all first level items.

Steps for reproduce:

Open second level menu items, click anywhere to close menu.
Do the same second time and you can see that second menu level items display incorrect. the appear under the top of window(few items are not visible).

How can i know when menu items will display not in bounds of window ?
How can i control position of second menu level items?
Paul
Top achievements
Rank 1
 answered on 11 Apr 2012
4 answers
162 views
I am trying to fill a drop down list witht he value of the textbox from the radgrid.  I tire a previous example sent to me but keep getting Object not set to reference.

Protected Sub myRadGrid_ItemDataBound(sender As Object, e As Telerik.Web.UI.GridItemEventArgs) Handles myRadGrid.ItemDataBound
       If TypeOf e.Item Is GridDataItem Then
           Dim gr As DropDownList = CType(e.Item.FindControl("ddlRank"), DropDownList)
           Dim rank As String = e.Item.Cells(6).Text
           sql = "Select * from OPENQUERY(SIDPERS, 'Select Distinct PAY_GR, PAY_GR GR from PERS_GRABBR_CODE_TBL ORDER BY PAY_GR')"
           myDataTable = New DataTable
           myDataTable = getData(sql)
           gr.DataSource = myDataTable
           gr.DataTextField = "GR"
           gr.DataValueField = "PAY_GR"
           gr.SelectedValue = DirectCast(DataBinder.Eval(e.Item.DataItem, rank).ToString(), String)
           gr.DataBind()
       End If
   End Sub

<EditFormSettings EditFormType="Template">
                                       <FormTemplate>
                                             <table width="100%">
                                               <tr>
                                                   <td style="width:50%" align="right">Prior Uic: </td>
                                                   <td style="width:50%" align="left"><asp:TextBox ID="txtPriorUic" runat="server" Width="100px" Text='<%# Bind("strPrevUic") %>'></asp:TextBox></td>
                                               </tr>
                                               <tr>
                                                   <td style="height:5px"></td>
                                               </tr>
                                               <tr>
                                                   <td style="width:50%" align="right">Para: </td>
                                                   <td style="width:50%" align="left""><asp:TextBox ID="txtpara" runat="server" Width="100px" Text='<%# Bind("strPara") %>'></asp:TextBox></td>
                                               </tr>
                                               <tr>
                                                   <td style="height:5px"></td>
                                               </tr>
                                               <tr>
                                                   <td style="width:50%" align="right"> Line: </td>
                                                   <td style="width:50%" align="left"><asp:TextBox ID="txtLine" runat="server" Width="100px" Text='<%# Bind("strLine") %>'></asp:TextBox></td>
                                               </tr>
                                               <tr>
                                                   <td style="height:5px"></td>
                                               </tr>
                                               <tr>
                                                   <td style="width:50%" align="right">Return Grade: </td>
                                                   <td style="width:50%" align="left"><asp:DropDownList ID="ddlRank" runat="server" Width="105px"> </asp:DropDownList>
                                                   </td>
                                               </tr>
                                           </table>
                                           <table width="100%">
                                                <tr>
                                                    <td style="width:50%" align="right"></td>
                                                    <td style="width:50%" align="left">
                                                       <asp:LinkButton ID="lnkSubmit" runat="server" text='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "Insert", "Update") %>' 
                                                       CommandName='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "PerformInsert", "Update")%>'></asp:LinkButton>
                                                             
                                                       <asp:LinkButton ID="lnkCancel" runat="server" CausesValidation="false" CommandName="Cancel" Text="Cancel"></asp:LinkButton>
                                                   </td>
                                               </tr>
                                           </table>
                                       </FormTemplate>
                                   </EditFormSettings>



Princy
Top achievements
Rank 2
 answered on 11 Apr 2012
1 answer
163 views
Hi all,

Right now, I am facing a problem with my Filter Template.
I have studied this  link http://demos.telerik.com/aspnet-ajax/grid/examples/programming/filtertemplate/defaultcs.aspx .
It is good example.
But my problem is that one of my column has some different condition.
The combo box has 4 value (i.e. New, In Progress, Near completion, Closed). it is filled by data source SDSStatus & two more items are added i.e. "All" & "Open Only".
Now, Suppose If I am select Open Only from combo,except "Closed" records all other records should be displayed in grid. 
Actually, I want to know that, Is it possible to filter like this way? 
Please help me its urgent.
see below code.  ( That is what I am thinking ).

<telerik:GridBoundColumn DataField="StatusName" HeaderText="Status Name" SortExpression="StatusName"
                                  UniqueName="StatusName"  >
                                  <FilterTemplate>
                          <telerik:RadComboBox ID="RadComboBoxSts" DataSourceID="SDSStatus" DataTextField="StsName"
                              DataValueField="StsName" Skin="Office2007" Width = "100%" Height="100px" AppendDataBoundItems="true" SelectedValue='<%# TryCast(Container,GridItem).OwnerTableView.GetColumn("StatusName").CurrentFilterValue %>'
                              runat="server" OnClientSelectedIndexChanged="StsIndexChanged">
                              <Items>
                                  <telerik:RadComboBoxItem Text="All"/>
                                               <telerik:RadComboBoxItem Text="Open Only"/> 
                              </Items>
                          </telerik:RadComboBox>
                          <telerik:RadScriptBlock ID="RadScriptBlock3" runat="server">
 
 
                              <script type="text/javascript">
                                  function StsIndexChanged(sender, args) {
                                                     
                                  var tableView = $find("<%# TryCast(Container,GridItem).OwnerTableView.ClientID %>");
 
                                If(args.get_item().get_text() == "Open Only")
                                                  {
                                      tableView.filter("TaskTypeName", "Closed", "NotEqualTo");
                                                   // Combo selected text must be Open Only after filtering.
                                                   }
                                   Else
                                                    {
                                      
                                      tableView.filter("TaskTypeName", args.get_item().get_value(), "EqualTo");
                                                    }  
                                  }
                              </script>
 
 
                          </telerik:RadScriptBlock>
                      </FilterTemplate>
                                  <HeaderStyle  Width = "6%" VerticalAlign ="Top"/>
                                  <ItemStyle  Width = "6%" VerticalAlign ="Top"/>
                              </telerik:GridBoundColumn>


 
Tsvetina
Telerik team
 answered on 11 Apr 2012
3 answers
121 views
I have been playing with your demo of rtf exporting at http://demos.telerik.com/aspnet-ajax/editor/examples/rtfexport/defaultcs.aspx

If I add a table and give the columns widths (or not) and I export it to rtf I get a table in the rtf that has the smallest width possible for the table columns. One letter per row. Is there someway to fix this?

Josh
Rumen
Telerik team
 answered on 11 Apr 2012
3 answers
175 views
I creat a project and using gzip in Global.asax :
 protected void Application_BeginRequest(object sender, EventArgs e)
    {
        HttpApplication app = (HttpApplication)sender;
        string acceptEncoding = app.Request.Headers["Accept-Encoding"];
        System.IO.Stream prevUncompressedStream = app.Response.Filter;

        if (acceptEncoding == null || acceptEncoding.Length == 0)
            return;

        acceptEncoding = acceptEncoding.ToLower();

        if (acceptEncoding.Contains("gzip"))
        {
            // gzip
            app.Response.Filter = new System.IO.Compression.GZipStream(prevUncompressedStream,
                System.IO.Compression.CompressionMode.Compress);
            app.Response.AppendHeader("Content-Encoding",
                "gzip");
        }
        else if (acceptEncoding.Contains("deflate"))
        {
            // defalte
            app.Response.Filter = new System.IO.Compression.DeflateStream(prevUncompressedStream,
                System.IO.Compression.CompressionMode.Compress);
            app.Response.AppendHeader("Content-Encoding",
                "deflate");
        }
    }
But I use control of Telerik then style error. It doen't display. Can I help me fix.Thanks all
Project address : <the link was removed because the project contains a registered Telerik.Web.UI.dll, which violates the license agreement - please remove the dll or the whole project from the shared location>
My email :vthoangtnt@gmail.com
Rumen
Telerik team
 answered on 11 Apr 2012
0 answers
98 views
Hi Telerik,

How to RadBinaryImage Onload Resize?

Regards,
Bekir Ersin
Bekir Ersin
Top achievements
Rank 1
 asked on 11 Apr 2012
3 answers
123 views
How to highlight today's date in DateTimeColumn when filtering in grid
Shinu
Top achievements
Rank 2
 answered on 11 Apr 2012
0 answers
94 views
HI,

i am using Selenium IDE for test purpose.i have tried with a sample program which has a combo-box has dynamically added items during page load. by selecting an item in a combobox and then a button action. selected item test will load to a textbox. it works fine. but when im testing this program with selenium IDE. instead selected item default item is displayed in a textbox. i got struck with this problem for a long time. please provide a better solution. sample code is followed by:

selenium IDE HTML:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="http://localhost:3623/" />
<title>New Test</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">New Test</td></tr>
</thead><tbody>
<tr>
    <td>open</td>
    <td>/Default.aspx</td>
    <td></td>
</tr>
<tr>
    <td>click</td>
    <td>id=ddItem_Arrow</td>
    <td></td>
</tr>
<tr>
    <td>type</td>
    <td>id=ddItem_Input</td>
    <td>Item4</td>
</tr>
<tr>
    <td>click</td>
    <td>css=li.rcbHovered.</td>
    <td></td>
</tr>
<tr>
    <td>clickAndWait</td>
    <td>id=Button1</td>
    <td></td>
</tr>
 
</tbody></table>
</body>
</html>



Selenium IDE c# format :
selenium.Open("/Default.aspx");
selenium.Click("id=ddItem_Arrow");
selenium.Type("id=ddItem_Input", "Item4");
selenium.Click("css=li.rcbHovered.");
selenium.Click("id=Button1");
selenium.WaitForPageToLoad("30000");


sample program code

aspx page:

<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <telerik:RadComboBox ID="ddItem" runat="server">
        </telerik:RadComboBox>
        <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
        <br/>
        <asp:TextBox ID="txtbxShow" runat="server"></asp:TextBox>
    </div>
    </form>
</body>

aspx.cs page

protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
    {
        ddItem.Items.Add(new RadComboBoxItem("Item1"));
        ddItem.Items.Add(new RadComboBoxItem("Item2"));
        ddItem.Items.Add(new RadComboBoxItem("Item3"));
        ddItem.Items.Add(new RadComboBoxItem("Item4"));
    }
}
 
protected void Button1_Click(object sender, EventArgs e)
{
    txtbxShow.Text = ddItem.SelectedItem.Text;
}

Thanks and Regards,
Venkat

Venkat
Top achievements
Rank 1
 asked on 11 Apr 2012
2 answers
582 views
Hi

I am trying to open a detail page by clicking a row in the grid and passing the detail page the value of the ID column, with Javascript like this:

<script type="text/javascript">
        function RowClick(sender, eventArgs) {
            var MasterTableView = eventArgs.get_tableView();
            var row = MasterTableView.get_dataItems()[eventArgs.get_itemIndexHierarchical()];
            var cell = MasterTableView.getCellByColumnUniqueName(row, "ID");
            var oWnd = radopen("Details.aspx?ID=" + cell.innerHTML);
        
     </script>

But when I click a row of the grid I get the error " Unable to get value of the property 'innerHTML': object is null or undefined"
I must be missing something but I just can't see it.  What am I doing wrong?

Please point me in the right direction someone!

Thanks

Clive

PS The aspx page is like this

       <asp:SqlDataSource ID="SqlDataSource1" runat="server"
            ConnectionString="<%$ ConnectionStrings:bessacarrConnectionString %>"
            SelectCommand="SELECT [ID], [DateStart], [DateEnd], [RallyName], [Location] FROM [tblRallies] WHERE DateDiff(day, getDate(), [DateStart]) > 1 ORDER BY [DateStart]">
        </asp:SqlDataSource>
 
    <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1"
        GridLines="None" Skin="WebBlue" AutoGenerateColumns="False">
        <ClientSettings>
            <ClientEvents OnRowClick="RowClick" />
        </ClientSettings>
<MasterTableView datakeynames="ID" datasourceid="SqlDataSource1">
<CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
 
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
 
<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
    <Columns>
        <telerik:GridBoundColumn DataField="ID" DataType="System.Int32" HeaderText="ID"
            ReadOnly="True" SortExpression="ID" UniqueName="ID" Visible="False">
        </telerik:GridBoundColumn>
        <telerik:GridTemplateColumn DataField="DateStart" DataType="System.DateTime"
            HeaderText="Start" SortExpression="DateStart" UniqueName="DateStart">
            <EditItemTemplate>
                <asp:TextBox ID="DateStartTextBox" runat="server"
                    Text='<%# Bind("DateStart") %>'></asp:TextBox>
            </EditItemTemplate>
            <ItemTemplate>
                <asp:Label ID="DateStartLabel" runat="server" Text='<%# Eval("DateStart", "{0:dd/M/yyyy}") %>'></asp:Label>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn DataField="DateEnd" DataType="System.DateTime"
            HeaderText="End" SortExpression="DateEnd" UniqueName="DateEnd">
            <EditItemTemplate>
                <asp:TextBox ID="DateEndTextBox" runat="server" Text='<%# Bind("DateEnd") %>'></asp:TextBox>
            </EditItemTemplate>
            <ItemTemplate>
                <asp:Label ID="DateEndLabel" runat="server" Text='<%# Eval("DateEnd", "{0:dd/M/yyyy}") %>'></asp:Label>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridBoundColumn DataField="RallyName" HeaderText="RallyName"
            SortExpression="RallyName" UniqueName="RallyName">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Location" HeaderText="Location"
            SortExpression="Location" UniqueName="Location">
        </telerik:GridBoundColumn>
    </Columns>
</MasterTableView>
 
<HeaderContextMenu EnableImageSprites="True" CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
    </telerik:RadGrid>
<telerik:RadWindowManager ID="RadWindowManager1" runat="server">  
        </telerik:RadWindowManager>


Clive Hoggar
Top achievements
Rank 1
 answered on 11 Apr 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?