Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
72 views
Hello guys,

After some problems with the upgrade from radeditor 4.4 to 5.7.1, the editor is finally in place and the reusable content is working.(it can update the content automatically). But I've encountrered with another issue now.
I've a site, which requieres authentication and in it, the reusable content seems to work fine. But in the extended site which allow anonymous access, the reusable content is not visible. This issue could be reproduced in both live and test environment, but not in the development environment.

The reusable content is approved, the NT AUTHORITY\authenticated users has read access to it. But the reusable content is still not visible for the visitors in the extended site. What could I possible be missing? Server configuration? Some other permisson for the visitors? Or is it a bug?

Best regards, Daniel
Stanimir
Telerik team
 answered on 20 Dec 2010
1 answer
121 views
I have used the ITemplate structure to dynamically create columns for RadGrid's -- and it works great for me for display purposes.

I am now trying to add a LinkButton and to process the event when it's clicked through the Grid's onItemCommand property.  Although, when the linkbutton is clicked, the page postback happends, but the ItemCommand method is not triggered.

What's the missing link?

Thanks,
Todd.

grid html

<telerik:RadGrid ID="TimeSlotScheduleGrid" runat="server" EnableViewState="True"
      AutoGenerateColumns="False" Width="584" ShowFooter="false"
      onItemDataBound="TimeSlotScheduleGrid_RowDataBound" onItemCommand="TimeSlotScheduleGrid_RowCommand"
      OnColumnCreated="TimeSlotScheduleGrid_ColumnCreated">                     
      <MasterTableView DataKeyNames="Id"  GroupLoadMode="Client" Width="99%">
          <GroupByExpressions>
              <telerik:GridGroupByExpression>
                  <SelectFields>
                      <telerik:GridGroupByField FieldName="GameNo" HeaderText="Game Number" HeaderValueSeparator=": " />
                  </SelectFields>
                  <GroupByFields>                                    
                      <telerik:GridGroupByField FieldName="GameNo" SortOrder="Ascending" />
                  </GroupByFields>
              </telerik:GridGroupByExpression>
          </GroupByExpressions>                      
      <Columns>                                
          <telerik:GridTemplateColumn HeaderText='Time Slot'>
              <HeaderStyle Width="130" />
              <ItemStyle  HorizontalAlign="Left" VerticalAlign="Middle" />                    
              <ItemTemplate>                                
                      <asp:Label ID="timeSlotLabel" runat="server" />                                
              </ItemTemplate>
          </telerik:GridTemplateColumn>                                                            
      </Columns>
      </MasterTableView>
      <ClientSettings EnableRowHoverStyle="false">
          <Selecting AllowRowSelect="false" />
          <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True" FrozenColumnsCount="1"/>                        
      </ClientSettings>                     
  </telerik:RadGrid>

The columns are created during the first Page_Load

for (int wk = 1; wk < (maxWeeks + 1); wk++)
{
    GridTemplateColumn templateColumn = new GridTemplateColumn();
    string columnName = "W" + wk.ToString();
    templateColumn.HeaderText = columnName;
    templateColumn.HeaderStyle.Width = new Unit(40);
    templateColumn.UniqueName = columnName;
    templateColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Center;
    templateColumn.ItemStyle.VerticalAlign = VerticalAlign.Top;
      
    if(divisionObj.IsManualTimeSlotEntry)
        templateColumn.ItemTemplate = new TimeSlotCheckBoxTemplate(columnName);
    else
        templateColumn.ItemTemplate = new TimeSlotTemplate(columnName);
    TimeSlotScheduleGrid.MasterTableView.Columns.Add(templateColumn);
}

Here is the template class

private class TimeSlotTemplate : ITemplate
{
    private string templateName;
    //controls
    private Label label;
    private LinkButton linkButton;
    private Image image;
      
    public TimeSlotTemplate(string name)
    {
        templateName = name;
    }
    public void InstantiateIn(System.Web.UI.Control container)
    {
        label = new Label();
        label.ID = templateName +  "Label";
        linkButton = new LinkButton();
        linkButton.ID = templateName + "Button";
        image = new Image();
        image.ID = templateName + "Image";
        linkButton.Controls.Add(image);
        container.Controls.Add(label);
        container.Controls.Add(linkButton);
    }
}


Princy
Top achievements
Rank 2
 answered on 20 Dec 2010
1 answer
48 views
Hello,

I see how to set DayStartTime and DayEndTime for DayViewDefinition, WeekViewDef...etc.

However, is it possible to have the scheduler's day span from 6am to 6am the next day for all views (ie. day, week, month) rather than cutting off at 12am?

