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

I have an autoCompleteBox fed with values from an XML file that I want to display all possible options when a user clicks into it (i.e. without them typing any letters in there)

<telerik:RadAutoCompleteBox RenderMode="Lightweight" ID="racbUserAccessList" runat="server"  Width="300"
   DropDownHeight="150" EmptyMessage="Select User Access" DataTextField="Text" DataSourceID="XmlDataSource1"
   AllowCustomEntry="False">
 </telerik:RadAutoCompleteBox>
 <asp:XmlDataSource runat="server" ID="XmlDataSource1" DataFile="accessList.xml"></asp:XmlDataSource>

 

How to do that?

Peter Milchev
Telerik team
 answered on 30 Apr 2019
3 answers
430 views
Hi,

I am having difficulty with the RadGrid control (inside a user control) not databinding items by the PreRender event. The documentation says the lifecycle is as follows:

First page load:
Page.Load
Grid_Instance.NeedDataSource
Foreach Item in Grid_Instance:
   ItemCreated
   ItemDataBound
Page.PreRender

I am binding to a ObjectDataSource control:

  <telerik:RadGrid ID="rgProgrammes" runat="server" AutoGenerateColumns="False"
  DataSourceID="ods_Programmes" GridLines="None" Skin="Office2007">
                <MasterTableView DataKeyNames="pim_ID, CombinedCode" DataSourceID="ods_Programmes">

(i also bind to a GridView to check if that works)
Then in code behind I do a simple check for if it has databound :

    protected void Page_PreRender(object sender, EventArgs e)
    {
        int test = rgProgrammes.Items.Count; //result = 0
        int test2 = GridView1.Rows.Count; //result = 3
    }

Have I misunderstood something about the lifecycle of the RadGrid? When I insert breakpoints in my code, the Page_PreRender
event gets called before the RadGrid_DataBound event. This is giving me difficulty using a RadGrid in a user control
.

Any help would be appreciated.
Tom




Eyup
Telerik team
 answered on 30 Apr 2019
3 answers
152 views
Hi,

How to localize the "Remove token" text of the AutocompleteBox?

Thanks,
Martin
Peter Milchev
Telerik team
 answered on 29 Apr 2019
16 answers
903 views
hello
I have a radgrid with edittemplate controls in which there is a radasyncupload. When I upload a file I want to disable the Update button. So I have this code:


<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
<script type="text/javascript">
alert("1");
var masterTable = $find('<%=rdgrd_Rassegna.ClientID%>').get_masterTableView();
alert("2");
 </script>
 </telerik:RadScriptBlock>

I can get no references to mastertableview, I see alert 1 but no alert 2.Where I am wrong?

Thanks
Eyup
Telerik team
 answered on 29 Apr 2019
4 answers
1.2K+ views

I am using a RadGrid and have some controls in columns. A DropDownList  is in ItemTemplate (see code below). For example, when the grid was first bind with a dataset, "HI" was selected. I changed the selection to "AZ" and click another control in another column to call the Javascript function "showCityList" (see code below). Then I use Google F12 to step into the function. I have two questions.

1. I can see the var cell that has all states in the dropdownlist and "HI" is selected. <option selected="selected" value="HI">HI</option>. I changed the selection to "AZ". Why the initial state was still be selected?

2. How do I get the selected state? Please provide the syntax. 

I CANNOT use OnSelectedIndexChanged and it is a long story to explain.  

<telerik:GridTemplateColumn HeaderText=" State" SortExpression="State_Code" UniqueName="State_Code">
  <ItemTemplate>
    <asp:DropDownList ID="cboState" Width="105px" CssClass="State_Code" runat="server" ></asp:DropDownList>
  </ItemTemplate>
</telerik:GridTemplateColumn>

 

