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

Hi, I have a RadListBox that is being populated on Page_Load through a DataTable that comes from the DB. Problem is: when I try to iterate the ItemCollection (via the Items Property) the List has Count=1 (the first item), when it was supposed to be 20+(I don't know the exact item count). Below are the relevant snippets:

Here the list is iterated to find out what items are selected in the db and move them from this list to another.

protected void ListaPaisExp_ItemDataBound(object sender, RadListBoxItemEventArgs e)
        {
            foreach (DataRow dr in Empresa.Tables[1].Rows)
            {
                foreach (RadListBoxItem item in ListaPaisExp.Items)
                {
                    if (item.Value == dr["tipopaisid"].ToString())
                    {
                        ListaPaisExpSel.Items.Add(item);
                        item.Remove();
                    }
                }
            }
        }

 

And this is the DataBind on Page_Load:

ListaPaisExp.DataSource = Tipos_DAL.GetTiposByArchtype("pais");
ListaPaisExp.DataValueField = "ID";
ListaPaisExp.DataTextField = "Descricao";
ListaPaisExp.DataBind();
Pedro
Top achievements
Rank 1
 answered on 26 Jan 2017
1 answer
32 views

it is possible get table html from radgrid side client.

Example

var grid = $find("<%=GrdCobros.ClientID %>");

var table = grid.innerHtml  //get <table><tr><td>...

Milena
Telerik team
 answered on 26 Jan 2017
1 answer
96 views

Hello dear telerik-team,

we are facing a huge problem with your example from here: http://demos.telerik.com/aspnet-ajax/dropdowntree/examples/populatingwithdata/webserviceandclienttemplates/defaultcs.aspx  , because we have like ~18000 Categories which we have to fill.

 

The problem we are now facing is, that we have created the exact copy of you webservice, but it isn't working like on your site.

We are using "Postman"-Extension for chrome and when we post something like 

"{"node":{"Text":"Politics","Value":"2","Key":null,"ExpandMode":3,"NavigateUrl":null,"PostBack":true,"DisabledCssClass":null,"SelectedCssClass":null,"HoveredCssClass":null,"ImageUrl":null,"HoveredImageUrl":null,"DisabledImageUrl":null,"ExpandedImageUrl":null,"ContextMenuID":"","Checked":false},"context":[]}"

on your demo-Url : http://demos.telerik.com/aspnet-ajax/dropdowntree/examples/populatingwithdata/webserviceandclienttemplates/DropDownTreeWebService.svc/LoadData

We are getting a nice json which looks like this:{
  "d": [
    {
      "__type": "DropDownNodeData:#Telerik.Web.UI",
      "Attributes": [],
      "ExpandMode": 0,
      "Text": "CNN",
      "Value": "5"
    }, ........

But when we are doing the same thing to our webservice we get :

[
  {
    "Attributes": [],
    "ExpandMode": 0,
    "Text": "Sammeln & Seltenes",
    "Value": "1"
  }, ....

So we are wondering if you could tell us, which settings for the service you have done in the web.config file.

 

 

 

Chris
Top achievements
Rank 1
 answered on 26 Jan 2017
4 answers
123 views

Dear all,

I use Radgrid with popup window. I want to implement specific scenario. My item has relations to different tables and I can add/modify them only when item is created (otherwise I don't have primary key). My idea is: when I insert new item I want to save it and automatically open the same item in edit mode. It means user can continue to create additional relations and it is not necessary to find new item in grid and start edit mode.

Can you help me if it is possible and how to implement it?

Thank you,

Petr

Petr
Top achievements
Rank 1
Iron
Iron
 answered on 26 Jan 2017
1 answer
82 views

I am using the RadCloudUpload Control and after 24 hours the file is being deleted from the AmazonS3 Account. I thought it was because i am not doing a postback which i have corrected, however it is still doing it.  I am doing a javascript postback.  Any Help will be greatly recieved

 

Veselin Tsvetanov
Telerik team
 answered on 26 Jan 2017
6 answers
768 views
Hi,

I've got the cloud uploader configured using the custom azure provider so that I can dynamically switch containers and the http handler setup so that I can set a custom file name for files that I upload. This seems to all be working, the file gets uploaded with the correct file name to the correct container (and the cloud upload control has the green tick next to the file - no errors), but after a second (or so) it gets deleted. I can't figure out why.

I checked the azure blob log and can see the following sequence of events:
(time - command)
03:16:20.25 - PutBlob
03:16:30.17 - SetBlobMetadata
03:16:32.48 - DeleteBlob

All of these commands are for the custom container/file name I've set, originate from the same IP address (which is my IP address) and all result in a success.

Does anyone have any idea as to why the cloud uploader would be sending a delete command?

I'm not, knowingly, telling the cloud control to delete the file. I'm certainly not clicking the delete (trash can) image next to the uploaded file.

Thanks,
Pete
Veselin Tsvetanov
Telerik team
 answered on 26 Jan 2017
2 answers
263 views

Hello!

I am having a RadAutoCompleteBox in the edit template form of my RadGrid. I am trying to bind it to a string array in my code behind file. The control is rendered but when I try to type in it I get DataSource(or DataSourceID) is not set error. Here are some code snippets:

ASCX

<EditFormSettings EditFormType="Template">
   <FormTemplate>
      <telerik:RadAutoCompleteBox ID="RadAutoCompleteBox1" runat="server" DataSource="<%#AutoCompleteBoxDataSource%>" InputType="Token" AllowCustomEntry="true"></telerik:RadAutoCompleteBox>
    </FormTemplate>
</EditFormSettings>

 

ASCX.CS

public string[] AutoCompleteBoxDataSource;
 
protected void Page_Load(object sender, EventArgs e)
{
  AutoCompleteBoxDataSource = new string[] { "value1", "value2", "value3", "value4" };
}
    
protected void RadGrid_ItemDataBound(object sender, GridItemEventArgs e)
{           
   if ((e.Item is GridEditFormItem) && (e.Item.IsInEditMode))
    {
       GridEditFormItem editform = (GridEditFormItem)e.Item;
       RadAutoCompleteBox racEditForm= (RadAutoCompleteBox)editform.FindControl("RadAutoCompleteBox1");
       if (racEditForm= != null)
        {
          racEditForm.DataSource = AutoCompleteBoxDataSource;
          racEditForm.DataBind();
        }
     }
}

 

I've tried removing the DataSource from the .ascx file but it caused a server error saying DataSource not set. I have another RadAutoCompleteBox control outside of the RadGrid which is working without any issues.

Thanks in advance!

Regards,

T.Toncheva

Teodora
Top achievements
Rank 1
 answered on 26 Jan 2017
20 answers
490 views

Hi,

We have found some issues while working with the editor.

Issue 1: Image Map Editor
Click on an image in the editor and open the image map editor with your right mouse button. Add an area with same size as the image itself. After OK, you can't select image anymore, even the right mouse menu is not working anymore. So editing area's and image itself after that is not possible anymore. Tested in Chrome and reproduced in your demos. 

Issue 2: Crash on switching between HTML and Design mode
After some changes in the HTML mode, the editor crashed with a javascript error: Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'. Tested in Chrome, but not reproduceable in your demos. It seems this causes by the RadWindowManager which is added in a same page as the editor. But the error is known by you?

Issue 3: Crazy attributes and HTML elements
When an user is working with the editor (adding an image, typing a text, changes size of a text, etc etc), sometimes the editor will add crazy attributes to the BODY element or adds HTML spans. This are very hard to reproduce, and there are no cases which this issue can be reproduced each times. 
- contenteditable="true" in the body element. It happened a few times here and with our users. We have fixed this by removing this attribute with client script but it have to be fixed in the editor itself. Seems an known issue here at the forum, but no fix...
- jquery111108884286452584759="5" in the body element. Seems happens while working with image map editor, but not each time.
- <span class="__red_marker" /> or in that way. Added after BODY element.

I hope you can help me out with this issues.

Kind regards,
Jelle

Ianko
Telerik team
 answered on 26 Jan 2017
2 answers
152 views

I have a RadGrid and the SelectedIndexChanged is not firing. I have literally tried to change every property and I have tried it with the postback and OnSelectedIndexChanged set correctly per all the examples.

Here is the code: Right now its set to OnSelectedIndexChanged  but i have tried ever combination 

<telerik:RadGrid ID="RadGridRigDiff" runat="server"
        GridLines="None" BackColor="#313131" ForeColor="White"
       OnSelectedIndexChanged="RigDiff_SelectedIndexChanged"
       Style="width: 100%; height: 92%;">
        
       <ClientSettings EnablePostBackOnRowClick="false">
           <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="true" ></Scrolling>
           <Selecting AllowRowSelect="true"  />
       </ClientSettings>
       <AlternatingItemStyle BackColor="#313131" ForeColor="White" />
       <MasterTableView >
 
           <ItemStyle HorizontalAlign="Left" Font-Size="11pt" />
           <AlternatingItemStyle HorizontalAlign="Left" Font-Size="11pt" />
       </MasterTableView>
 
       <HeaderStyle BackColor="#313131" ForeColor="White" />
       <ItemStyle BackColor="#313131" ForeColor="White" />
   </telerik:RadGrid>

 

here are my two functions I use... I just comment the one out I'm not using     

Protected Sub RigDiff_SelectedIndexChanged(sender As Object, e As EventArgs)
     MsgBox("Hello")
 End Sub
 
 Protected Sub RadGridRigDiff_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RadGridRigDiff.SelectedIndexChanged
     MsgBox("Hello")
 End Sub

 

HERE is my code to set the grid...

           SQL_RigChange = "My SQL Statement"
 
                Dim DT_RigTab_Grid As New DataTable
 
                Dim daRigTab_Grid As New SqlDataAdapter(SQL_RigChange, Conn)
                daRigTab_Grid.Fill(DT_RigTab_Grid)
 
                Dim DT_RigTab_Grid2 As New DataTable
                If DT_RigTab_Grid.Rows.Count > 0 Then
                    DT_RigTab_Grid2 = Get_Diff(DT_RigTab_Grid, "Grid")
                End If
 
                For Each row As DataRow In DT_RigTab_Grid2.Rows
                    row.Item("Name") = StrConv(row.Item("Name"), VbStrConv.ProperCase)
                Next row
 
                RadGridRigDiff.DataSource = DT_RigTab_Grid2
                RadGridRigDiff.DataBind()
 
                RadGridRigDiff.MasterTableView.GetColumn("Sort").Visible = False
                RadGridRigDiff.MasterTableView.GetColumn("Flag").Visible = False
                RadGridRigDiff.MasterTableView.GetColumn("Change").ItemStyle.HorizontalAlign = HorizontalAlign.Center
                RadGridRigDiff.MasterTableView.GetColumn("M1Total").ItemStyle.HorizontalAlign = HorizontalAlign.Center
                RadGridRigDiff.MasterTableView.GetColumn("M2Total").ItemStyle.HorizontalAlign = HorizontalAlign.Center
                RadGridRigDiff.MasterTableView.GetColumn("Name").HeaderStyle.Width = Unit.Pixel(220)
                RadGridRigDiff.MasterTableView.ItemStyle.Height = 15
                RadGridRigDiff.MasterTableView.AlternatingItemStyle.Height = 15
 
 

 

Charles
Top achievements
Rank 1
 answered on 25 Jan 2017
2 answers
99 views

Hi,

Is it possible to move the scroll postion of the datadiv and headerdiv for a grid to say 50px over when a user scrolls? I have two grid command buttons and would like to move the grid over when the user scrolls down, so that they would have to scroll right to see buttons. Is this possible?

 

Thanks,

Steve

Pavlina
Telerik team
 answered on 25 Jan 2017
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?