Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
574 views

Hi,

I am trying to set the data source for grid from client side, Below is example of the code.

 

<telerik:RadGrid ID="Grid_geoData" runat="server" AutoGenerateColumns="false" Height="200px" > <MasterTableView DataKeyNames="Text" ClientDataKeyNames="Text" ShowHeadersWhenNoRecords="true" Visible="true"> <Columns> <telerik:GridBoundColumn DataField="Text" HeaderText="Comp. name" UniqueName="comName" /> </Columns> </MasterTableView> </telerik:RadGrid>

 


function pageLoad() {
            var data =
                [
                    { "ID": 1, "Text": "Text1" },
                    { "ID": 2, "Text": "Text2" }
                ];
            var mtv =  $find("<%= Grid_geoData.ClientID %>").get_masterTableView();
            mtv.set_dataSource(data);
            mtv.dataBind();
        }

I get error at line 

mtv.set_dataSource(data);

Do anyone have idea what I am doing wrong?

Regards,

Omar

 

Omar
Top achievements
Rank 3
Iron
Iron
Iron
 answered on 20 May 2021
1 answer
150 views

Hi ,

We have upgarded from Q32015.3.1111.35 to R3 2020.3.915.45.

I have seen many posts regarding discontinuity of Rad dll references and all dll are present in a single assembly.

so i have tried to migrate classic RadGrid to RadGrid of ajax Suite with the help of below article, to support Modern Browser.

https://www.telerik.com/support/kb/aspnet-ajax/grid/details/migration-from-radgrid-for-asp.net-(classic)-to-radgrid-for-asp.net-ajax

I am getting an Issue 

<telerik:RadGrid ID="CombineRadGrid" AutoGenerateColumns="false" EnableAJAX="true" GridLines="None" 
        Skin="SAM" UseEmbeddedScripts="false" Width="100%" runat="server">
    <ClientSettings AllowExpandCollapse="true" AllowGroupExpandCollapse="true" 
        ClientEvents-OnRequestEnd="CombineRadGridRequestEnd" ClientEvents-OnRequestStart="CombineRadGridRequestStart" />

</telerik:RadGrid>

Is there any property change with Telerik.WebControls.GridClientSettings and Telerik.Web.UI.GridClientSettings?

Can anyone please help on this to resolve and share me?

 

 

 

Rumen
Telerik team
 answered on 19 May 2021
1 answer
150 views

Hi,

I have a RadGrid that uses a DropDownList to give the user choices. I'm using the batch editing features. I don't know until run time what the contents of the dropdownlist will be. I am doing a preliminary population of the dropdownlist in the PreRender event. Essentially, this gives the user a list with too many choices. During runtime, the user will click the list to select an option.

At this point, the dropdownlist's population will be affected by the item in another row's cell. For example, if the cell in column A has a value of xxx, I need the drop down list to show X, Y, Z. If the cell in column A has a value of yyy, the drop down should show X,Y.

I've been looking at the ClientSide BatchEditing article and I believe I want to use the javascript OnBatchEditOpened function to adjust the dropdownlist. The API talks about using getCellValue(cell), and I think I can use that to get the value of the neighboring cell (the column A cell mentioned above). Something like this:

function OnBatchEditOpened(sender, args) {
        var AccessLevel = getCellValue(______)
    }

I'm not sure what the function argument should be to get the Column A data.

Also, is there documentation for the getCellValue function? I just haven't had any luck finding it.

 

Thanks,

Mike

Attila Antal
Telerik team
 answered on 19 May 2021
1 answer
260 views

I have a radcombobox with checkboxes enabled and i would like to be able to see the total number of items checked in the header even when i click the "check all" checkbox.  Currently if you check one or two items you see a comma separated list of the items checked, if i were to check 4 items  it says "4 items checked", but if i click the "Check All" checkbox in the header then the caption just reads "All items checked". it is desirable for us to customize that message to say how many items actually are checked,  either using the same syntax "X items checked" or using a hybrid syntax like "All X items checked"...  

