Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
1.0K+ views
I am receiving a dictionary which I am binding to the combobox control. I wrote a loop that iterates through the items collection and changes some flagged items to a separator item. The problem is, if checkboxes are enabled, the seperator also receives a checkbox which sort of defeats the functionality. Is there something I could add to my loop that will disable the checkbox on these items?

Here is an example of the code that I'm using to create the seperators:

public static void FormatList(ref RadComboBox assignees)
{
    for (int i = 0; i < assignees.Items.Count; i++)
    {
        if (assignees.Items[i].Text == "people")
        {
            assignees.Items[i] = new Telerik.Web.UI.RadComboBoxItem("Assign to Person:");
            assignees.Items[i].IsSeparator = true;                   
        }
        if (assignees.Items[i].Text == "group")
        {
            assignees.Items[i] = new Telerik.Web.UI.RadComboBoxItem("Assign to Group:");
            assignees.Items[i].IsSeparator = true;
        }
    }
}
Kalina
Telerik team
 answered on 19 Mar 2012
1 answer
168 views
Hi,

I want to know one thing about Rad Grid. In rad grid, how to generate dynamic and multiple header columns ?
Eyup
Telerik team
 answered on 19 Mar 2012
3 answers
103 views
Dear friend,
for past one month i have been using trail version (Trail Version: RadControls for ASP.NET AJAX Q3 2011 SP1)
of telerik and i have finished the UI design using trail version. last week i have purchased the license version (licensed version : 
Telerik RadControls for ASP.NET AJAX Q1 2012) of the Telerik and installed in my system and removed my exists references of Telerik.Web.UI, Telerik.Web.Design and aTelerik.Web.UI.Skins and added the new references from the licensed version Telerik , after that my screen controls gets totally collapsed.
Textbox's width gets collapsed and spacing b/w the label and textbox gets decreased.
Samples
1.screen shot from Trail Version
2.screen shot from  Licensed Version

why it is happening and how to reform to old standard
thanks in advances.
S.Rajkumar
Galin
Telerik team
 answered on 19 Mar 2012
4 answers
268 views
hi
i am using radcaptcha in a div.
if i validate the radcaptcha on buttons click , the radcaptcha.isvalid is always false..
how can i do this validation?

help me.

thanks in advance.
geetha.
Slav
Telerik team
 answered on 19 Mar 2012
4 answers
112 views
Hello,

I am using a RadGrid and I am binding an Arraylist of type "myClass" (name property, id Property and several boolean properties).  I am using this arrayList as my datasource for the grid and I am using checkbox columns for the boolean properties.

public interface IMyClass
    {     
           int EntityID{get; set; }
        string Name { get; set; }
        bool IsPrivateReader { get; set; }
        bool CanShare { get; set; }
    }

The issue I am having is that when I check a checkbox it does not update the object it is bound to.  Please help.  Here is my grid:

