Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
143 views

If I place the Grid in a table, the horizontal resize fails. If I increase IE window width, the grid resizes properly. If I decrease IE window width, the grid does not resize and IE starts to display an horizontal scrollbar.

 

 

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TelerikGrid.aspx.cs" Inherits="Application_Test_TelerikGrid" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>

<!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">
<head runat="server">
    <title></title>
   
 <style type="text/css">
  html,
  body,
  form
  {
   margin:0px;
   padding:0px;
   height:100%;
  }
 </style>
</head>
<body>
    <form id="form1" runat="server">
  <asp:ScriptManager ID="ScriptManager1" runat="server" />
  <table style="width:100%;height:100%">
   <tr>
    <td style="height:100%">
     <telerik:RadGrid
      ID="RadGrid1"
      runat="server"
      DataSourceID="XmlDataSource1"
      AllowPaging="true"
      PageSize="40"
      Width="100%"
      Height="100%"
      style="border:0;outline:none"
      >
      <MasterTableView TableLayout="Auto"/>
      <ClientSettings EnableRowHoverStyle="true">
       <Selecting AllowRowSelect="true" />
       <Scrolling AllowScroll="true" UseStaticHeaders="true" />
      </ClientSettings>
      <PagerStyle Mode="NextPrevAndNumeric" />
     </telerik:RadGrid>
    </td>
   </tr>
  </table>
  
  <asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/datasource.xml" />
  
 </form>
</body>
</html>

If I change <table> by <div> it works properly. I am using 2009.1.

 

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TelerikGrid.aspx.cs" Inherits="Application_Test_TelerikGrid" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>

<!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">
<head runat="server">
    <title></title>
   
 <style type="text/css">
  html,
  body,
  form
  {
   margin:0px;
   padding:0px;
   height:100%;
  }
 </style>
</head>
<body>
    <form id="form1" runat="server">
  <asp:ScriptManager ID="ScriptManager1" runat="server" />
  <div style="width:100%;height:100%">
     <telerik:RadGrid
      ID="RadGrid1"
      runat="server"
      DataSourceID="XmlDataSource1"
      AllowPaging="true"
      PageSize="40"
      Width="100%"
      Height="100%"
      style="border:0;outline:none"
      >
      <MasterTableView TableLayout="Auto"/>
      <ClientSettings EnableRowHoverStyle="true">
       <Selecting AllowRowSelect="true" />
       <Scrolling AllowScroll="true" UseStaticHeaders="true" />
      </ClientSettings>
      <PagerStyle Mode="NextPrevAndNumeric" />
     </telerik:RadGrid>
  </div>
  
  <asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/datasource.xml" />
  
 </form>
</body>
</html>

 

 

 

This is happening on IE 7 and 8. Both code samples work properly on FF 3.0.7.

 

Thanks

Dimo
Telerik team
 answered on 31 Mar 2009
3 answers
120 views
I have an 'editor.aspx' page that has some RadEditor controls and an asp:Timer control to perform auto-save.

The editor.aspx page is running inside a RadWindow but when the RadWindow is closed the timer continues running.

Why does this happen? Is there any way to stop the timers, as the Timer control is in 'editor.aspx' but the RadWindow is in the parent aspx page.
Andy
Top achievements
Rank 1
 answered on 31 Mar 2009
2 answers
114 views
How can I restyle the header section where it says "Spell checking mode. Misspelled words are highlighted in yellow."
I have styled the text on my page to be white text with black background.  My problem is that the text is also white on a yellow background in the spell check section.



Also how can I change the text to say "Missspelled words are underlined in red."?
I tried using a RadEditor.Main.Resx in the App_GlobalResources folder, but that did not work.
Tervel
Telerik team
 answered on 31 Mar 2009
1 answer
67 views
Hi,

When I click on BacktoPreviouspage link which runs Javascript:history.go(-1), page looses the SelectedRow_Skin class name from the selected Row in RadGrid.

Any suggestions.

Regards
Div
Dimo
Telerik team
 answered on 31 Mar 2009
0 answers
82 views
Hi masters!

I have created a tabStrip (concretely with 3 tabs). In each I have got different controls, so the height of each pageview differs.

In order to have everything grouped in a table I have created a table without a border in the top, so it seems the content is inside the tab.

I don´t know whether this is the way to do it, or TabStrip has a property to create a table to group the content of each tab in a table.

If so, i would like as well to know how I can adjust the content of each pageview to avoid have a concrete height for every pageview.

