Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
153 views
Hi,

Telerik Version: 2011, 3, 1115, 40
Browser Version: IE7 Standards

I have an odd issue with a pretty simple radgrid. In IE7 Standards mode, if a radgrid has cell text that exceeds the length of the cell, it hides the entire grid. If the columns are resized, it will render the grid like it should.

overflow:hidden on class="rgMasterTable rgClipCells rgClipCells" is the problem. I'm just not sure how to fix it.

Here's the grid:

<telerik:RadGrid ID="NotificationRadGrid" OnNeedDataSource="NotificationRadGrid_NeedDataSource" runat="server"
    GridLines="Horizontal">
    <ClientSettings>
        <ClientEvents OnRowSelected="ShowNotification" />                                         
    </ClientSettings>                                       
    <MasterTableView ShowHeader="true" AllowPaging="false" TableLayout="Fixed" ClientDataKeyNames="Notification_ID" ItemStyle-Wrap="False" HeaderStyle-Wrap="False">                                           
        <Columns>
            <telerik:GridBoundColumn  DataField="Notification_Number"
                HeaderStyle-VerticalAlign="Bottom" HeaderStyle-Width="10%"  HeaderStyle-HorizontalAlign="Center"
                HeaderText="Number" ItemStyle-VerticalAlign="Top"
                 SortExpression="Notification_Number" UniqueName="Notification_Number">                                                   
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn  DataField="Notification_Title"
                HeaderStyle-VerticalAlign="Bottom" HeaderStyle-Width="65%"
                HeaderText="Title" ItemStyle-VerticalAlign="Top"
                SortExpression="Notification_Title" UniqueName="Notification_Title">                                                      
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn  DataField="Notification_Priority"
                HeaderStyle-VerticalAlign="Bottom" HeaderStyle-Width="10%"  HeaderStyle-HorizontalAlign="Center"
                HeaderText="Priority" ItemStyle-VerticalAlign="Top"
                SortExpression="Notification_Priority" UniqueName="Notification_Priority">                                                            
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn  DataField="Notification_Published_Date"
                HeaderStyle-VerticalAlign="Bottom" HeaderStyle-Width="15%" HeaderStyle-HorizontalAlign="Center"
                HeaderText="Published" ItemStyle-VerticalAlign="Top"
                SortExpression="Notification_Published_Date" UniqueName="Notification_Published_Date" DataType="System.DateTime" DataFormatString="{0:MM/dd/yyyy}">      
            </telerik:GridBoundColumn>
        </Columns>                                           
        <CommandItemTemplate>
        </CommandItemTemplate>
    </MasterTableView>
</telerik:RadGrid>

Any help would be appreciated.

Smith
Jayesh Goyani
Top achievements
Rank 2
 answered on 12 Apr 2012
3 answers
105 views
I used radgrid with splitter when i resize to narrow panel,i found footer show strange

i also capture image before and after risze as well


thank you and regards
artit.s
Jayesh Goyani
Top achievements
Rank 2
 answered on 12 Apr 2012
2 answers
175 views

Hi

I have some issue with loading image in RadImageEditor. It is working fine in IE but not in any other browser (tested in FF and Chrome).  I have a RadListBox in page and in its selectedIndexchanged event it will add corresponding image to RadImageEditor. The problem is when I ajaxify the controls (tried with both RadAjaxManager and RadAjaxPanel), it is working only in IE. Otherwise it will work in all browsers. Please give some idea regarding this issue. (I am using Telerik dll version 2012, 1, 215, 35)

 

I am pasting my code for the reference.

 
ASPX:

<telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1">
                 <telerik:RadListBox ID="RadListBox1" runat="server" 
                    SelectionMode="Multiple" EnableDragAndDrop="true" AutoPostBack="true" OnSelectedIndexChanged="RadListBox1_SelectedIndexChanged">
                 </telerik:RadListBox>
          
            <telerik:RadImageEditor ID="RadImageEditor1" runat="server" Top="500px" Left="430px"
                   OnImageLoading="RadImageEditor1_ImageLoading">
            </telerik:RadImageEditor>
  </telerik:RadAjaxPanel>