Thanks!
Peter
Telerik team
 answered on 20 Dec 2010
5 answers
113 views
I have a multitude of problems, but I will start with the most important.

1)  I have a rotator that shows images that have descriptions.  On mouseover tooltip is suppose to load the description.  On every site expect the root of the site, this works.  On the root, it appears that the value being passed to the user control is getting lost in translation; for example, the value might be 18 but its passing 91.  I have copied the code sections exactly from the children sites and it still has problems.  Please help!!

protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args)
      {
          this.UpdateToolTip(args.Value, args.UpdatePanel);
      }
      private void UpdateToolTip(string elementID, UpdatePanel panel)
      {
          Control ctrl = Page.LoadControl("ImageDesc.ascx");
          panel.ContentTemplateContainer.Controls.Add(ctrl);
          ImageDesc img = (ImageDesc)ctrl;
          img.IDNum = elementID;
      }
      protected void RadRotator1_ItemDataBound(object sender, Telerik.Web.UI.RadRotatorEventArgs e)
      {
          Control target = e.Item.FindControl("RadBinaryImage1");
          HiddenField id = (HiddenField)e.Item.FindControl("HiddenField2");
          HiddenField id2 = (HiddenField)e.Item.FindControl("HiddenField1");
          if (!Object.Equals(target, null))
          {
              if (!Object.Equals(this.RadToolTipManager1, null))
              {
                  //Add the button (target) id to the tooltip manager
                  this.RadToolTipManager1.TargetControls.Add(target.ClientID, id2.Value+id.Value, true);
 
              }
          }
      }
<div class="pics">
                 <telerik:RadRotator ID="RadRotator1" Enabled="false" runat="server" ItemWidth="207" Height="122"
                     ItemHeight="122" DataSourceID="SqlDataSource1" Skin="Office2007" OnItemDataBound="RadRotator1_ItemDataBound"
                     Width="620px" BorderColor="#FF3300" FrameDuration="7000">
                     <ItemTemplate>
                         <telerik:RadBinaryImage ID="RadBinaryImage1"  DataValue='<%# Eval("Image") %>' runat="server" />
                         <asp:HiddenField ID="HiddenField1" runat="server" Value='<%# Eval("ImageID") %>' />
                         <asp:HiddenField ID="HiddenField2" runat="server" Value='<%# Eval("ImageDesc") %>' />
                     </ItemTemplate>
                 </telerik:RadRotator>
                 <telerik:RadToolTipManager ID="RadToolTipManager1" OffsetY="-1" HideEvent="Default"
                     runat="server" OnAjaxUpdate="OnAjaxUpdate" RelativeTo="Element"
                     Skin="Office2007" Position="BottomCenter">
                 </telerik:RadToolTipManager>
                 <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:RootConnection %>"
                      
                      
                      SelectCommand="Select Top 15 Image,ImageID,ImageDesc + 'ID:'+convert(varchar(10),ImageID) as 'ImageDesc' From CMS_Header_Images Where Archive='No' and SiteID=@SiteID ORDER BY NEWID()">
                     <SelectParameters>
                         <asp:ControlParameter ControlID="RotatorSiteID" Name="SiteID" PropertyName="Value" />
                     </SelectParameters>
                 </asp:SqlDataSource>
                 <asp:HiddenField ID="RotatorSiteID" runat="server" />
             </div>

Again, this is proven code that works on all sites expect the root.  Any ideas will be greatly appreciated.


UPDATE :  My latest guess is that it is a databinding problem from the datasource to the rotator. (12.3.10 10:30 CST)
Fiko
Telerik team
 answered on 20 Dec 2010
1 answer
136 views
Hi all,

i have a Custom List with nearly 80 Fields. 20 of these 80 Fields are Rich-Text Fields. On my Site Collection is the RAD Editor for Lists activated. When i now want to Add or Edit an Item in this list, it takes 1:15 min to the point where i am able to do some input.

When i disable the RAD Editor Feature it takes nearly 25 seconds. This is a long time, too, but much more less than 1:15 min. When i look at the generated Code which is sent to the bworser, i see for each RichText Field a huge amount of RADEditor generated Code (JS?)

Is it possible for example to have this code only one time instead of n-times (amount of the RichText Fields)?

How to improve the performance? We are using the Version 5.5.1 of the RADEditor.
Stanimir
Telerik team
 answered on 20 Dec 2010
1 answer
137 views
Hi,

I want hide particular row when export to PDF.

For Ex

Name                        Id
arun                        1001
bala                         1002
prabhu                     1003

