Telerik Forums
UI for ASP.NET AJAX Forum
8 answers
231 views

Hi,

I have a Radgrid with 2 columns freeze and I have enabled the resize columns, Am dynamically populating the grid, The problem is When the columns are more By deafult horizontal scrollbar appears and freezing works fine,But when we have less columns then columns get fixed accordingly and horizontal scrollbar doesnot appear which is correct..However for that less columns when we resize columns horizontal scrollbar appears then freezing doesnot work.
Ultimately Freezing works fine when the horizonatl scrollbar appear by default but doesnot work when we resize columns and horizontal scrollbar appear.
So is there any workaround for this?

Viktor Tachev
Telerik team
 answered on 15 Sep 2016
5 answers
300 views
Hi,

I have a user control in which I am using a RadTabStrip & RadGrid. On tab click I have to update the grid. 

So to ajaxify I am using RadAjaxManager as below
<telerik:RadAjaxManager ID="radAjaxMgr" runat="server" EnableAJAX="true" EnablePageHeadUpdate="false" EnableViewState="false" >
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="radTabStripInd">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="radTabStripInd" />
                    <telerik:AjaxUpdatedControl ControlID="radGrid" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

When I click on the tab for first time the grid gets refreshed but after that none of the tab click event fire. But when I remove "radTabStripInd" from updated controls the grid refreshes for every tab selection but radTabStrip tab does not change to selected state.

Note: If i use a RadAjaxManager on a master page and RadAjaxManagerProxy on usercontrol everything works but I see the performance issue ( 6 -8 sec to refresh the grid).

Can you please let me know how to fix this issue?

Regards,
Kalyan


Viktor Tachev
Telerik team
 answered on 15 Sep 2016
11 answers
754 views
Hello,
I have added custom functionality to my RadGrid to persist grid column visibility when user toggles column visibility from "Columns" context menu.
So whenever user comes back to that page, same columns are displayed as last time.

I am applying persisted settings in Grid prerender event by calling following function:
        private void ApplyGridSettings()
        {
            var persistenceHelper = new PersistenceHelper();
            var settings = persistenceHelper.GetGridPersistenceSettings(this.ClientID);
            if (settings != null)
            {
                foreach (var columnSetting in settings.ColumnsSettings)
                {
                    var column = this.Columns.FindByUniqueNameSafe(columnSetting.Column);
                    if (column != null)
                    {
                        column.Display = columnSetting.Visible;
                    }
                }
            }
        }

Now I have added a header context menu "Reset Columns" to remove persisted settings and reset grid columns to default visibility.
I am calling following code on HeaderMenu click:

        private void HeaderContextMenu_ItemClick(object sender, RadMenuEventArgs e)
        {
            switch (e.Item.Text)
            {
                case "Reset Columns":
                    var persistenceHelper = new PersistenceHelper();
                    persistenceHelper.ResetGridColumns(this.ClientID);
                    this.MasterTableView.EnableColumnsViewState = false;
                    this.MasterTableView.Rebind();
                    break;

                default:
                    break;
            }
        }

I thought after rebinding the grid will reset grid columns, but it is not working.
Can anyone please suggest how to reset grid columns visibility?
Konstantin Dikov
Telerik team
 answered on 15 Sep 2016
14 answers
525 views
I have a standard RadListBox setup with 2 List Boxes.   The issue is need to limit the number of items that can be Transferred or Drag and Dropped into RadListBox2 to a maximum of 10 items.   RadListBox1 has a list of up to 100 items.  The issue is I need visitors to be able to pick up to 10, but no more than 10 items from List 1 and put them into List 2.

Is there any way to set maximum number of items on a RadListBox.   Or,  can you suggest javascript to check count and cancel the transfer or DragDrop if the count of the items in ListBox2 > 10 (along with an alert to let the user know what is wrong).

Thanks for any assistance.
Nencho
Telerik team
 answered on 15 Sep 2016
3 answers
508 views
Hai,

i got one problem in radsearcchbox when i select any item in search box OnSearch event will rise and some dropdowns will bind based on Radsearchbox item now i got one problem when i remove that item in Radsearchbox i want to remove all the items in dropdowns 
<cc1:RadSearchBox  runat="server" ID="cmbItemMaster" OnClientDataRequesting="OnClientSearch"
                                       OnSearch="cmbItemMaster_Search" Skin="WebBlue" Style="padding-right: 5px; padding-left: 5px; font-family: Calibri;"
                                               Width="85%" AutoPostBack="true" ZIndex="10000000" DropDownSettings-Width="200px" DropDownSettings-Height="200px">
                                           </cc1:RadSearchBox>
protected void cmbItemMaster_Search(object sender, SearchBoxEventArgs e)
        {
          
                ddlMaterialCode.Items.Clear();
                LoadMaterialCodes(e.Value);
               
            }


when i remove the selected item in radsearchbox the ddlMaterialCode will not show means the dropdown items of ddlMaterialCode is empty and after seleccting radsearchbox item then only it will bind how to do it sir
Peter Milchev
Telerik team
 answered on 15 Sep 2016
3 answers
131 views

Hi,

