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

hi

how do i change the background color all white? As you can see from the attachment there are some white and gray. Thanks a lot 

Bozhidar
Telerik team
 answered on 17 Oct 2016
1 answer
156 views

The group panel for drag and drop grouping at the top of the grid contains nested tables.  See sample markup below.  Those tables contain empty TH elements which are not displayed (display=none), but still generate errors by our WAI accessibility checker tool.  Is there a property I can set that will set the text for those TH elements?  I've set the 3 offending TH elements in bold below.

 

Thanks,

 

Ray

 

 

<div id="ctl00_MasterHolder_rgdUsrReport_GroupPanel" style="width:100%;">
<table id="ctl00_MasterHolder_rgdUsrReport_GroupPanel_TB" class="rgGroupPanel" summary="The table which holds all grouping nested tables and is used as a wrapper." style="width:100%;border-spacing:0;border-collapse:separate;" role="presentation">
<caption>
MainTable
</caption><thead>
<tr style="display:none;">
<th scope="col"></th>
</tr>
</thead><tbody>
<tr>
<td><table summary="The nested grouping table which holds the group items table holding all grouped column items." style="width:100%;border-spacing:0;">
<caption>
Nested Grouping Table
</caption><thead>
<tr style="display:none;">
<th scope="col"></th>
</tr>
</thead><tbody>
<tr>
<td><table cellpadding="2" summary="The table holding all group items which are positioned in the group panel." style="border-style:None;width:100%;border-spacing:0;">
<caption>
Group Items Table
</caption><thead>
<tr style="display:none;">
<th scope="col"></th>
</tr>
</thead><tbody>
<tr>
<th scope="col" title="Drag out of the bar to ungroup" class="rgGroupItem" style="white-space: nowrap; cursor: move;">Data Collection Name&nbsp;<input type="button" name="ctl00$MasterHolder$rgdUsrReport$GroupPanel$ctl03" value=" " onclick="javascript:__doPostBack('ctl00$MasterHolder$rgdUsrReport$GroupPanel$ctl03','')" title="Sorted asc" class="rgSortAsc">&nbsp;<input type="button" name="ctl00$MasterHolder$rgdUsrReport$GroupPanel$ctl04" value=" " onclick="$find('ctl00_MasterHolder_rgdUsrReport').get_masterTableView()._ungroupByExpression('0:0'); return false;__doPostBack('ctl00$MasterHolder$rgdUsrReport$GroupPanel$ctl04','')" title="Click here to ungroup" class="rgUngroup"></th><td>-</td><th scope="col" title="Drag out of the bar to ungroup" class="rgGroupItem" style="white-space: nowrap; cursor: move;">Institution Name&nbsp;<input type="button" name="ctl00$MasterHolder$rgdUsrReport$GroupPanel$ctl06" value=" " onclick="javascript:__doPostBack('ctl00$MasterHolder$rgdUsrReport$GroupPanel$ctl06','')" title="Sorted asc" class="rgSortAsc">&nbsp;<input type="button" name="ctl00$MasterHolder$rgdUsrReport$GroupPanel$ctl07" value=" " onclick="$find('ctl00_MasterHolder_rgdUsrReport').get_masterTableView()._ungroupByExpression('0:1'); return false;__doPostBack('ctl00$MasterHolder$rgdUsrReport$GroupPanel$ctl07','')" title="Click here to ungroup" class="rgUngroup"></th><td style="width:100%;"></td>
</tr>
</tbody>
</table></td>
</tr>
</tbody>
</table></td>
</tr>
</tbody>
</table>
</div>

Pavlina
Telerik team
 answered on 14 Oct 2016
5 answers
261 views

Hi,

I can assign css style for Radgrid Frozen div using Radgrid name

div.RadGrid #rgGrid_Frozen
      {
           overflow-y: auto !important;
           overflow-x: auto !important;
      }

But i want to use this one globally like without Radgid ID.

This code is not working

div.RadGrid div#_Frozen
      {
           overflow-y: auto !important;
           overflow-x: auto !important;
      }

 

Please let me know 

 

Thanks,

 

Kostadin
Telerik team
 answered on 14 Oct 2016
12 answers
900 views
Hi,

Telerik controls version: 2014.2.724.45

