Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
132 views
Hi all,

Does anyone have any suggestions on how can I remove the empty bar at the top of the RadProgress box?
See attached image.

Thanks in advance
Rich
RichJ
Top achievements
Rank 1
 answered on 14 May 2012
1 answer
98 views
Hello,

I wanted to use RadSocialShare but I could not find it in the ToolBox in Visual Studio 2010. I am currently using version. 2011.2.915.40. Thank you for your help.
Louie
Top achievements
Rank 1
 answered on 14 May 2012
2 answers
1.4K+ views
I have a radgrid, and want to make the row height as small as possible so that I can fit many rows in a small space.  My RadGrid is inside of a user control, and in the user control's page load event, I have the following code:

rgMain.HeaderStyle.Height = Unit.Pixel(10);
rgMain.ItemStyle.Height = Unit.Pixel(10);
rgMain.AlternatingItemStyle.Height = Unit.Pixel(10);
rgMain.CellPadding = 0;
rgMain.CellSpacing = 0;

However, the grid rows are always 27 pixels tall, no matter what values I specify for the Height properties or CellPadding and CellSpacing.
Jayd
Top achievements
Rank 1
 answered on 14 May 2012
1 answer
185 views

RadGrid Control: disabling drag and drop column is not working. User can pick the column and while dragging somewhere, following error comes

Unable to download.

Unspecified error

I have read the following link.

http://www.telerik.com/community/forums/aspnet/grid/disable-drag-and-drop.aspx


I have set the following properties in code behind and design view as well and both are not working.


telRadGrid.ClientSettings.AllowRowsDragDrop =
False

telRadGrid.ClientSettings.ReorderColumnsOnClient = False

telRadGrid.ClientSettings.AllowDragToGroup = False


<
ClientSettings AllowColumnsReorder="false" AllowDragToGroup="false" ReorderColumnsOnClient="false">

                <Resizing AllowColumnResize="false" />

</ClientSettings>

Richard
Top achievements
Rank 1
 answered on 14 May 2012
