Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
95 views
Hi,

We are using RAD Editor for SharePoint version 6.1.7 in SharePoint 2010, after editing the content using some formatting from the toolbar working fine.

But especially with the dropdown values after formatting when the cursor is at the formatted text, If the dropdown (ex. Font Name) that is selected is wrapping on to the next line instead of truncating within the dropdown

This behaviour is not happeing in v 5.3.2 when used within the 2007 Environment

Attaching the screenshot of 5.3.2 and 6.1.7 versions

Thanks
-Roopesh
Rumen
Telerik team
 answered on 19 Dec 2011
12 answers
540 views

I have created a dynamic grid in one of my forms that I am binding to a Datatable. What I want to know is how to add a Delete column, Iv enabled AllowAutomaticDeletes on my gridhow can I dynamically add a GridButtonColumn (its what I have used in all other pages in the app) and assign it to be the Right most column in the grid.  I am adding it in my LoadGrid function, please look at the code, it adds column to the left side of all the columns that are generated and also does not show the Delete image called by the css class "MyImageButton" ??

 

DeleteColumn.ItemStyle.CssClass =

 

"MyImageButton";

I also added code to rebind to the grid in the NeedDataSource event as I read that for dynamically generated grids, the grid needs to be pulled from this event as well. But im adding the GridButtonColumn in the LoadGrid function only and this is called on (!Page.IsPostback). Can someone please tell me the correct way of adding a GridButtonColumn to a dynamically generated grid and how to get the correct order, the right most column and also any insight as to why the "MyImageButton" is not being loaded from codebehind? its working fine on other pages where i define all columns in the aspx page. Please let me know, your helps appreciated.

 

private void LoadGrid()
        {
            try
            {
                  
                GridButtonColumn DeleteColumn = new GridButtonColumn();
                ProuductsGrid.Columns.Add(DeleteColumn);
                DeleteColumn.ButtonType = GridButtonColumnType.ImageButton;
                DeleteColumn.Text = "Delete";
                DeleteColumn.ConfirmDialogType = GridConfirmDialogType.RadWindow; 
                DeleteColumn.ConfirmTitle = "Delete";
                DeleteColumn.ConfirmText = "Delete this Product?";
                DeleteColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Center;
                DeleteColumn.ItemStyle.CssClass = "MyImageButton";
  
              ProductBL bl = new ProductBL();
              ProuductsGrid.DataSource = bl.GetProductsByClient((Int32)Session["ClientID"]);
              Product.DataBind();
               }
          }
           
          
         protected void ProductGrid_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            try
            {
              ProductBL bl = new ProductBL();
              ProuductsGrid.DataSource = bl.GetProductsByClient((Int32)Session["ClientID"]);
             Product.DataBind();
            }
            catch (Exception ex)
            {
          throw;
            }
      
        }
}
  

Sebastian
Telerik team
 answered on 19 Dec 2011
2 answers
263 views
Hi!

I need to add a CheckBox to select/deselect all items in a CheckBoxList. The CheckBoxList is in the RadGrid's FormTemplate. My code is like this:
<telerik:RadGrid ID="RadGrid1" runat="server" ... >
   ...
   <MasterTableView ...>
      ...
      <EditFormSettings EditFormType="Template">
         <EditColumn UniqueName="EditCommandColumn1"></EditColumn>
         <FormTemplate>
            <table class="edit-table-rad" cellspacing="2" cellpadding="1" width="100%" border="0">
               ...
               <tr>
                  <td align="left" width="200px">
                     <b>Languages:</b><br />
                     <asp:CheckBox ID="chbSelectAllLanguage" runat="server"
                                   Text="Select All"
                                   ClientIDMode="Static"/>
                  </td>
                  <td>
                     <asp:CheckBoxList ID="cblLanguage" runat="server"
                                       DataSourceID="entityDataSourceLanguage"
                                       DataTextField="LanguageName"
                                       DataValueField="LanguageID"
                                       RepeatColumns="4">
                     </asp:CheckBoxList>
                  </td>
               </tr>
               ...
            </table>
         </FormTemplate>
      </EditFormSettings>
   </MasterTableView>
</telerik:RadGrid>

I tried to get the CheckBox with jQuery by ID or cssclass, but I think that the CheckBox in the RadGrid's FormTemplate is not in the DOM at document.ready time.