I have a RadGrid with EditMode="Batch". This RadGrid has a GridTemplateColumn with a RadComboBox in EditItemTemplate. If a description with a special character (<, >, ...) appears in RadComboBox, OldValues in BatchEditCommand has an incorrect value.

Modify Comment field and click Save button. In NewValues["ID_SLOT"] you can see value 4,5 (incorrect).

Another issue OldValues["ID_SLOT"] is not present.

<telerik:RadCodeBlock ID="mainRadCodeBlock" runat="server">
            <script type="text/javascript">
                function saveChanges() {
                    var grid = $find("<%=GridExample.ClientID %>");
                grid.get_batchEditingManager().saveChanges(grid.get_masterTableView());
            }
 
            </script>
        </telerik:RadCodeBlock>
 
        <asp:Button ID="btnSave" runat="server" Text="Save" ToolTip="Save changes to database" OnClientClick="saveChanges();return false;" />
 
        <telerik:RadGrid ID="GridExample" runat="server" AutoGenerateColumns="false"
            Skin="Simple"
            AllowPaging="False"
            AllowSorting="false"
            AllowFilteringByColumn="true"
            OnBatchEditCommand="GridExample_BatchEditCommand"
            OnNeedDataSource="GridExample_NeedDataSource">
            <GroupingSettings CaseSensitive="false" />
            <ClientSettings>
                <Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" />
                <Selecting AllowRowSelect="true" />
            </ClientSettings>
            <MasterTableView HeaderStyle-HorizontalAlign="Center" Width="100%" AutoGenerateColumns="false"
                DataKeyNames="ID_COUNTRY"
                EditMode="Batch">
                <BatchEditingSettings EditType="Cell" OpenEditingEvent="MouseOver" />
                <Columns>
                    <telerik:GridBoundColumn DataField="COMMENTS" HeaderText="Comments" HeaderTooltip="Comments" HeaderStyle-Width="100px" ItemStyle-Width="100px" AutoPostBackOnFilter="true" ShowFilterIcon="false" FilterControlWidth="100%"></telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn AutoPostBackOnFilter="true" ShowFilterIcon="false" FilterControlWidth="100%" UniqueName="SLOT" HeaderText="Slot" DataType="System.Int32" DataField="ID_SLOT" SortExpression="SLOT" ColumnGroupName="Devices" HeaderStyle-Width="150px" ItemStyle-Width="150px">
                        <ItemTemplate>
                            <%# Eval("SLOT") %>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <telerik:RadComboBox ID="ddlSLOT" runat="server"
                                EnableLoadOnDemand="true"
                                Filter="Contains"
                                AllowCustomText="false"
                                DataTextField="SLOT"
                                DataValueField="ID_SLOT"
                                OnItemsRequested="ddlSLOT_ItemsRequested"
                                Style="width: 135px;" class="caronte-portfolio-ddl-slot">
                            </telerik:RadComboBox>
                        </EditItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>


protected void GridExample_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
    {
        DataTable table = new DataTable();
        table.Columns.Add("ID_COUNTRY", typeof(int));
        table.Columns.Add("COMMENT", typeof(string));
        table.Columns.Add("ID_SLOT", typeof(int));
        table.Columns.Add("SLOT", typeof(string));
 
        DataRow row = null;
        for (int i = 0; i < 5; i++)
        {
            row = table.NewRow();
            row["ID_COUNTRY"] = i;
            row["ID_SLOT"] = 1;
            row["SLOT"] = "Flagship < 4,5\" SP";
 
            table.Rows.Add(row);
        }
 
        (sender as RadGrid).DataSource = table;
    }
 
    protected void ddlSLOT_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
    {
        DataTable table = new DataTable();
        table.Columns.Add("ID_SLOT", typeof(int));
        table.Columns.Add("SLOT", typeof(string));
 
        DataRow row = table.NewRow();
        row["ID_SLOT"] = 1;
        row["SLOT"] = "Flagship < 4,5\" SP";
 
        table.Rows.Add(row);
 
        RadComboBox ddlSlot = sender as RadComboBox;
        ddlSlot.DataSource = table;
        ddlSlot.DataBind();
    }
    protected void GridExample_BatchEditCommand(object sender, GridBatchEditingEventArgs e)
    {
        foreach (GridBatchEditingCommand command in e.Commands)
        {
             
        }
    }


Thanks in advance.