2 answers
99 views
Hi. I have a rad rotator which shows some images and when the user click the image it shows the detail in a form view. It all appears to work however when I click the edit button the change event is fired but the form does not change into edit mode? The code is in a usercontrol. I'm sure I'm doing something really stupid, but cant see what :-( 

<asp:FormView ID="frmDetail" runat="server" DataKeyNames="C_n_Id" OnItemUpdated="FormView_ItemUpdated"
        OnItemCommand="FormView_ItemCommand" DefaultMode="ReadOnly">
            <ItemTemplate>
                <table style="padding:10px;">
                    <tbody style="vertical-align: top;">
                        <tr>
                            <td width="80px">
                                <img src='<%#  HttpUtility.UrlDecode(String.Format("{0}/_N{1}_small.png", HttpUtility.UrlEncode(Eval("C_s_ImageUrl").ToString()), Eval("C_n_Id"))) %>'
                                    width="64px" height="64px" class="RotatorImage" />
                            </td>
                            <td>
                                <asp:Label ID="lblDescription" runat="server" Text='<%# Bind("C_s_Description") %>'
                                    EnableTheming="true" />
                            </td>
                        </tr>
                    </tbody>
                </table>
                <br />
                <b>Name:</b>
                <asp:Label ID="ProductNameLabel" runat="server" Text='<%# Bind("C_s_Name") %>' EnableTheming="true" /><br />
                <b>Description:</b>
                <br />
                <asp:Button ID="EditButton" Text="Edit" CommandName="Edit" runat="server" />
                 <asp:Button ID="Button1" Text="Insert" CommandName="Insert" runat="server" />
            </ItemTemplate>
            <EditItemTemplate>
                <asp:Label runat="server" ID="lblTest" Text="Edit" />
                 <asp:TextBox ID="lblDescription2" runat="server" Text='<%# Bind("C_s_Description") %>' />
            </EditItemTemplate>
            <InsertItemTemplate>
                <asp:Label runat="server" ID="lblTest" Text="Insert" />
            </InsertItemTemplate>
        </asp:FormView>

Code behind, data is being bound in code behind using entity model;

private Int64 LastID
       {
           get
           {
               return Convert.ToInt64(ViewState["LastID"]);
           }
           set
           {
               ViewState["LastID"] = value;
           }
       }
 
       protected void FormView_ItemUpdated(Object sender, FormViewUpdatedEventArgs e)
       {
           this.frmDetail.DataBind();
       }
 
       protected void FormView_ItemCommand(object sender, FormViewCommandEventArgs e)
       {
           switch (e.CommandName)
           {
               case "Edit":
                   this.frmDetail.ChangeMode(FormViewMode.Edit);
                   
                   break;
           }
       }
 
       protected void Page_Load(object sender, EventArgs e)
       {         
           this.RebindRotator();        
       }
 
       private void RebindRotator()
       {          
           thumbRotator.DataSource = DbContext.tblAccountNotifications.OrderBy(t=>t.C_s_Name);
           thumbRotator.DataBind();
       }
 
       protected void BindForm()
       {
           this.frmDetail.DataSource = DbContext.tblAccountNotifications.Where(t => t.C_n_Id == this.LastID);
           this.frmDetail.DataBind();
       }
       protected void GetSubscription(object sender, RadRotatorEventArgs e)
       {
           RadRotator rotator = sender as RadRotator;
           rotator.InitialItemIndex = e.Item.Index;// Persist the index
 
           this.LastID = Convert.ToInt64(((Label)e.Item.FindControl("lblId")).Text);
           this.BindForm();          
 
       }
plusHR
Top achievements
Rank 1
 answered on 14 May 2012
1 answer
444 views
I have a column ID, I used DataType="System.Int64" but when sorting, still shows:

 

1,102,11,2,25,3,

I like it to sort 1,2,3,11,25,102 like number and filter like number when using less then...

Thanks!
Pavlina
Telerik team
 answered on 14 May 2012
1 answer
99 views
I have  made a dynamic grid and now i want to update my sp from the values in textbox in radgrid
how can i do that ..
when i try to access the value it alwas gives me the old value .
How can i get the new value ?
 public void Update_OnbuttnClick(object sender, EventArgs e)
        {
               double total;
                string id;

               for (int OuterCol = 1; OuterCol < gridCntrl.Columns.Count; OuterCol++)
                  {
                      GridTemplateColumn templateColumn = new GridTemplateColumn();
                      //string templateColumnName = ds.Tables[0].Columns[OuterCol].ColumnName;

                for (int inner = 1; inner < gridCntrl.Items.Count; inner++)
                {

                    total = double.Parse((gridCntrl.Items[OuterCol].FindControl("xyz") as RadNumericTextBox).Value.ToString());
                    id = (gridCntrl.Items[OuterCol].FindControl("Petroleum") as RadNumericTextBox).Text.ToString();

                }



            }




        }
Pavlina
Telerik team
 answered on 14 May 2012
1 answer
97 views
Hi guys

I try to combine RadFileExplorer with jQuery Dialog Modal but something happened.
when i wanted to create a new folder, I was not able to type any character into the input element nor delete the default name.
It still creates a new folder but with the name 'NewFolder' if I click the OK button. 

It works OK if i don't use jQuery Dialog Modal.

Please see the attachment file.

Here are the codes:

HTML script :
<div id="fSaveCroppedImage" title="Save Image">           
            <telerik:RadFileExplorer ID="RadFileExplorer1"  Width="90%" Height="200px"   runat="server" 
                ExplorerMode="Default" OnClientFolderChange="OnClientFolderChange" 
                EnableOpenFile="False" 
                VisibleControls="TreeView,ContextMenus,Toolbar" 
                onclientfolderloaded="OnClientFolderLoaded" >
            <Configuration ViewPaths="~/pubimages" UploadPaths="~/pubimages"
                                DeletePaths="~/pubimages" 
                           />
            </telerik:RadFileExplorer>
  </div>


jQuery script:

$("#fSaveCroppedImage").dialog({
        bgiframe: false,
        autoOpen: false,
        dialogClass: '',
        height: 'auto',
        width: 'auto',
        modal: true,
        open:function(){{
          $(this).parent().appendTo($("form:first")); 
        }},
        buttons: {
            Cancel: function() {
                $(this).dialog('close');
            },
            Save: function() {
                //do something    
$(this).dialog('close');
                }
            }
        },
        close: function() {
        }
    });

Anyone can help?

Im using jQuery 1.7.2 and Telerik 2010.1.415.20.

Thanks.
Oki
Dobromir
Telerik team
 answered on 14 May 2012
