Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
91 views
Hi All

I'm working on RadGrid with bounding TextBox for each rows of column.

I need to get the client id for Textbox, but i'm not getting the 'ClientIDRowSuffix' property to set the ID to Textbox.

Can you tell me why telerik Radgrid not supporting the 'ClientIDRowSuffix' property.
 
Please help me on this

Thanks


Nitin
Richard
Top achievements
Rank 1
 answered on 30 Apr 2012
0 answers
89 views
Hello,

I am using Rad Ajax panel in my page. I have a grid and that grid is having expand all link that expand and collapse all the rows.

Before using Rad Ajax panel, it is working fine. After using this panel, That expand all link is not working.

Any Suggestions.

TIA
Atchut
Top achievements
Rank 1
 asked on 30 Apr 2012
1 answer
74 views
Hi, I am getting javascript error when I clicked on Export to Excel button of RadGrid. Please see the attached file.

Thanks
Praveen Tomar
Pavlina
Telerik team
 answered on 30 Apr 2012
1 answer
83 views
How to remove Add button in radupload when  MaxFileInputsCount is reached?
Princy
Top achievements
Rank 2
 answered on 30 Apr 2012
1 answer
87 views
Hi all,


    I am new to telerik, i have been searching for a way to add signs for numebers in the RadNumericTextbox for many days and couldn't find any. I have a RadnumericTextBoxe were user should give numbers with there sign (positive/negative).like: -45/+67...

                            Please help me with a solution as soon as possible. Its too ugent...Thannks in advance..

-ST-
Princy
Top achievements
Rank 2
 answered on 30 Apr 2012
1 answer
340 views
I am building a Nested Detail grid programmatically in code behind only.
Sometimes the parent rows will have nested child data and sometimes they wont.

It appears that by default the details GridTableView is binding to the entire dataset of the MasterTable view (several hundred records).
I am using the "GridDetailTableDataBindEventHandler" for the detail grid and "GridNeedDataSourceEventHandler" for the MasterTable View.

Can anyone explain this to me?  Is it by design that the Nested Grid (I can see the datasource "count" as I step through the code - so I know what its doing) but it doesn't make any sense.

I did find something that (perhaps) states that this is by design - but its very convoluted and confusing:
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/hierarchy/defaultcs.aspx 
"When RadGrid constructs each copy of the detail tables, it assigns its data-source of the grid itself. This is useful when the data source is a DataSet containing all the detail table data. Using the DetailTableDataBind() method, you can obtain the instance of the DataSet from the DataSource property of the detail table that is an argument of the event handler (referred to as e.DetailTable). Prior to rebinding MasterTableView or any detail tables, RadGrid fires NeedDataSource event, so the developer can assign a DataSource. Note that it will be fired only once for a group of detail tables and only if the DataSource of RadGrid is not already assigned."

My approach has been to pass 'dummy' values of zero to the datasource if there shouldn't be any nested data - very clunky and not what I was looking for...

my code behind (pertinent stuff only) is below:

// build the grids MasterTableView in OnInit (this sits in a SharePoint 2010 webpart)
                _radGridViewSearch = new Telerik.Web.UI.RadGrid();
                // advanced data filtering
                _radGridViewSearch.NeedDataSource += new GridNeedDataSourceEventHandler(radGridViewSearch_NeedDataSource);               
                _radGridViewSearch.Skin = "Sunset";
                _radGridViewSearch.AutoGenerateColumns = false;
                _radGridViewSearch.AllowPaging = true;
                _radGridViewSearch.AllowSorting = true;
                _radGridViewSearch.PagerStyle.Mode = GridPagerMode.Slider;
                _radGridViewSearch.PageSize = 25;
                _radGridViewSearch.AllowFilteringByColumn = true;
                // per telerik: Depending on the data source, the filtering may be case-sensitive or case-insensitive. You can control this behavior using the GroupingSettings-CaseSensitive property
                _radGridViewSearch.GroupingSettings.CaseSensitive = false;               
                // per telerik: In some .NET 3.5 scenarios you should also turn off the Linq expressions - EnableLinqExpressions="false"
                _radGridViewSearch.EnableLinqExpressions = false;
                _radGridViewSearch.MasterTableView.TableLayout = GridTableLayout.Auto;
 
// build the detail tableview - if the report needs one               
                if (_genReport.HasDetailsView)
                {
                     
                    // use 'ServerBind' so that the DetailTableDataBind event fires immediately after the corresponding parent item is bound                   
                    // Assign the DetailTableDataBind event handler to the grids nested matters              
                    _radGridViewSearch.DetailTableDataBind += new GridDetailTableDataBindEventHandler(_radGridViewSearch_DetailTableDataBind);
                    _radGridViewSearch.MasterTableView.HierarchyLoadMode = GridChildLoadMode.ServerBind;                   
                    _detailsView = new GridTableView();
                    _detailsView.HierarchyLoadMode = GridChildLoadMode.ServerBind;
                    _detailsView.AllowPaging = false;
                    _detailsView.AllowSorting = false;
                    _detailsView.AllowFilteringByColumn = false;
                    _detailsView.Width = Unit.Percentage(95);                   
                    _detailsView.HorizontalAlign = System.Web.UI.WebControls.HorizontalAlign.Right;                   
                    _radGridViewSearch.MasterTableView.DetailTables.Add(_detailsView);                   
                     
                }