Alfonso
Vasil
Telerik team
 answered on 14 Oct 2016
4 answers
323 views

I am trying to use the RadProgressArea to show a progress bar for processing 100,000+ records. 

It worked fine in my sample application but when deploying it failed to show.  I narrowed down the problem to tasks that occur prior to this progress bar loop that take upwards of 12 seconds.  Then after some testing I found that if I manually add a .Sleep() to the thread for anything more than 5 seconds (to simulate the delay) it would cause the RadProgressArea to not show at all.  Basically if I take the Telerik example and simply add a 6s delay in front of it then it never works.

Am I missing something obvious here?  Thank you in advance for my sanity.

System.Threading.Thread.Sleep(5000) ' ANYTHING 5s OR HIGHER MAKES PROGRESS BAR NEVER SHOW
 
' initialize variables
Dim progress As RadProgressContext = RadProgressContext.Current
 
' loop through records
For i As Integer = 0 To TotalRecords - 1
    ' update progress bar
    UpdateProgressBar(progress, dtStarted, TotalRecords, i)
 
    ' SOME WORK STUFF GOES HERE
Next

Peter Milchev
Telerik team
 answered on 14 Oct 2016
6 answers
3.9K+ views
I am using RadCombox inside RadGrid, When I tried to select some value from the box it's throwing error, please can you suggest something
Selection out of range
Parameter name: value
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
 
Exception Details: System.ArgumentOutOfRangeException: Selection out of range
Parameter name: value
 
Source Error:
 
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 
 
Stack Trace:
 
 
[ArgumentOutOfRangeException: Selection out of range
Parameter name: value]
   Telerik.Web.UI.RadComboBox.PerformDataBinding(IEnumerable dataSource) +259
   Telerik.Web.UI.RadComboBox.OnDataSourceViewSelectCallback(IEnumerable data) +10
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +31
   Telerik.Web.UI.RadComboBox.OnDataBinding(EventArgs e) +83
   Telerik.Web.UI.RadComboBox.PerformSelect() +21
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
   System.Web.UI.Control.DataBindChildren() +211
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +102
   System.Web.UI.Control.DataBind() +15
   System.Web.UI.Control.DataBindChildren() +211
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +102
   System.Web.UI.Control.DataBind() +15
   Telerik.Web.UI.GridItem.SetupItem(Boolean dataBind, Object dataItem, GridColumn[] columns, ControlCollection rows) +515
   Telerik.Web.UI.GridTableView.CreateFilteringItem(Boolean useDataSource, GridColumn[] copiedColumnSet, GridTHead thead) +100
   Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource) +496
   Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +499
   System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +57
   System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +114
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +31
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +142
   Telerik.Web.UI.GridTableView.PerformSelect() +4
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
   Telerik.Web.UI.GridTableView.DataBind() +239
   Telerik.Web.UI.GridTableView.Rebind() +48
   Telerik.Web.UI.GridFilterCommandEventArgs.ExecuteCommand(Object source) +515
   Telerik.Web.UI.RadGrid.OnBubbleEvent(Object source, EventArgs e) +134
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e) +38
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e) +115
   Telerik.Web.UI.GridItem.FireCommandEvent(String commandName, Object commandArgument) +46
   Telerik.Web.UI.RadGrid.RaisePostBackEvent(String eventArgument) +5990
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
 
  
 
 
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3615; ASP.NET Version:2.0.50727.3618




below is the code
<telerik:GridBoundColumn UniqueName="Name" DataField="Name" HeaderText="Name" HeaderStyle-Width="160px">
                        <FilterTemplate>
                            <telerik:RadComboBox ID="RadComboBoxTitle" DataType="System.Int32" UniqueName="Name"
                                Height="200px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("Name").CurrentFilterValue %>'
                                runat="server" OnClientSelectedIndexChanged="TitleIndexChanged">
                                <Items>
                                    <telerik:RadComboBoxItem Text="All" />
                                </Items>
                                 
                            </telerik:RadComboBox>
                            <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
 
                                <script type="text/javascript">
                                    function TitleIndexChanged(sender, args) {debugger;
                                        var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                        tableView.filter("Name", args.get_item().get_value(), "EqualTo");
                                    }
                                </script>
                            </telerik:RadScriptBlock>
                        </FilterTemplate>
                    </telerik:GridBoundColumn>

  protected void Page_Load(object sender, EventArgs e)
        {
            
        }
 
 