i want name=bala means we need to hide only export to PDF.

Please give me a tips ASAP.

Thanks,
Dhamu.
Shinu
Top achievements
Rank 2
 answered on 20 Dec 2010
3 answers
88 views
Hi,

I am facing this unusual bug, I have a form in a RadGrid, at fourth level i have a RadDatePicker control which allows users to select the date and save the data.

Problem:
Sometimes the RadDatePicker is loading as a normal TextBox control and the image button which popups the calendar control is dissappearing. After several refresh, it loads normally. What is wrong in this control?

Please help.

Regards,
Sudhanva
Tsvetina
Telerik team
 answered on 20 Dec 2010
4 answers
101 views
Hi Team,

Always problems with RadGrids in admin side. This time is with pagin and automatic edit/update. I use one RadGrid ajaxified server side radgrid inside News Module Edit/Insert Template. The Dataset is external data.  I need to load and update one Dataset and after store. The Dataset is loading and the RadGrid is paging, but if you try to edit or Update any items the pager it come back to the first page and one item in the first at same level is edited or updated. I use preconised RadGrid Automatic sample and this issue has beed submit to RadGrid Forum but not found solution. Only items of first page can be Edited or Updated. I really need some help to fix this problem.

<telerik:RadGrid ID="PlanGrid" runat="server" Skin="WebBlue"  GridLines="None" Width="100%" OnNeedDataSource="PlanGrid_NeedDataSource"
OnItemCreated="PlanGrid_ItemCreated" OnUpdateCommand="PlanGrid_UpdateCommand" AutoGenerateColumns="False" AllowMultiRowEdit="True" ShowStatusBar="true" AllowPaging="True">
     <MasterTableView DataKeyNames="Week" Width="100%" CommandItemDisplay="Top" EditMode="InPlace" PageSize="14">
                   <Columns>
                     <telerik:GridTemplateColumn UniqueName="CheckBoxTemplateColumn">
                            <HeaderTemplate>
                             <asp:CheckBox id="headerChkbox" OnCheckedChanged="ToggleSelectedState" AutoPostBack="True" runat="server"></asp:CheckBox>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:CheckBox id="CheckBox1" OnCheckedChanged="ToggleRowSelection" AutoPostBack="True" runat="server"></asp:CheckBox>
                            </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn UniqueName="Week" SortExpression="Week" HeaderText="Sem." ReadOnly="true" DataField="Week" />   
                    <telerik:GridBoundColumn UniqueName="devise" SortExpression="devise" HeaderText="devise."       ReadOnly="true"DataField="devise" />    
                    <telerik:GridBoundColumn UniqueName="Days_1d"  HeaderText="Price"
                        DataField="Days_1d" >
                        <ItemStyle  Width="100px" />
                    </telerik:GridBoundColumn>
                     <telerik:GridBoundColumn UniqueName="Days_promo"  HeaderText="Discount(%)"
                        DataField="Days_promo" DataType="System.Int32">
                        <ItemStyle  Width="70px" />
                    </telerik:GridBoundColumn>             
                    
                    <telerik:GridEditCommandColumn UpdateText="Update" UniqueName="EditCommandColumn"
                        CancelText="Cancel" EditText="Edit">
                        <HeaderStyle Width="85px"></HeaderStyle>
                    </telerik:GridEditCommandColumn>
                </Columns>
                 <EditFormSettings CaptionFormatString="Semana {0}" CaptionDataField="Week" >
                    <FormTableItemStyle Width="100px" Height="29px"></FormTableItemStyle>
                    <FormTableStyle GridLines="None" CellSpacing="0" CellPadding="2"></FormTableStyle>
                    <FormStyle Width="100%" BackColor="#eef2ea"></FormStyle>
                    <EditColumn ButtonType="ImageButton" />
                </EditFormSettings>
          
                </MasterTableView>
    <ClientSettings EnableRowHoverStyle="true">
       
    </ClientSettings>
     <PagerStyle Mode="NumericPages"></PagerStyle>
</telerik:RadGrid>