Is there a way to accomplish this behavior?  

 

Thanks!

-Mark

Mark
Top achievements
Rank 1
Iron
Iron
 answered on 18 May 2021
1 answer
390 views

When inserting links, if you add a space after the element it will add a &nbsp instead of just white space.

For example, using the demo, if you type in "this is atest" and you insert a link by highlighting "a", and then add a space before test it will look like the following:

this <a href="http://www.google.com">is a</a>&nbsp;test

Is this expected behavior?

Rumen
Telerik team
 answered on 18 May 2021
1 answer
284 views

I am unable to call the OnClick event when selecting a CardAction.  Any help would be appreciated.

<telerik:CardActionsContainerComponent runat="server" CardActionsAlignment="Stretched" Orientation="Horizontal">
     <telerik:CardActionComponent runat="server" AutoPostBack="true">
          <telerik:RadButton ID="btnAgree" runat="server" AutoPostBack="true" RenderMode="Lightweight" 
                                        CssClass="k-button k-flat k-primary" Font-Size="14px" Text="I Agree" OnClick="btnAgree_Click" />
     </telerik:CardActionComponent>
</telerik:CardActionsContainerComponent>
Vessy
Telerik team
 answered on 17 May 2021
0 answers
129 views

How do I show a text e.g. "No appointments to display" if there is no appointment selected time period?

Uses Agenda view... 

Kjell
Top achievements
Rank 1
Iron
Iron
 updated question on 17 May 2021
1 answer
169 views

I have an Asp.net website , and telerik controls on it.  On page load I get ConvertFontToSpanfilter error as an alert. On clicking few times 'OK' on alert i am able to proceed normally.

I am not able to figure it out why it's happening . As i know we can disable the filter but is there any specific reason it's happening?

becasue it's random - right now i don't see on my pages

 

 

Devender
Top achievements
Rank 1
 updated question on 14 May 2021
1 answer
369 views

When a button in a RadListView is clicked, I want to change the text of the button on the client side.  I can find the listview and the index of the row, but can't set the button text of the clicked button.  The code below always changes the text of the button in the first record.

Also, is there an easier way to find the button without adding an attribute in radlistview1_ItemDataBound?

function updateBtn(sender, args) {
   var listview = $find('<%=radlistview1.ClientID%>');
   var myindex = sender._element.getAttribute("rowindex");
   var btn = $telerik.findControl(document.documentElement, "radbutton1");
   //How to select the button that was clicked?
   btn.set_text("Clicked"); //works for first row only
   }

<telerik:RadListView runat="server" ID="radlistview1" DataSourceID="SqlDataSource1" DataKeyNames="myRecordid">
   <ItemTemplate>
   
   <telerik:RadButton runat="server" ID="radbutton1" Text='button'
       ButtonType="StandardButton" RenderMode="Auto"
       OnClientClicked = "updateBtn"
       AutoPostBack="false" UseSubmitBehavior="false">
   </telerik:RadButton>

   </ItemTemplate>
</telerik:RadListView>

Private Sub radlistview1_ItemDataBound(sender As Object, e As RadListViewItemEventArgs) Handles radlistview1.ItemDataBound
   ' Add an attribute to the button that can be passed to JS 
   If TypeOf e.Item Is RadListViewDataItem Then
      Dim item As RadListViewDataItem = TryCast(e.Item, RadListViewDataItem)
      Dim btn As RadButton = TryCast(item.FindControl("radbutton1"), RadButton)
      btn.Attributes.Add("rowindex", item.DataItemIndex.ToString())
   End If
End Sub


Attila Antal
Telerik team
 updated answer on 14 May 2021
1 answer
268 views
I just updated to 2021.2.511.45 and the MetroTouch theme in my RadMenu is no longer showing. The menu has no formatting at all now. What's happened?
Peter Milchev
Telerik team
 answered on 14 May 2021
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
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
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?