Also tried this approach to ajaxify the controls:-
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" >
           <AjaxSettings>
               <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                   <UpdatedControls>
                       <telerik:AjaxUpdatedControl ControlID="RadListBox1" />
                       <telerik:AjaxUpdatedControl ControlID="RadImageEditor1" />
                   </UpdatedControls>
               </telerik:AjaxSetting>
               <telerik:AjaxSetting AjaxControlID="RadListBox1">
                   <UpdatedControls>
                             <telerik:AjaxUpdatedControl ControlID="RadImageEditor1" />
                   </UpdatedControls>
               </telerik:AjaxSetting>
           </AjaxSettings>
       </telerik:RadAjaxManager>

C#:
protected void RadImageEditor1_ImageLoading(object sender, ImageEditorLoadingEventArgs args)
    {
        args.Cancel = true;
    }
 
   protected void RadListBox1_SelectedIndexChanged(object sender, EventArgs e)
    {
       //retrieving corresponding image from database
 
        byte[] buffer = null;
        buffer = (byte[])SqlCommand.ExecuteScalar();
        MemoryStream memStream = new MemoryStream(buffer);
        MemoryStream memStream1 = new MemoryStream();
        System.Drawing.Bitmap.FromStream(memStream).Save(memStream1, System.Drawing.Imaging.ImageFormat.Png);
        RadImageEditor1.ImageUrl = "data:image/png;base64," + Convert.ToBase64String(memStream1.ToArray());
   }

Thanks,
Bavya.

Bavya
Top achievements
Rank 1
 answered on 12 Apr 2012
3 answers
118 views
Hello all.  I am looking to purchase Telerik for some work I am doing for a client.  In making my case for purchase, I came accross the tabstrip. I found the following demo which does something I need to implement:

http://demos.telerik.com/aspnet-ajax/tabstrip/examples/functionality/validationgroup/defaultcs.aspx

The question I have is that when it calls the validation group before switching to each tab does it/can it submit the form on the page or call a sub in the code behind.  Basically what the client wants is that the form in each tab should save when the user switches tabs.  If the form is missing required information, it wouldn't let them switch tabs until the current form/tab is properly filled out and submitted/saved.  Is that what this control would do?  It would save me a lot of work.  Thanks in advance for any help you can give.

John
Dimitar Terziev
Telerik team
 answered on 12 Apr 2012
4 answers
171 views
i have a radgrid which users the radfilter to filter the datasource, filter works fine but if the first page says 2 pages and i click to go to page 2 it reloads into it inital first load state with all the data. any ideas

here is my code

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ProductSearch.ascx.cs" Inherits="Controls_ProductSearch" %>
 
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" >
<AjaxSettings>
    <telerik:AjaxSetting AjaxControlID="RadGridProductsSearch">
        <UpdatedControls>                   
            <telerik:AjaxUpdatedControl ControlID="RadGridProductsSearch" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
        </UpdatedControls>
    </telerik:AjaxSetting>             
    <telerik:AjaxSetting AjaxControlID="BtnProductSearch">
        <UpdatedControls>                   
            <telerik:AjaxUpdatedControl ControlID="RadGridProductsSearch" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
        </UpdatedControls>
    </telerik:AjaxSetting>      
</AjaxSettings>   
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Transparency="20" BackColor="#ffffff" runat="server">
    <asp:Image ID="Image1" runat="server" AlternateText="Loading..." BorderWidth="0px" ImageUrl="~/Includes/images/ajax/Loading.gif" />