<telerik:RadGrid ID="dg" 
                             runat="server" 
                             AllowSorting="True" 
                             AllowAutomaticUpdates="True"
                             Skin="WebBlue" 
                             EnableAJAX="true" 
                             EnableOutsideScripts="true" 
                             GridLines="None">
             <ClientSettings>
                 <Selecting CellSelectionMode="None" />
             </ClientSettings>
             <MasterTableView AllowAutomaticDeletes="true" AutoGenerateColumns="False" 
                 CommandItemDisplay="None" DataKeyNames="EntityID" Width="100%">
                 <CommandItemSettings ExportToPdfText="Export to PDF" />
                 <RowIndicatorColumn>
                     <HeaderStyle Width="20px" />
                 </RowIndicatorColumn>
                 <ExpandCollapseColumn>
                     <HeaderStyle Width="20px" />
                 </ExpandCollapseColumn>
                 <Columns>
                       
                     <telerik:GridBoundColumn DataField="EntityID" HeaderStyle-HorizontalAlign="Center" HeaderText="Entity ID" ItemStyle-HorizontalAlign="Left" SortExpression="EntityID">
                         <HeaderStyle HorizontalAlign="Center" />
                         <ItemStyle HorizontalAlign="Left" />
                     </telerik:GridBoundColumn>
                     <telerik:GridBoundColumn DataField="Name" HeaderStyle-HorizontalAlign="Center" HeaderText="Name" ItemStyle-HorizontalAlign="Left" SortExpression="Name">
                         <HeaderStyle HorizontalAlign="Center" />
                         <ItemStyle HorizontalAlign="Left" />
                     </telerik:GridBoundColumn>
                     <telerik:GridTemplateColumn headertext="Private Reader" uniquename="PrivateReaderColumn">
                         <itemtemplate>
                             <asp:CheckBox ID="cbxPrivateReader" runat="server" checked='<%# Eval("IsPrivateReader") %>' />
                         </itemtemplate>
                         <edititemtemplate>
                             <asp:CheckBox ID="cbxPrivateReader" runat="server" checked='<%# Bind("IsPrivateReader") %>' />
                         </edititemtemplate>
                     </telerik:GridTemplateColumn>
                     <telerik:GridTemplateColumn headertext="Share" uniquename="SharedColumn">
                         <itemtemplate>
                             <asp:CheckBox ID="cbxShare" runat="server" checked='<%# Eval("CanShare") %>' />
                         </itemtemplate>
                         <edititemtemplate>
                             <asp:CheckBox ID="cbxShare" runat="server" checked='<%# Bind("CanShare") %>' />
                         </edititemtemplate>
                     </telerik:GridTemplateColumn>
                     <telerik:GridTemplateColumn AllowFiltering="true" HeaderText=" " 
                         Reorderable="true" ShowSortIcon="true" SortExpression="Name">
                         <ItemTemplate>
                             <asp:ImageButton ID="btnDelete" runat="server" CausesValidation="False" 
                                 CommandName="DeleteSelected" ImageUrl="~/Images/Delete.gif" 
                                 OnClientClick="return GetUserConfirmForItemDelete(event);" 
                                 ToolTip="Delete Record" />
                         </ItemTemplate>
                     </telerik:GridTemplateColumn>
                 </Columns>
                 <EditFormSettings>
                     <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                     </EditColumn>
                 </EditFormSettings>
             </MasterTableView>
             <FilterMenu EnableTheming="True" Skin="WebBlue">
                 <CollapseAnimation Duration="200" Type="OutQuint" />
             </FilterMenu>
         </telerik:RadGrid>

This is my datasource:

protected void Page_Load(object sender, EventArgs e)
        {
            if(!Page.IsPostBack)
            {
                ViewState["DataSource"]  = new ArrayList();
                SetInitialJavaScriptFunctions();
            }
        }
  
        private ArrayList DataSource { get { return (ArrayList)ViewState["DataSource"]; }


private

 

 

void BindDataGrid(string strSortExpression = "", SortDirection eSortDirection = SortDirection.Ascending)

 

{

     dg.DataSource = DataSource;

     dg.DataBind();

}


What am I missing?

Thanks
Dan Harvey
Top achievements
Rank 2
 answered on 19 Mar 2012
1 answer
133 views
I am using multiple RadComboBoxes to cascade selectable values. I am using the OnClientDropDownClosed client-side event to  fire the server-side ItemsRequested event to populate the next combobox in my sequence. Data for each combobox loads properly, but if I set the EnableCheckAllItemsCheckBox property to true, when I select the next combobox and before the ItemsRequested server-side event fires, I receive the following error:

"Microsoft JScript runtime error: 'this.get_checkAllCheckBoxDivElement().0.offsetHeight' is null or not an object"

Does anyone have any ideas how I can make all of these parts work together?

Thanks for any help.....
Kalina
Telerik team
 answered on 19 Mar 2012
1 answer
99 views
Hi, I have just upgraded to the last asp.net ajax Q1 2012.215, but now I have some problem with the image editor inside to the radeditor.

With the Q3 2011 version everything was working well, but with the new version when I call Image editor from radeditor, the image it is not shown.

It is something like that the Image name is not set, infact if I click on refresh button I will get error because there is not any name on image reference.

It is changed somenthing from Q3 2011? because I can't find any solution to solve this problem.
fforna
Top achievements
Rank 2
 answered on 19 Mar 2012
3 answers
106 views
I am attempting to use the method outlined in this article to access controls defined in an InPlace editor, but have thus far not been able to get it to work. What I'd like to do is to use the value from one RadDatePicker to populate another RadDatePicker. The <script> block appears as it should but, when the event handler is called, the variables are both null.

ASP.Net:
<EditItemTemplate>
    <telerik:RadDatePicker runat="server" ID="txtBidDepartDate" Width="90px" DateInput-DateFormat="ddMMMyy" ClientEvents-OnDateSelected="setBidDate"
        SelectedDate='<%# (Eval("departtime").ToString().Length > 0) ? DateTime.Parse(Eval("departtime").ToString()) : DateTime.Now %>' />
    <telerik:RadMaskedTextBox runat="server" ID="txtBidDepartTime" Width="45px" Mask="##:##" Style="text-align:center;"
        Text='<%# (Eval("departtime").ToString().Length > 0) ? DateTime.Parse(Eval("departtime").ToString()).ToString("HH:mm") : "" %>' />
    <asp:RequiredFieldValidator runat="server" ID="validateTxtBidDepartDate" ControlToValidate="txtBidDepartDate" EnableClientScript="true"
        ErrorMessage="Departure Date is required." ValidationGroup="gridBids" Display="Dynamic" />
    <script language="javascript" type="text/javascript">
        departDateObj = $find('<%# Container.FindControl("txtBidDepartDate").ClientID %>');
    </script>
</EditItemTemplate>

JavaScript:
var departDateObj,arriveDateObj;
function setBidDate (sender, args) {
    if (!departDateObj || !arriveDateObj) return false;
 
    if (!arriveDateObj.isEmpty()) return false;
 
    arriveDateObj.set_selectedDate(departDateObj.get_selectedDate());
}
Vasil
Telerik team
 answered on 19 Mar 2012
4 answers
138 views
I am using a RadRotator control to display a series of images, and each image has a unique target URL that the user is to be redirected to when clicked.

What I encountering is that the ImageButton contains the properties of the last image in the Rotator. When I look at the sender object in the code-behind, the ImageURL and AlternateText property are set to the last image loaded into the Rotator, not the values of the image I clicked.

How can I get this to work ?? I was using a asp:Hyperlink control initially in the RadRotator, but the same problem was occuring.


Here is my code:


                        <telerik:RadRotator ID="RadRotator1" runat="server" DataSourceID="SqlDataSourceHomeImages" FrameDuration="4000" RotatorType="AutomaticAdvance"  >
                            <ItemTemplate>
                                    <asp:ImageButton ID="btnHomePage" runat="server" ImageUrl='<%# "images/" & Eval("hpi_image")%>'  AlternateText='<%# Eval("hpi_URL") %>' OnClick="btnHomePage_Click"/>
                                      </ItemTemplate>
                        </telerik:RadRotator>

                        <asp:SqlDataSource ID="SqlDataSourceHomeImages" runat="server" ConnectionString="<%$ ConnectionStrings:WebDB_string.com%>"
                                SelectCommand="SELECT hpi_image, hpi_URL, hpi_external FROM tbl_HomeImages WHERE hpi_show_on_web = 'True' ORDER BY hpi_sort_order">
                        </asp:SqlDataSource>

And here is the Click event from the code-behind:

   Protected Sub btnHomePage_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs)

        Response.Redirect(sender.AlternateText)

    End Sub

Very simple, and it should work. But it doesn't and it's driving me crazy !!

Thanks !

Bruce

Bruce
Top achievements
Rank 1
 answered on 19 Mar 2012
1 answer
126 views
Hello,
I would like to make an ImageRotator that display a picturs existe in a sqlserver database without using a webservice, how can i do it step by step please  ?
Thankx

Slav
Telerik team
 answered on 19 Mar 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?