Is there a way to select/deselect all CheckBoxList items by selecting/deselecting the single CheckBox in the FormTemplate?
Nikola
Top achievements
Rank 1
 answered on 19 Dec 2011
2 answers
66 views
I am using the tabstrip in a control to switch between multiple pages. All of the pages except for 2 of them work fine. The 2 that don't work either give the following error or rip out the second line of tabs. I don't know what the problem is.

The snippet of code referenced in this error is the only code behind dealing with the tabstrip. On the aspx page I register the control and then reference it.


Besides that error it should display this.

But once I click on the Initial DD (Inv) or Ratings after clicking back from the error it looks like this. (Ripped out the middle line of tabs)

Here is the code for the control containing the TabStrip. The property at the bottom is what the pages use to set the select tab.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load       
If
Not Page.IsPostBack Then
 
            Dim tabSummary As New RadTab()
            tabSummary.Text = "Summary"
            tabSummary.NavigateUrl = "~/Funds/fundSummary.aspx?feederFundID=" & Request.QueryString("feederFundID")
            tabSummary.Enabled = True
            rtsFundTopNav.Tabs.Add(tabSummary)
 
 
            Dim tabProfile As New RadTab()
            tabProfile.Text = "Profile"
            tabProfile.NavigateUrl = "~/Funds/fundProfile.aspx?feederFundID=" & Request.QueryString("feederFundID")
            rtsFundTopNav.Tabs.Add(tabProfile)
 
            Dim tabPerformance As New RadTab()
            tabPerformance.Text = "Performance"
            tabPerformance.NavigateUrl = "~/Funds/fundPerformance.aspx?feederFundID=" & Request.QueryString("feederFundID")
            tabPerformance.Enabled = False
            rtsFundTopNav.Tabs.Add(tabPerformance)
 
            Dim tabRisk As New RadTab()
            tabRisk.Text = "Risk"
            tabRisk.NavigateUrl = "~/Funds/fundRisk.aspx?feederFundID=" & Request.QueryString("feederFundID")
            rtsFundTopNav.Tabs.Add(tabRisk)
 
            Dim tabPortfolio As New RadTab()
            tabPortfolio.Text = "Portfolio"
            tabPortfolio.NavigateUrl = "~/Funds/fundPortfolio.aspx?feederFundID=" & Request.QueryString("feederFundID")
            tabPortfolio.Enabled = False
            rtsFundTopNav.Tabs.Add(tabPortfolio)
 
            Dim tabExposure As New RadTab()
            tabExposure.Text = "Exposure"
            tabExposure.NavigateUrl = "~/Funds/fundExposure.aspx?feederFundID=" & Request.QueryString("feederFundID")
            tabExposure.Enabled = False
            tabExposure.IsBreak = True
            rtsFundTopNav.Tabs.Add(tabExposure)
 
            Dim tabFundReports As New RadTab()
            tabFundReports.Text = "Fund Reports"
            tabFundReports.NavigateUrl = "~/Funds/fundReports.aspx?feederFundID=" & Request.QueryString("feederFundID")
            rtsFundTopNav.Tabs.Add(tabFundReports)
 
            Dim tabFundDocuments As New RadTab()
            tabFundDocuments.Text = "Fund Documents"
            tabFundDocuments.NavigateUrl = "~/Funds/fundDocuments.aspx?feederFundID=" & Request.QueryString("feederFundID")
            rtsFundTopNav.Tabs.Add(tabFundDocuments)
 
            Dim tabContacts As New RadTab()
            tabContacts.Text = "Contacts"
            tabContacts.NavigateUrl = "~/Funds/fundContacts.aspx?feederFundID=" & Request.QueryString("feederFundID")
            rtsFundTopNav.Tabs.Add(tabContacts)
 
            Dim tabCommunications As New RadTab()
            tabCommunications.Text = "Calls and Meetings"
            tabCommunications.NavigateUrl = "~/Funds/fundCommunications.aspx?feederFundID=" & Request.QueryString("feederFundID")
            rtsFundTopNav.Tabs.Add(tabCommunications)
 
            Dim tabTasks As New RadTab()
            tabTasks.Text = "Tasks"
            tabTasks.NavigateUrl = "~/Funds/fundTasks.aspx?feederFundID=" & Request.QueryString("feederFundID")
            rtsFundTopNav.Tabs.Add(tabTasks)
 
            Dim tabHistory As New RadTab()
            tabHistory.Text = "History"
            tabHistory.NavigateUrl = "~/Funds/fundHistory.aspx?feederFundID=" & Request.QueryString("feederFundID")
            rtsFundTopNav.Tabs.Add(tabHistory)
 
            Dim tabAccounting As New RadTab()
            tabAccounting.Text = "Accounting"
            tabAccounting.NavigateUrl = "~/Funds/fundAccounting.aspx?feederFundID=" & Request.QueryString("feederFundID")
            tabAccounting.IsBreak = True
            rtsFundTopNav.Tabs.Add(tabAccounting)
            '--------------------------------------------------
            'Tabs in Question
            '--------------------------------------------------
            Dim tabInitialIDD As New RadTab()
            tabInitialIDD.Text = "Initial DD (Inv)"
            tabInitialIDD.NavigateUrl = "~/Funds/MasterFunds/DueDiligence/initialIDD.aspx?masterFundID=" & masterFundID
            rtsFundTopNav.Tabs.Add(tabInitialIDD)
 
            Dim tabRatings As New RadTab()
            tabRatings.Text = "Ratings"
            tabRatings.NavigateUrl = "~/Funds/MasterFunds/DueDiligence/ratingSummary.aspx?masterFundID=" & masterFundID
            tabRatings.Enabled = True
            rtsFundTopNav.Tabs.Add(tabRatings)
            '---------------------------------------------------
            Dim tabAFSReviews As New RadTab()
            tabAFSReviews.Text = "AFS Reviews"
            tabAFSReviews.NavigateUrl = "~/Funds/DueDiligence/afsReviews.aspx?feederFundID=" & Request.QueryString("feederFundID")
            tabAFSReviews.Enabled = False
            rtsFundTopNav.Tabs.Add(tabAFSReviews)
 
            Dim tabInitialODD As New RadTab()
            tabInitialODD.Text = "Initial DD (Ops)"
            tabInitialODD.NavigateUrl = "~/Funds/DueDiligence/initialODD.aspx?feederFundID=" & Request.QueryString("feederFundID")
            If fundType <> "Private Equity" And fundType <> "Hedge Fund" Then
                tabInitialODD.Enabled = False
            End If
            rtsFundTopNav.Tabs.Add(tabInitialODD)
 
            Dim tabOngoingDD As New RadTab()
            tabOngoingDD.Text = "Ongoing DD (Ops)"
            tabOngoingDD.NavigateUrl = "~/Funds/DueDiligence/ongoingODD.aspx?feederFundID=" & Request.QueryString("feederFundID")
            rtsFundTopNav.Tabs.Add(tabOngoingDD)
 
 
            If IsNumeric(Request.QueryString("selectedTab")) Then
                rtsFundTopNav.SelectedIndex = Request.QueryString("selectedTab")
            Else
                rtsFundTopNav.SelectedIndex = 0
            End If
 
        End If
    Else
        Response.Clear()
        Response.Redirect("../default.aspx")
        Response.End()
    End If
 