this Telerik support page claims that I can enable WAI-ARIA support by using the EnableAriaSupport property.

But I cannot find this property on my radPanelBar ASP.NET control (see attachment).

How can I enable WAI-ARIA support for all Telerik ASP.NET controls? (I particularly need it for the TreeView control, too.)

Peter Milchev
Telerik team
 answered on 15 Sep 2016
4 answers
170 views

Hi Telerik support

I want my radlistbox scoll to selected item as code bellow

I test this  code , it was working fire when i click the btnRefresh, pls tell me how to force the radlistbox scroll to selected item after searching finish on RadSearchBox RadIPSearch, after searching, the radlistbox will select the item found, but i want to scroll to it also

Thanks very much

 

<telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnableScriptCombine="false"></telerik:RadScriptManager>

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"></telerik:RadAjaxLoadingPanel>
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">

  <div>
                     <telerik:RadSearchBox ID="RadIPSearch" runat="server"
                            EmptyMessage="Search..." Width="135" OnSearch="RadIPSearch_Search">
                            <DropDownSettings Height="400" Width="200" />
                        </telerik:RadSearchBox>


                        <telerik:RadButton ID="btnRefresh" runat="server" Text="Refresh"
                            OnClientClicked="OnClientClicked"
                            ButtonType="SkinnedButton" AutoPostBack="false" OnClick="btnRefresh_Click">
                        </telerik:RadButton>
                    </div>

                    <div>
                        <telerik:RadListBox ID="lstIPAddress" runat="server"
                            Height="510px" Width="200px" AutoPostBack="True"
                            OnSelectedIndexChanged="lstIPAddress_SelectedIndexChanged">
                            <ButtonSettings TransferButtons="All" />
                        </telerik:RadListBox>
                    </div>

 <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

                <script type="text/javascript">
                    function OnClientClicked(sender, args) {
                        var listbox = $find("<%=lstIPAddress.ClientID %>");
                        listbox.get_selectedItem().scrollIntoView();
                    }
                </script>
            </telerik:RadCodeBlock>
    </telerik:RadAjaxPanel>
    </telerik:RadAjaxPanel>

 

 

 protected void RadIPSearch_Search(object sender, SearchBoxEventArgs e)
        {

            if (lstIPAddress.Items.Select(x => x.Text).ToList().Contains(e.Text))
            {
                lstIPAddress.SelectedIndex = lstIPAddress.Items.Where(x => x.Text == e.Text).FirstOrDefault().Index;

                // how to fire radlistbox to scroll to selected item here
            }
       
        }

 

 

Anton
Telerik team
 answered on 15 Sep 2016
1 answer
119 views
Hello !
I use a RadSearchBox like this : http://demos.telerik.com/aspnet-ajax/searchbox/examples/overview/defaultcs.aspx.
And I search to have my result in First or a "auto-scroll" to go to my result.
I tried with onFocus and this code :  var typeSearchBox = $find("<%= RadSearchBox1.ClientID %>");
                                                          typeSearchBox = typeSearchBox.get_inputElement();
                                                           typeSearchBox.focus();

But I don't arrive. Do you have a idea ?
Ivan Danchev
Telerik team
 answered on 15 Sep 2016
4 answers
164 views
I am trying to format my CSV export from a radGrid. It exports fine but it doesn't seem to pick up any of the styles. This what I am using: 

protected void imgBtnExportCSV_Click(object sender, EventArgs e)
  {
    foreach (GridDataItem item in grdLeadList.MasterTableView.Items) //loop through each grid item
      {
        if (item.Selected)
          {
            selectedItems.Add(item.ItemIndex);
          }
      }
 
foreach (GridDataItem item in grdLeadList.MasterTableView.Items)
  {
    // for particuler item
    item["CompanyName"].Font.Name = "Calibri";
    item["CompanyName"].Style["font-size"] = "8pt";
    item["CompanyName"].Style["background-color"] = "#FFF";
    item["CompanyName"].Style["vertical-align"] = "middle";
  }
  grdLeadList.ExportSettings.ExportOnlyData = true;
  grdLeadList.ExportSettings.OpenInNewWindow = true;
                grdLeadList.MasterTableView.Columns.FindByUniqueName("ClientSelectColumn").Visible = false;
            grdLeadList.MasterTableView.Columns.FindByUniqueName("EditCommandColumn1").Visible = false;
            grdLeadList.ExportSettings.FileName = "ColderLeads";
            grdLeadList.MasterTableView.ExportToCSV();
 
  }


Is it possible to format CSV export from radGrid?

Thanks!

Danniel
Top achievements
Rank 1
 answered on 14 Sep 2016
3 answers
275 views

hi all

im working on HIS system and i see its great idea to work with Scheduler to manage doctor's calendar with this perfect tool ,

our doctor calendar build on days in week and it repeated and we have to be able to disable calendar if doctor gone with holidays , there is a duration time for each appointment , its not important to view patients name or id on this calendar all requirement is to view  available time line in available days in week and vacant time  

look forward to hearing from you 

 

 

Peter Milchev
Telerik team
 answered on 14 Sep 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?