Page load (old issue fixed by ivan link the ajaxmanager to ajaxify)
RadAjaxManager ajaxManager = RadAjaxManager.GetCurrent(this.Page);
if (ajaxManager != null)
{
    ajaxManager.AjaxSettings.Clear();
    ajaxManager.AjaxSettings.AddAjaxSetting(PlanGrid, PlanGrid);
}

 
protected void PlanGrid_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            this.PlanGrid.DataSource = PlanningData; //is a Dataset
        }
  
     protected void PlanGrid_ItemPreRender(object sender, EventArgs e)
        {
            ((sender as GridDataItem)["CheckBoxTemplateColumn"].FindControl("CheckBox1") as CheckBox).Checked = (sender as GridDataItem).Selected;
  
        }
        protected void ToggleRowSelection(object sender, EventArgs e)
        {
            ((sender as CheckBox).Parent.Parent as GridItem).Selected = (sender as CheckBox).Checked;
        }
        protected void ToggleSelectedState(object sender, EventArgs e)
        {
            if ((sender as CheckBox).Checked == true)
            {
                foreach (GridDataItem dataItem in PlanGrid.MasterTableView.Items)
                {
                    (dataItem.FindControl("CheckBox1") as CheckBox).Checked = true;
                    dataItem.Selected = true;
                }
            }
            else
            {
                foreach (GridDataItem dataItem in PlanGrid.MasterTableView.Items)
                {
                    (dataItem.FindControl("CheckBox1") as CheckBox).Checked = false;
                    dataItem.Selected = false;
                }
            }
        }
        protected void PlanGrid_UpdateCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
        {
            PlanGrid.MasterTableView.EditMode = GridEditMode.EditForms;
            GridEditableItem eeditedItem = e.Item as GridEditableItem;
            GridEditManager editMan = editedItem.EditManager;
  
            foreach (GridColumn column in e.Item.OwnerTableView.RenderColumns)
            {
                if (column is IGridEditableColumn)
                {
                    IGridEditableColumn editableCol = (column as IGridEditableColumn);
                    if (editableCol.IsEditable)
                    {
                        IGridColumnEditor editor = editMan.GetColumnEditor(editableCol);
  
                        string editoreditorType = editor.ToString();
                        string editorText = "unknown";
                        object editorValue = null;
  
                        if (editor is GridTextColumnEditor)
                        {
                            editorText = (editor as GridTextColumnEditor).Text;
                            editorValue = (editor as GridTextColumnEditor).Text;
                        }
  
                        if (editor is GridBoolColumnEditor)
                        {
                            editorText = (editor as GridBoolColumnEditor).Value.ToString();
                            editorValue = (editor as GridBoolColumnEditor).Value;
                        }
  
                        if (editor is GridDropDownColumnEditor)
                        {
                            editorText = (editor as GridDropDownColumnEditor).SelectedText + "; " +
                                (editor as GridDropDownColumnEditor).SelectedValue;
                            editorValue = (editor as GridDropDownColumnEditor).SelectedValue;
                        }
  
                        try
                        {
                            DataRow[] changedRows = PlanningData.Tables[0].Select("Week= " + editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["Week"]);
                            changedRows[0][column.UniqueName] = editorValue;
                            PlanningData.Tables[0].AcceptChanges();
                        }
                        catch (Exception ex)
                        {
                            PlanGrid.Controls.Add(new LiteralControl("<strong>Error '" + column.UniqueName + "'</strong> - " + ex.Message));
                            e.Canceled = true;
                            break;
                        }
                    }
                }
            }
            editedItem.Edit = false;
        }

Help.
Iana Tsolova
Telerik team
 answered on 20 Dec 2010
1 answer
82 views
hi, all
i am using RadGrid in my application , i am binding the grid with database values and my db table contains some real data type field
for those values (real data type field) radgrid displaying wrong
for example :- in my table value is 13.4
my radgrid is showing this value like 13.3987654321

even i used data-format string expression then also it is displaying  wrong value
it's not rounding up that value.
i used following expression
{0:####0.###}
{0:F3}%
{0:000.0}

and the code is below
 <telerik:GridBoundColumn DataField="MinimumQuantityForOrdering" HeaderText="Min. Order Qty "
                                        UniqueName="MinimumQuantityForOrdering" DataFormatString ="{0:F3}%"
                                        AutoPostBackOnFilter="true" CurrentFilterFunction="GreaterThanOrEqualTo">
                                        <ItemStyle HorizontalAlign="Left" />
                                        <HeaderStyle  Width ="10%" Wrap="true" />
                                    </telerik:GridBoundColumn>
Tsvetoslav
Telerik team
 answered on 20 Dec 2010
1 answer
105 views
Hi,
I have a grid, similar to “Grid / User Control Edit Form” sample, and I want to implement confirmation, if user changes value in edit form and accidentally switch to other record without saving, something like this: http://aspnet.4guysfromrolla.com/articles/101304-1.aspx
Perhaps Telerik grid already have something built-in, which I missed? if no – how can I get clientid of textboxes on user control edit form?

Thanks
Alex
Vasil
Telerik team
 answered on 20 Dec 2010
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?