5 answers
1.9K+ views
Good Day all

In a ASP.NET Gridview we use the event PageIndexChanging to do the custom paging. i use RadGrid i want to implement Paging.  i enabled paging in the Radgrid and i have selected the option for Custom Paging. i looked for the event PageIndexChanging but i found the PageIndexChanged that was the only thing that is close to the one i know. i have added the following code to do custom paging.

 
    protected void RadReplies_PageIndexChanged(object source, GridPageChangedEventArgs e) 
    { 
        RadReplies.PageIndexChanged = e.NewPageIndex; 
 
        Bind_Posts(); 
    } 

i don't get any Error. When i run my page it show the first 5 records and when i move to the next page it shows nothing. The method Bind_Posts() it rebind the grid.

Can you tell me if there is anything that am doing wrong

Thanks

Pavlina
Telerik team
 answered on 14 May 2012
2 answers
106 views
I have a bit of a more complicated setup:

A usercontrol loading more usercontrols into a RadMultiPage. One of these usercontrols contains a Grid with Editors on there. Everything works fine, but when adding a RadAjaxManager + Loading Panel to the outer usercontrol (containing the RadMultiPage) - saving of the Grid doesn't have any effect, i.e. the value returned from the databound control is the same as the initial value - other columns in the grid do save, only the Editor doesn't.
When I change the Editor column to a regular TextBox column I can save again - but when trying to save some HTML code e.g. ">" "<" I get an exception in the Telerik Javascript.

I am assuming this behavior is due to the RadAjaxManager not liking the output of the Editor column (containing HTML) or something like that.

The outer containing usercontrol:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadMultiPage">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadMultiPage" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="RadTabStrip">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadMultiPage" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
 
 
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
<div class="right">
</div>
<div class="left">
            <telerik:RadTabStrip ID="RadTabStrip" SelectedIndex="0" runat="server" MultiPageID="RadMultiPage"
                CssClass="NoBg">
            </telerik:RadTabStrip>
            <telerik:RadMultiPage ID="RadMultiPage" runat="server" SelectedIndex="0" OnPageViewCreated="RadMultiPage_PageViewCreated" />
</div>

The usercontrols for the RadMultiPage are loaded as shown here: http://demos.telerik.com/aspnet-classic/TabStrip/Examples/Application/AddDynamicUserControls/DefaultCS.aspx.

Lastly the usercontrol with the problem:
<telerik:RadGrid ID="radGrid1" runat="server" DataSourceID="dsMatrix" AutoGenerateColumns="False" Width="100%">
    <ClientSettings>
        <Selecting CellSelectionMode="None"></Selecting>
    </ClientSettings>
    <MasterTableView Width="100%" EditMode="InPlace" AllowAutomaticDeletes="True" AllowAutomaticUpdates="true" AllowAutomaticInserts="True" DataKeyNames="ID, RowVersion">
        <Columns>
            <telerik:GridBoundColumn DataField="ID" Visible="false" />
            <telerik:GridTemplateColumn DataField="Richtext" HeaderText="Richtext" HeaderStyle-Width="100%">
                <ItemTemplate>
                    <telerik:RadEditor ID="txtRichtext" Runat="server" EditModes="Design" ToolsFile="RadEditorBasic.xml" EnableResize="False" Content='<%# Bind("Richtext") %>' AutoResizeHeight="True" Height="100px" Width="100%" Enabled="False" ReadOnly="True" />
                </ItemTemplate>
                <EditItemTemplate>
                    <telerik:RadEditor ID="txtRichtext" Runat="server" EditModes="Design" ToolsFile="RadEditorBasic.xml" EnableResize="False" Content='<%# Bind("Richtext") %>' AutoResizeHeight="True" Height="100px" Width="100%" />
                </EditItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn" />
        </Columns>
        <EditFormSettings>
            <EditColumn ButtonType="ImageButton" ItemStyle-HorizontalAlign="Center"/>
        </EditFormSettings>
    </MasterTableView>
</telerik:RadGrid>

So again: When removing the RadAjaxManager from the container, the "Richtext" field is properly saved. When RadAjaxManager is present as shown above, the field is not saved at all. Any other type of field I add is saved properly.

Any suggestions to get this to work with still having the fancy "loading" animation instead of the full page postback?
Dennis
Top achievements
Rank 1
 answered on 14 May 2012
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?