protected void VariableGrd_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridFilteringItem)
            {
                //RadComboBox combolist = (e.Item as GridEditableItem).FindControl("RadComboBoxTitle") as RadComboBox;
                //combolist.DataSource = variableCollection["Name"];
                //combolist.DataBind();
 
 
                GridFilteringItem filterItem = (GridFilteringItem)e.Item;
                RadComboBox combo = (RadComboBox)filterItem.FindControl("RadComboBoxTitle");
 
 
                var test = variableCollection.Select(var => new { Name = var.VariableAliasName, Value = var.VariableAliasName }).Distinct().ToList();
                combo.DataSource = test;
               // combo.DataSource = perso;
                 
                combo.DataTextField = "Name";
                combo.DataValueField = "Value";
                combo.ClearSelection();
                combo.DataBind();
            }

Please suggest where I am wrong.

Veselin Tsvetanov
Telerik team
 answered on 14 Oct 2016
1 answer
459 views

I feel this is more a feature request than a support question:

When I'm having an accessibility tool like JAWS read the numerical pager (see screenshot attached),
it reads: "1 : Link", "2 : Link" etc. (and "Dot dot dot : Link" for any GridLinkButton with that text.)

I want it to read a custom message, like "Go to page {0}", either in the corresponding GridLinkButton's title or aria-label attribute. The custom text should preferably be retrieved from GlobalResources.

And I want to be able to provide a separate custom text for the [...] GridLinkButtons, too.

How can I do that without walking the RadGrid pager's Controls tree manually?

Daniel
Telerik team
 answered on 14 Oct 2016
5 answers
283 views

I would like an example of how I can load tasks manually into a Gantt.... not a data binding but something similar to:

 

RadGantt.Task.Add(new Task());

then... RadGantt.DataBind() or something to get it to update from code behind in C#

 

Thanks

 

Tim

Bozhidar
Telerik team
 answered on 14 Oct 2016
3 answers
126 views
Good day to all 

I have the following code: 

telerik:RadSearchBox ID="RadSearchBox1" runat="server" Width="250px" Skin="MetroTouch" DataSourceID="OpenAccessLinqDataSource1" CssClass="" DataTextField="user_firmaname"
    DataValueField="user_id" Culture="de-DE" onsearch="RadSearchBox1_Search" ShowSearchButton="False">
 <DropDownSettings Height="400" Width="670" >
    <HeaderTemplate>
                    <ul>
                        <li class="col1">Firma</li>
                        <li class="col2">Ort</li>
                       
                    </ul>
                </HeaderTemplate>
                <ItemTemplate>
                    <ul>
                        <li class="col1">
                            <%# DataBinder.Eval(Container.DataItem, "user_firmaname") %></li>
                        <li class="col2">
                            <%# DataBinder.Eval(Container.DataItem, "user_ort") %></li>
                     
                    </ul>
                </ItemTemplate>
                  </DropDownSettings>
</telerik:RadSearchBox>


protected void RadSearchBox1_Search(object sender, SearchBoxEventArgs e)
        {
            if (e.Text  != null)
            {
                string firmenname = e.Text;
                firmenname = firmenname.Replace("+", "und");
                Response.Redirect("/firmen/" + e.Value + "/" + firmenname);
            }
            else
            {
                RadSearchBox1.EmptyMessage = "keine Firma gefunden";
            }
        }

The problem is that if the client does not pick from the dropdown but simply hits enter e.value of course is not what I am looking for.

So I need a way to disable enter and have the client force to pick from dropdown.

You can try it here: http://zuol.ch.mserver4.arvixevps.com/firmen/ left side 

Markus


Plamen
Telerik team
 answered on 14 Oct 2016
1 answer
279 views

Hi

How to get checkbox input in multiple auto generated columns ? picture attached for understanding.

Few points there

- number of columns of grid are dynamic depending upon dates filter selection of user. (start date, end date). so i use auto generate columns option to  implement it. is there any better approach for this? 

- can i  make clientcheckboxcolumn autogenerated ? i have gone through many articles in the forum related to clientcheckboxcolumn selection. 

- is there any better solution for implementation of this task ? 

Regards,

Zain

Eyup
Telerik team
 answered on 14 Oct 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?