function showCityList() {
                var row = Telerik.Web.UI.Grid.GetFirstParentByTagName(button, "tr");
                var rowIndex = row.id.split("__")[1];
                                
                debugger; 
                var MasterTable = $find("<%=gridSites.ClientID%>").get_masterTableView();
                var selectedRows = MasterTable.get_dataItems();
                if (selectedRows != null)
                {
                    var row = selectedRows[rowIndex];
                    var cell = MasterTable.getCellByColumnUniqueName(row, "State_Code")
               }
             return false;
}

 

Thanks.

Eyup
Telerik team
 answered on 29 Apr 2019
1 answer
123 views

I suspect this is a limitation in functionality - is the RadTreeView meant to persist changes to Nodes dynamically added on Demand in Server Side AJAX (out of the box)? I have tried with ViewStateMode="Enabled" and PersistLoadOnDemandNodes="true" to no avail.

It seems that client side changes made in JavaScript (between client side trackchanges() and commitchanges() calls) aren't recognized when the nodes are dynamically loaded with this server side event:

protected void RadTreeView1_NodeExpand(object sender, RadTreeNodeEventArgs e)

When the page is posted back with a Save button, and (for example) nodes are removed in javascript - the changes seem to disappear on the server side. I suspect it's because the ViewState in the posted back control and javascript client changes are out of sync. They exist in the client side javascript ._log property until the commitchanges() is called. Then the changes all disappear and don't exist in the server side ClientChanges property on postback. None of the the provided demonstration examples seem to show support for updates, just read only load on demand scenarios. 

 

Attila Antal
Telerik team
 answered on 26 Apr 2019
1 answer
497 views

Hi All

 

This is regarding Telerik Radgrid usage present in below link.

https://demos.telerik.com/aspnet-ajax/grid/examples/accessibility-and-internationalization/accessibility-compliance/defaultcs.aspx

The example claims that they are "WCAG 2.0 Compliant"

But, When i am trying to use Screen Reader (JAWS), and navigate to the table in above link,the JAWS is not reading the number of rows present in the grid correctly.

It is treating Header as separate table and details as separate table.

When you press 'T' with JAWS on, JAWS reads "Grid with 6 Columns and 1 Row"
and when you press 'T' again , JAWS reads "Grid with 6 Columns and 20 Rows".

Telerik team is claiming that they are "WCAG 2.0 and Section 508 compliant" in above example, but it is not reading the number of rows correctly which i feel is an issue?

Ideally it should treat both header and details as part of single table for screen reader to read it correctly. Is there any plan to fix this issue?

Attila Antal
Telerik team
 answered on 26 Apr 2019
3 answers
272 views
Hi,

How can I disable copy/paste option in radtextbox.

Regards,
Lubna.
Geoff
Top achievements
Rank 1
 answered on 26 Apr 2019
1 answer
82 views

This is really weird - I am using html chart in an asp .net site and as of last week clients with 9.x and 10.x versions of IOS on ipad (and possibly iphone) are no longer having charts rendered on a page, everyone else is acting normally. I thought it may have come from an update where i added a radupdatepanel but have removed that and have the same problem.

I can replicate it on my old  ipad but cannot debug it because of the version.

The charts are straight forward:

<telerik:RadHtmlChart runat="server" ID="chtTimeGraph"   class="chartwrapper"  RenderAs="Canvas" Transitions="False"  EnableViewState="False">
         <ClientEvents OnLoad="chartLoad"  />

Have tried with viewstate enabled, without the OnLoad, different renderAs but all to no avail.

is anyone else having this problem?

Mary
Top achievements
Rank 1
 answered on 25 Apr 2019
5 answers
345 views
Hi Team,

I am getting this error (No property or field 'FileParentID' exists in type 'DataRowView') as i set the Filter Expressions in my .aspx page like this FilterExpression="FileParentID=''".  My datasource is of the form Dataset. I have tried setting it in my code (.cs) also, but of no success. I want to filter the RadGrid when first time it loads.
Please suggest on this.


Thanks,
Amrita
Steve
Top achievements
Rank 1
 answered on 25 Apr 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?