</telerik:RadAjaxLoadingPanel>
<fieldset>
<ol>
    <li>
        <asp:Label ID="LblCategory" runat="server" Text="Search by Category" AssociatedControlID="ComboCategoryName"></asp:Label>
        <telerik:RadComboBox ID="ComboCategoryName" runat="server" Width="240"></telerik:RadComboBox>
    </li>
    <li class="small">
    <span> or </span>
    </li>
    <li>
        <asp:Label ID="LblKeywords" runat="server" Text="by Keyword" AssociatedControlID="ComboKeyword"></asp:Label>
        <telerik:RadComboBox ID="ComboKeyword" runat="server" Width="240" Filter="Contains" MarkFirstMatch="true" ChangeTextOnKeyBoardNavigation="false"></telerik:RadComboBox>
    </li>
    <li class="submit">
        <telerik:RadButton ID="BtnProductSearch" OnClick="BtnProductSearch_Click" runat="server" Text="Submit"></telerik:RadButton>                
    </li>
</ol>   
<telerik:RadFilter ID="SearchRadFilter" runat="server" Visible="false" ShowApplyButton="true" ExpressionPreviewPosition="None" ShowLineImages="true" FilterContainerID="RadGridProductsSearch"></telerik:RadFilter>   
</fieldset
<telerik:RadGrid ID="RadGridProductsSearch" runat="server"  SkinID="products" AllowPaging="true" PagerStyle-AlwaysVisible="true" BorderWidth="0" OnNeedDataSource="ProductsSearch_NeedDataSource" OnItemDataBound="ProductsSearch_ItemDataBound" OnItemCreated="ProductsSearch_ItemCreated" AllowSorting="true" AllowFilteringByColumn="true">
<GroupingSettings CaseSensitive="false"/>
<MasterTableView AutoGenerateColumns="false"  IsFilterItemExpanded="False">
<PagerTemplate>
    <asp:Panel ID="PagerPanel" runat="server" CssClass="pager-holder">
        <div class="pager">
            <span class="pagerPrev">
                <asp:LinkButton ID="ButtonPrev" runat="server" OnClientClick="changePage('prev'); return false;" CommandName="Page" CommandArgument="Prev" Text="<" CssClass="PagerButton PrevPage" />                           
            </span>
            <asp:Panel runat="server" ID="NumericPagerPlaceHolder" CssClass="pagerNumber" />
            <span class="pagerNext">
                <asp:LinkButton ID="ButtonNext" runat="server" OnClientClick="changePage('next'); return false;" CommandName="Page" CommandArgument="Next" Text=">" CssClass="PagerButton NextPage" />
            </span>
        </div>
        <span class="pagerSize">
            <span>View</span>
            <telerik:RadComboBox ID="RadComboBox1" DataSource="<%# new object[]{10, 20, 30, 40, 50} %>" SelectedValue='<%# DataBinder.Eval(Container, "Paging.PageSize") %>' runat="server" Width="60" OnClientSelectedIndexChanged="RadComboBox1_SelectedIndexChanged"></telerik:RadComboBox>
        </span>
    </asp:Panel>
</PagerTemplate>
<PagerStyle Mode="NumericPages" PageButtonCount="10" />            
    <Columns>
        <telerik:GridTemplateColumn HeaderText="Product Name" DataField="Name" SortExpression="Name" UniqueName="Name">
            <ItemTemplate>
                <asp:HyperLink ID="ProductLink" runat="server" NavigateUrl='<%# Functions.GetUrl(DataBinder.Eval(Container, "DataItem.NodeAliasPath")) %>' Text='<%# Eval("Name") %>'></asp:HyperLink>                           
            </ItemTemplate>
        </telerik:GridTemplateColumn
        <telerik:GridTemplateColumn HeaderText="NodeParentID" Visible="false" UniqueName="NodeParentID" DataField="NodeParentID">
        <ItemTemplate>
            <asp:Label ID="NodeParentID" runat="server"></asp:Label>
        </ItemTemplate>
        </telerik:GridTemplateColumn>                   
        </Columns>                 
</MasterTableView>        
</telerik:RadGrid
 <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script type="text/javascript">
var tableView = null;
function pageLoad(sender, args) {
    tableView = $find("<%= RadGridProductsSearch.ClientID %>").get_masterTableView();
}
 