void _radGridViewSearch_DetailTableDataBind(object sender, GridDetailTableDataBindEventArgs e)
        {
            try
            {
                // grab the 'parent item'
                GridDataItem targetParentItem = (GridDataItem)e.DetailTableView.ParentItem;
                int targetParentMatterID = 0;
                string targetChildMatter = "0";
                _lionRepository = new LionBCSRepository();
                // first, prep the parent matter ID and make sure we have something that we can work with
                if (!string.IsNullOrEmpty(Convert.ToString(targetParentItem["MatterID"].Text))
                    && (int.TryParse(targetParentItem["MatterID"].Text, out targetParentMatterID)))
                {
                    // next, prep the related matter ID and make sure we have something that we can work with                   
                    if (!string.IsNullOrEmpty(Convert.ToString(targetParentItem["RelatedMatter"].Text))
                        && !string.Equals(" ", Convert.ToString(targetParentItem["RelatedMatter"].Text), StringComparison.OrdinalIgnoreCase))
                    {
                        // once we're here we know that we have something to work with for both the parent and child matters                       
                        targetChildMatter = targetParentItem["RelatedMatter"].Text;
                        // setup the datasource                        
                        e.DetailTableView.DataSource = _lionRepository.GetRelatedMatters(targetChildMatter, targetParentMatterID);
                    }
                    else
                    {
                        e.DetailTableView.DataSource = _lionRepository.GetRelatedMatters(targetChildMatter, targetParentMatterID);
                    }
                }
                else
                {
                    e.DetailTableView.DataSource = _lionRepository.GetRelatedMatters(targetChildMatter, targetParentMatterID);
                }
            }
            catch (Exception ex)
            {
                LionExceptionLogging.LogException("WebParts", string.Format("LION SS exception at _radGridViewSearch_DetailTableDataBind: {0} Details: {1}", ex.Message, ex.InnerException));
                this._LitError.Visible = true;
                this._LitError.Text += ex.Message;
            }
        }
Vasil
Telerik team
 answered on 30 Apr 2012
5 answers
87 views
Hello,
I have a problem with numeric textbox in Insert and Edit Mode.

<telerik:GridTemplateColumn DataField="ResWidth" DataType="System.Int32"
    FilterControlAltText="Filter ResWidth column" HeaderText="Width"
    UniqueName="ResWidth">
    <EditItemTemplate>
        <telerik:RadNumericTextBox ID="ResWidthRadNumericTextBox" runat="server"
            MaxValue="100000" MinValue="0" Type="Number" Value="0" Width="30px">
            <NumberFormat DecimalDigits="0" ZeroPattern="n" />
        </telerik:RadNumericTextBox>
    </EditItemTemplate>
    <ItemTemplate>
        <asp:Label ID="ResWidthLabel" runat="server" Text='<%# Eval("ResWidth") %>'></asp:Label>
    </ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn DataField="ResHeight" DataType="System.Int32"
    FilterControlAltText="Filter ResHeight column" HeaderText="Height"
    UniqueName="ResHeight">
    <EditItemTemplate>
        <telerik:RadNumericTextBox ID="ResHeightRadNumericTextBox" runat="server"
            MaxValue="100000" MinValue="0" Type="Number" Value="0" Width="30px">
            <NumberFormat DecimalDigits="0" ZeroPattern="n" />
        </telerik:RadNumericTextBox>
    </EditItemTemplate>
    <ItemTemplate>
        <asp:Label ID="ResHeightLabel" runat="server" Text='<%# Eval("ResHeight") %>'></asp:Label>
    </ItemTemplate>
</telerik:GridTemplateColumn>


I get following errors in IE9:
Microsoft JScript runtime error: Invalid argument.
this._displayElement.style.borderRightWidth=parseInt($telerik.getComputedStyle(this._displayElement,"border-right-width",""))+parseInt($telerik.getComputedStyle(this._textBoxElement,"border-right-width",""))+"px";

Best regards

Reiner




Vasil
Telerik team
 answered on 30 Apr 2012
2 answers
73 views
Hi all,

How can i add an image in the treeview instead of the '+' for expand... My project is for school students , i want the treeview expand when user click on the image. Please help me ASAP...
 
Thanks in advance,
Ammu
Amrutha
Top achievements
Rank 1
 answered on 30 Apr 2012
1 answer
218 views
Hello,
     I have a combo-box which populates data using ajax. However i dont want all the data to be displayed. How can I hide an item from the list while populating.
Also I want to display the drop down on mouse-over of the combo-box.
Can anyone help me out :(
Thanks
Princy
Top achievements
Rank 2
 answered on 30 Apr 2012
1 answer
76 views
Hi all,

Is there a way to assign different CSS to each column of the filter row?
please provide some suggestions.
Thanks in advance.
Princy
Top achievements
Rank 2
 answered on 30 Apr 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?