End Sub
 
Public WriteOnly Property activeTab() As String
    Set(ByVal value As String)
        rtsFundTopNav.Tabs.FindTabByText(value).Selected = True
    End Set
End Property

Here is the markup.
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<div class="announcementHeader">
    <asp:Label runat="server" ID="lblFundLegalName" />
</div>
<telerik:RadTabStrip ID="rtsFundTopNav" runat="server" />

Any help would be greatly appreciated.

Thanks,
Lonnie
Kate
Telerik team
 answered on 19 Dec 2011
3 answers
108 views
Hello All,

I am working on with the TextChanged property of RadCombo box, when I type something in the box and press tab key it works as expected, but when I delete few letters from the text and press tab key to proceed the textchanged property will not triggered. I also have the AllowCustomText="true" in the combobox and first character matching allowed by   : 
 ddlVessel.Filter = (RadComboBoxFilter)Convert.ToInt32(2);

Dimitar Terziev
Telerik team
 answered on 19 Dec 2011
3 answers
74 views
I feel like I'm missing something here, but I can't seem to get a pair of related comboboxes working. 

When I select something in the primary combo, I get the proper callback, and everything seems to flow correctly.  I threw an alert in the javascript "ItemsLoaded", and the secondary combo has items.  But when the secondary drop down opens, it is blank.  Empty.  Nada.

Grrrr.  Here's the code:

From ucOffenseEdit.ascx (user control for a RadGrid edit/add), the ComboBoxes themselves:

<table cellpadding="0" cellspacing="4" class="InnerContents" width="100%">
  <tr>
    <td style="vertical-align: top" colspan="4">
      <asp:Label ID="lblUCRCode" 
        runat="server" 
        CssClass="FieldLabel" 
        Text="UCR Code" />
      <br />
      <telerik:RadComboBox ID="fldUCRCode" 
        runat="server" 
        Width="400px" 
        Height="168px"
        SkinID="NoSizing" 
        Filter="contains" 
        SelectedValue='<%# Eval("UCRCodeID") %>' 
        OnClientLoad="ComboSetFocus" 
        OnClientSelectedIndexChanging="loadOptionalUCRCodes" 
        OnItemsRequested="fldUCRCode_ItemsRequested" />
        <br />
    </td>
  </tr>
  <tr>
    <td style="vertical-align: top" colspan="4">
      <asp:Label ID="lblUCROptionalDetailCode" 
        runat="server" 
        CssClass="FieldLabel" 
        Text="Optional Detail Code" />
      <br />
      <telerik:RadComboBox ID="fldUCROptionalDetailCode" 
        runat="server"
        EnableViewState="false"
        Width="400px" 
        Height="168px"
        SkinID="NoSizing" 
        Filter="contains" 
        SelectedValue='<%# Eval("UCRCodeID") %>' 
        OnClientItemsRequested="ItemsLoaded"
        OnItemsRequested="fldUCROptionalDetailCode_ItemsRequested" />
    </td>
  </tr>
  
... etc.
  
</table>

Now the javascript.  For simplicity sake, I'm putting it right in the page where the RadGrid lives.  Eventually (when it works), I'll emit it from the user control's codebehind:

function loadOptionalUCRCodes(sender, eventArgs) {
  var id = sender.get_id();
  var optionalCombo = $find(id.substring(0, id.length - 10) + "fldUCROptionalDetailCode");
  var item = eventArgs.get_item();
  optionalCombo.set_text("Loading...");
  // if a UCR Code is selected...
  if (item.get_index() > 0) {
    // ...load the optional combo
    optionalCombo.requestItems(item.get_value(), false);
  } else {
    optionalCombo.set_text(" ");
    optionalCombo.clearItems();
  }
}
function ItemsLoaded(sender, eventArgs) {
  if (sender.get_items().get_count() > 0) {
    // pre-select the first item
    sender.set_text(sender.get_items().getItem(0).get_text());
    sender.get_items().getItem(0).highlight();
  }
  sender.showDropDown();
}

Finally, the codebehind from the user control:

protected void Page_Load(object sender, EventArgs e) {
  LoadUCRCodes();
  if (!Page.IsCallback) { LoadOptionalUCRCodes(fldUCRCode.SelectedValue); }
}
protected void fldUCRCode_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e) {
  LoadUCRCodes();
}
protected void fldUCROptionalDetailCode_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e) {
  //passes the value of the UCRCode
  LoadOptionalUCRCodes(e.Text);
}
  
protected void LoadUCRCodes() {
  if (fldUCRCode.Items.Count == 0) {
    fldUCRCode.Items.Add(new Telerik.Web.UI.RadComboBoxItem(string.Empty, "-1"));
    foreach (DAL.LookupClasses.INCUCRCodeLookupItem l in Lookups.INC.UCRCode.AllItems) {
      if (!l.Parent.HasValue) {
        fldUCRCode.Items.Add(new Telerik.Web.UI.RadComboBoxItem(l.DropDownText, l.ID.ToString()));
      }
    }
  }
}
protected void LoadOptionalUCRCodes(string UCRCodeID) {
  fldUCROptionalDetailCode.Items.Clear();
  if (fldUCROptionalDetailCode.Items.Count == 0) {
    fldUCROptionalDetailCode.Items.Add(new Telerik.Web.UI.RadComboBoxItem(string.Empty, "-1"));
    foreach (DAL.LookupClasses.INCUCRCodeLookupItem l in Lookups.INC.UCRCode.AllItems) {
      if (l.Parent.HasValue) {
        if (l.Parent.ToString() == UCRCodeID) {
          fldUCROptionalDetailCode.Items.Add(new Telerik.Web.UI.RadComboBoxItem(l.DropDownText, l.ID.ToString()));
        }
      }
    }
  }
}
Dimitar Terziev
Telerik team
 answered on 19 Dec 2011