function RadComboBox1_SelectedIndexChanged(sender, args) {
    tableView.set_pageSize(sender.get_value());
}
 
function changePage(argument) {
    tableView.page(argument);
}
 
function RadNumericTextBox1_ValueChanged(sender, args) {
    tableView.page(sender.get_value());
}
</script>
</telerik:RadCodeBlock>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using CMS.CMSHelper;
using CMS.GlobalHelper;
using Telerik.Web.UI;
 
public partial class Controls_ProductSearch : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            LoadCategories();
            LoadProducts();
        }
    }
 
    void LoadCategories()
    {
        DataSet ds = TreeHelper.SelectNodes(CMSContext.CurrentAliasPath + "/%", false, "adam.productCategory", null, "Name Asc", -1, true);
 
        if (!DataHelper.DataSourceIsEmpty(ds))
        {
            ComboCategoryName.DataSource = ds;
            ComboCategoryName.DataTextField = "Name";
            ComboCategoryName.DataValueField = "NodeID";
            ComboCategoryName.DataBind();
 
            ComboCategoryName.Items.Insert(0, new RadComboBoxItem("Select Category"));
        }
    }
 
    void LoadProducts()
    {
        DataSet ds = TreeHelper.SelectNodes(CMSContext.CurrentAliasPath + "/%", false, "adam.product", null, "Name Asc", -1, true);
 
        if (!DataHelper.DataSourceIsEmpty(ds))
        {
            ComboKeyword.DataSource = ds;
            ComboKeyword.DataTextField = "Name";
            ComboKeyword.DataValueField = "Name";
            ComboKeyword.DataBind();
 
            ComboKeyword.Items.Insert(0, new RadComboBoxItem("Select Category"));
        }
    }
 
    protected void ProductsSearch_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
    {
        if (e.Item is GridDataItem)
        {
            DataRowView dr = (DataRowView)e.Item.DataItem;
 
            GridDataItem item = (GridDataItem)e.Item;
            Label nodeParentID = item.FindControl("NodeParentID") as Label;
 
            CMS.TreeEngine.TreeNode node = TreeHelper.SelectSingleNode((int)DataHelper.GetDataRowViewValue(dr, "NodeParentId"));
            if (node != null)
            {
                nodeParentID.Text = node.DocumentName;
            }
        }
    }
 
    protected void ProductsSearch_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
    {
        DataSet ds = TreeHelper.SelectNodes(CMSContext.CurrentAliasPath + "/%", false, "adam.product", null, "Name Asc", -1, true);
 
        if (!DataHelper.DataSourceIsEmpty(ds))
        {
 
            RadGridProductsSearch.DataSource = ds;
        }
        else
        {
            RadGridProductsSearch.Visible = false;
        }
    }
 
    protected void ProductsSearch_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
    {
        if (e.Item is GridPagerItem)
        {
            GridPagerItem gridPager = e.Item as GridPagerItem;
            Control numericPagerControl = gridPager.GetNumericPager();
            numericPagerControl.ID = "";
 
            Control placeHolder = gridPager.FindControl("NumericPagerPlaceHolder");
            placeHolder.Controls.Add(numericPagerControl);
        }
    }
 
    protected void BtnProductSearch_Click(object sender, EventArgs e)
    {
        SearchRadFilter.RootGroup.Expressions.Clear();
 
        if (ComboCategoryName.SelectedIndex != 0)
        {
            RadFilterGroupExpression category = new RadFilterGroupExpression();
            category.GroupOperation = RadFilterGroupOperation.And;
            RadFilterEqualToFilterExpression<int> expr = new RadFilterEqualToFilterExpression<int>("NodeParentID");
            expr.Value = Convert.ToInt32(ComboCategoryName.SelectedValue);
            SearchRadFilter.RootGroup.AddExpression(category);
            category.AddExpression(expr);
        }
 
        if (ComboKeyword.SelectedIndex != 0)
        {
            RadFilterGroupExpression product = new RadFilterGroupExpression();
            product.GroupOperation = RadFilterGroupOperation.And;
            RadFilterEqualToFilterExpression<string> expr2 = new RadFilterEqualToFilterExpression<string>("Name");
            expr2.Value = ComboKeyword.SelectedValue;
            SearchRadFilter.RootGroup.AddExpression(product);
            product.AddExpression(expr2);
        }
 
        SearchRadFilter.FireApplyCommand();
    }
}
Paul
Top achievements
Rank 1
 answered on 12 Apr 2012