I am using 2008 Q3 version.

Thank you.
Patxi
Top achievements
Rank 1
 asked on 31 Mar 2009
1 answer
183 views
Hi

I am using the RadWindow "Edit Dialog for RadGrid" example and all is going well until the ajax request to rebind the grid - i get the following error:

Sys.WebForms.PageRequestManagerServerException: Object variable or with block variable not set.

I believe the section causing the problem is:

 

 

function refreshGrid(arg) {

 

 

if (!arg) {

 

$find(

"<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");

 

}

 

else {

 

$find(

"<%= RadAjaxManager1.ClientID %>").ajaxRequest("RebindAndNavigate");

 

}

}

in the vb pages i have the following code:

 

Protected

 

Sub RadAjaxManager1_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs) Handles RadAjaxManager1.AjaxRequest

 

 

If e.Argument = "Rebind" Then
RadGrid1.Rebind()

 

 

ElseIf e.Argument = "RebindAndNavigate" Then
RadGrid1.MasterTableView.CurrentPageIndex = RadGrid1.MasterTableView.PageCount

 

RadGrid1.Rebind()

 

End If

 

 

End Sub

I have set RadAjaxManager1 to update RadGrid1 in the RadAjaxManager but get the error - does anyone have an idea why this happens? The database is being updated and the grid displays the correct data once the page is refreshed.

Many thanks in advance

Steve :o)

 

Tsvetoslav
Telerik team
 answered on 31 Mar 2009
7 answers
427 views
Hi, I have a RadGrid containing images that I want to export to Excel and PDF.  Having done some experimenting and read the forums, I have come to the below conclusions.  I would be grateful if anyone could let me know whether or not my conclusions are correct?

1. ExportToExcel will only export images which have a full URL e.g. http://MyServer.MyImage.jpg.  It will not export images with a relative URL e.g. ~\MyImage.jpg.  In the latter case, red crosses appear in Excel.

2. The reverse is true for ExportToPdf.  An image with a relative URL exports fine.  With a full URL, I get the following error message:
'Adobe Reader could not open 'MyExport[1].pdf' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded).'

I am using the Q2 2008 Rad controls.

Many thanks
Wendy
Daniel
Telerik team
 answered on 31 Mar 2009
1 answer
81 views
I have a situation where I have a page with a splitter on it.  In one split pane I have a user control with a radgrid in it.  In another split pane I have another user control that will display information based on the selected radgrid row.  I'm not sure the best way to have the radgrid row selection trigger an update.

I'm looking for an example where selecting a row in the radgrid can pass a value from that selected row to another user control in another split pane so that it can update its display based on that passed value.

Any good examples out there already?

Also, I have a similar need for another example of a treeview causing a grid to be updated.  In a third pane on this screen, if the user selects a particular tree node in a treeview, I need to have that trigger the radgrid to update its display based on the tree node selected.

Thx
Yavor
Telerik team
 answered on 31 Mar 2009
1 answer
178 views
I'm using a radcombobox to populate items  from a database on demand.  All works well except for when EmptyMessage is set

The Problem:

    On the first attempt to drop the box down, it displays no matches and nothing comes up in the list.  The second dropdown attempt everything works perfectly.  Happens only when the EmptyMessage property is set.  I'm stumped.

----
Here is what my code looks like:

.aspx and javascript

<telerik:RadComboBox ID="cboCities" runat="server" AutoPostBack="True" EnableLoadOnDemand="True"   
                                                            EnableVirtualScrolling="True" Height="200px" MarkFirstMatch="True"   
                                                            OnClientItemsRequesting="OnClientItemsRequesting"   
                                                            OnItemsRequested="cboCities_ItemsRequested" Filter="None" ShowMoreResultsBox="True"   
                                                            Width="240px" Font-Size="X-Small" AllowCustomText="True"   
                                                            EmptyMessage="Type a city name" Skin="Black">  
                                                            <CollapseAnimation Duration="200" Type="OutQuint" /> 
                                                        </telerik:RadComboBox> 


function OnClientItemsRequesting(sender,e)  
{  
    if(sender.get_appendItems())  
        e.get_context().CustomText="";  
    else 
        e.get_context().CustomText=sender.get_text();  
} 

Finally the codebehind:

Protected Sub cboCities_ItemsRequested(ByVal sender As Object, ByVal e As RadComboBoxItemsRequestedEventArgs)  
 
        Dim sql As String = "Select cityCode,cityName,State,Lat,Long from s_CityMaster WHERE Cityname LIKE '%" + e.Context("CustomText").ToString() + "%' ORDER BY CityName" 
 
        Dim adapter As New SqlDataAdapter(sql, ConfigurationManager.AppSettings("BioDiasporaCS"))  
        Dim data As New DataTable()  
        adapter.Fill(data)  
 
        Try 
 
            Dim itemsPerRequest As Integer = 10  
            Dim itemOffset As Integer = e.NumberOfItems  
            Dim endOffset As Integer = itemOffset + itemsPerRequest  
            If endOffset > data.Rows.Count Then 
                endOffset = data.Rows.Count  
            End If 
 
            If endOffset = data.Rows.Count Then 
                e.EndOfItems = True 
            End If 
            Dim i As Integer = itemOffset  
            While i < endOffset  
                cboCities.Items.Add(New RadComboBoxItem(data.Rows(i)("cityName").ToString(), data.Rows(i)("cityName").ToString()))  
                i = i + 1  
            End While 
 
            If data.Rows.Count > 0 Then 
                e.Message = [String].Format("Items <b>1</b>-<b>{0}</b> out of <b>{1}</b>", endOffset.ToString(), data.Rows.Count.ToString())  
            Else 
                e.Message = "No matches" 
            End If 
        Catch 
            e.Message = "No matches" 
        End Try 
    End Sub 

Can anyone help me with what I'm doing wrong? Thanks in advance.
Simon
Telerik team
 answered on 31 Mar 2009
12 answers
625 views
hello to all,
 
                thanks again to sir shinu!
 
               i would like ask again a help to all expert of telerik control, coz i been configuring the grid to have a header column with linkbutton or hyperlink button, i already have a group header in my grid but my problem is i can't put a link to it..here's my codes

<telerik:RadGrid ID="RDGridResponse" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                        GridLines="None" Skin="WebBlue" ShowGroupPanel="True" Font-Bold="False" Font-Italic="False" Font-Names="Tahoma" Font-Overline="False" Font-Size="Small" Font-Strikeout="False" Font-Underline="False" >
                        <MasterTableView Font-Bold="False" Font-Italic="False" Font-Names="Tahoma" Font-Overline="False" Font-Size="X-Small" Font-Strikeout="False" Font-Underline="False">
                            <RowIndicatorColumn>
                                <HeaderStyle Width="20px" />
                            </RowIndicatorColumn>
                            <ExpandCollapseColumn>
                                <HeaderStyle Width="20px" />
                            </ExpandCollapseColumn>
                            <Columns>
                                <telerik:GridBoundColumn DataField="Response" GroupByExpression="Response"
                                    UniqueName="ResponseName">
                                    <ItemStyle Font-Bold="False" Font-Italic="False" Font-Names="Tahoma" Font-Overline="False"
                                        Font-Size="Small" Font-Strikeout="False" Font-Underline="False" Wrap="True" />
                                </telerik:GridBoundColumn>
                                
                            </Columns>
                            <GroupByExpressions>
                                 <telerik:GridGroupByExpression>
                                      <SelectFields>
                                          <telerik:GridGroupByField FieldName ="MemberName" FieldAlias="Name"/>
                                          <telerik:GridGroupByField FieldName ="ResponseDate" FieldAlias ="Date" FormatString="" HeaderText="" />
                                      </SelectFields>
                                      <GroupByFields>
                                         <telerik:GridGroupByField FieldName ="." FieldAlias= "." FormatString ="" HeaderText= "" />
                                         <telerik:GridGroupByField FieldName ="Response" FieldAlias="Response" />
                                      </GroupByFields>
                                 </telerik:GridGroupByExpression>
                            </GroupByExpressions>
                        </MasterTableView>
                        <ClientSettings AllowDragToGroup="True">
                            <Selecting AllowRowSelect="True" />
                        </ClientSettings>
                        <FilterMenu EnableTheming="True" Skin="Vista">
                            <CollapseAnimation Duration="200" Type="OutQuint" />
                        </FilterMenu>
                    </telerik:RadGrid>
           
in the groupbyfields tag to gridbroupbyfield fieldname "Response" i want it to be a hyperlink or linkbutton either of two how can i configure it or how i can do that..please help

sample/codes is highly appreciated

thanks to all   
                
Jols
Top achievements
Rank 2
 answered on 31 Mar 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?