1 answer
76 views

I have a RadComboBox that displays a grid filtered on user input.  After 2 characters the grid is filtered and displayed for the user to select from. 

The RadComboBox works fine until I place it in a RadPanelBar RadPanelItem. Then when the second character is typed the grid is filtered and displayed, but immediately closes. 

I couldn't figure it out and finally replaced the RadComboBox with jQuery Autocomplete widget.  The exact same thing happens.  When the user types in the second character the dropdown appears but then is immediately closed.  Clicking on the icon displays the list just fine.

Is there a setting for RadPanelBar that I am not getting?

Dimitar Terziev
Telerik team
 answered on 19 Dec 2011
1 answer
93 views

I have a table with several nvarchar(max) fields that have HTML in them.  I want to show the first bit of the text in a column in a RadGrid so the user can filter on the column.  But when I put the column in as the last column on the right, the right part of the text is cut off.  It does not obey the HeaderStyle Width property or the Height property.

<telerik:GridBoundColumn DataField="interesting"
    FilterControlAltText="Filter interesting column" HeaderText="interesting"
    SortExpression="interesting" UniqueName="interesting" Visible="True">
    <HeaderStyle Width="100px" />
</telerik:GridBoundColumn>

I tried changing the column to an HTMLEditor column, even though this grid is READ ONLY.  Didn't change anything.

<telerik:GridHTMLEditorColumn DataField="interesting"
    FilterControlAltText="Filter interesting column" HeaderText="interesting"
    SortExpression="interesting" UniqueName="interesting" Visible="True">
    <HeaderStyle Width="100px" />
</telerik:GridHTMLEditorColumn>

I tried using a separate column editor and it also didn't change anything.

<telerik:GridHTMLEditorColumnEditor ID="GridHTMLEditor" runat="server">
        <Editor runat="server" Height="50px" Width="100px"><Content>
        </Content>
        </Editor>
</telerik:GridHTMLEditorColumnEditor>

Even worse, when this column is in the grid, it causes other regular text columns to NOT obey their width settings. i.e. If I have the code below, then the second column is NOT rendered at 300px.  This is really messed up and I don't know what else to do.

  <telerik:GridHTMLEditorColumn DataField="interesting"
     FilterControlAltText="Filter interesting column" HeaderText="interesting"
     SortExpression="interesting" UniqueName="interesting" Visible="True">
     <HeaderStyle Width="100px" />
 </telerik:GridHTMLEditorColumn>
<telerik:GridBoundColumn DataField="comname"
     FilterControlAltText="Filter comname column" HeaderText="Common Name"
     SortExpression="comname" UniqueName="comname">
     <HeaderStyle Width="300px" />
 </telerik:GridBoundColumn>

Mira
Telerik team
 answered on 19 Dec 2011
3 answers
208 views
HI there,

I am using the RadEditor to allow my users to edit the content that they would like to post to their website.  I just saw the new Format Code Block dialog and was hoping that I could use that to allow them to enter specific CSS styles or javascript that they wanted to use on a particular page.  However, the code block just displays on their content page along with all the other rendered html.

Am I missing something or is this dialog only intended to be used for things like this forum where people can submit code snippets?  The examples that I can find only show how to use the dialog within the editor, not how those code blocks can actually be used to render the html differently (i.e. assigning styles).

I hope that I am explaining myself clearly.  Thanks in advance for your help.
Dan
Rumen
Telerik team
 answered on 19 Dec 2011
2 answers
185 views
How to write the telerik:GridTemplateColumn for edit button in code behind for a RadGrid ?

and

my code in design is below

<telerik:GridTemplateColumn>
                            <EditItemTemplate>
                                <asp:LinkButton ID="lnkUpdate" runat="server" CssClass="checkIcon" CommandName="Update" style="position:relative;float:left;"></asp:LinkButton>
                                <asp:LinkButton ID="lnkCancel" runat="server" CssClass="buttonClose1" CommandName="Cancel" style="position:relative;float:left;padding-left:5px;"></asp:LinkButton>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:LinkButton ID="lnkEdit" runat="server" CssClass="buttonEdit1" CommandName="Edit"></asp:LinkButton>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>


Now i want the above thing to be written in code behind?
Jayesh Goyani
Top achievements
Rank 2
 answered on 19 Dec 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?