5 answers
211 views
RadGrid Support,
I understand that RadGrid is 508 compliant.

However I noticed that some of the links on your website are not working.
http://www.telerik.com/help/aspnet-ajax/grdkeyfeatures.html (Search for 508 and click on the link)

Can you please point me to the proper links for 508 compliance  ?

Regards,
Kaushik
Martin
Telerik team
 answered on 12 Apr 2012
0 answers
48 views
I have a problem with custom filtering of Rad grid. If one column has a custom filter and if its been filtered,  this ignores all of the other columns' filters
Radhika
Top achievements
Rank 1
 asked on 12 Apr 2012
1 answer
128 views
My implementation prevents me from using the traditional OnFileUploaded event since there are several instances of this control and each needs to be tied to a ticketID that is contained in a hidden field. I was able to get a reference to the uploader object that is relevant to the button that fired the event like this:

$(".SubmitFiles").click(function () {
       var uplodrID = $(this).closest(".AddAttachment").find(".Uploader").attr("ID");
       var upldrObj = $find(uplodrID); //this is the telerik asyncupload control
   });

At least, I'm pretty sure it is because I can see all of the relevent settings and such inside of it during debug. Now, what I want to do is send this control into a webmethod in the page codebehind so that I can interate through all the files and send them to a database. I tried to do so like this:

PageMethods.ProcessUpload(upldrObj);

And of course I enabled pagemethods in the ScriptManager. What is happening is ...well nothing. The page doesn't throw and error, but its also  not showing that it is actually getting through to the webmethod. I set the webmethod to throw an exception if it ever got that far, but it never does. When I step through debug, the debug finishes before it ever gets to the webmethod:

[WebMethod()]
public static void ProcessUpload(RadAsyncUpload upld)
{
    throw new Exception("Stub");
}

Can anyone help? I'm sure I'm missing something minor
Genady Sergeev
Telerik team
 answered on 12 Apr 2012
9 answers
218 views

Delete confirmation with RadAjaxLoadingPanel is not working ???

<asp:Button ID="btnDel" runat="server" Text="delete" OnClick="OnDeleteNom" OnClientClick="javascript:return confirm('delete item?')" />

code behind

protected void OnDeleteNom(object sender, EventArgs e)
{
//??? 
never comes here
}
 
Thanks,
Mehmedov

Nurietin
Top achievements
Rank 1
 answered on 12 Apr 2012
0 answers
98 views
Dear team,

I have nearly tried everything to manage to fill a combobox with java script. I got a component where I retrieve 2 strings which I want to show in the combobox.
The problem is, that I always get a null value for cmbSource.

Any ideas?

// edit: I also tried it with a listbox. Same problem.

 

cmbSource = $get('< %= listBoxSource.ClientID %>');

always returns null...


 

<script type="text/javascript">
            $(document).ready(function () {
                var cmbSource = $find('<%= comboboxSource.ClientID %>');
                init(cmbSource); // function to fill in the values
            });
 </script>
 
// in a table, embedded in a asp Panel
 <telerik:RadComboBox ID="comboboxSource" runat="server" Width="35%" />
 
 
// in java script
 
function init(comboboxSource) {
        var comboItem = new Telerik.Web.UI.RadComboBoxItem();
        comboItem.set_text("test");
        comboboxSource.get_items().add(comboItem);
        comboboxSource.commitChanges();
}
Endof
Top achievements
Rank 1
 asked on 12 Apr 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?