Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
215 views
I have a RadMenu component with images set against it.  It is vertically aligned and I need to have the corresponding item text be middle-aligned vertically. 

Thank you.
Shinu
Top achievements
Rank 2
 answered on 27 Sep 2011
2 answers
93 views
I have an issue with a RadMenu on my master page where it appears to be going to the next line.  It's a data-driven menu and there seems to be a specific width where it rolls over to the next line.  I want it to line up across the page and not roll over to the next line.  Is there a maximum width setting anywhere that I am missing?  Thanks.
Marty
Top achievements
Rank 1
 answered on 27 Sep 2011
2 answers
94 views
Hello

I am having radgrid.
I want to show a checkbox before each row.
I am having a delete button outside the grid.
Selected checkboxes rows should be deleted when user clicks on Delete button.
my primary key is LicenseId, by using this i want to delete the selected checkbox row.



Can you please continue my code to achieve the functionality?

aspx page:



CODE BEHIND :

protected void btnDelete_Click(object sender, EventArgs e)

    {

        StringBuilder sb = new StringBuilder();

        bool flg = false;

        foreach (GridDataItem row in Grid.MasterTableView.Items)

        {

            CheckBox cb = (CheckBox)row.FindControl("ChkDelete");

            if (cb.Checked)

            {

                if (flg)

                {

                    sb.Append(",");

                }

                else

                {

                    flg = true;

                }

                

sb.Append(row.OwnerTableView.DataKeyValues[row.RowIndex]["LicenseId"].ToString());

               

               

            }

        }



i am getting error in the line, is there anyone other way to acheive this functionality??
sb.Append(row.OwnerTableView.DataKeyValues[row.RowIndex]["LicenseId"].ToString()); 
this is the error "array index outofbounds" in foreach i am getting only 4, but in the above line it is showing 8...

can anyone please help me  out. thanks.,
goutam
Top achievements
Rank 1
 answered on 27 Sep 2011
4 answers
108 views
I posted this question before, but somehow I cannot find my post. I am exporting the grid to ms word. On each page of my Ms word dosumnet , I want the header to say "This is a Draft data".

How can I do this.

Thanks.
Bruno
Top achievements
Rank 2
 answered on 26 Sep 2011
9 answers
397 views
Looking at the examples at http://www.telerik.com/help/aspnet-ajax/grid-understanding-hierarchy.html and at http://www.telerik.com/help/aspnet-ajax/grid-programmatic-creation.html seems to imply that the DetailTables at the same level in a RadGrid hierarchy must all share that same layout. For example, for a 3-level hierarchy:

MasterTableView
+Item(0)
DetailTable0(copy0)
+Item(0)
DetailTable00(copy0)
+Item(0)
+Item(1)
+Item(2)
...
+Item(1)
DetailTable00(copy1)
+Item(0)
+Item(1)
+Item(2)
...

...
...

The DetailTables look like they need to be copies of each other, implying their items share the same layout (column names/number, etc).

Is there an easy way to allow the 3rd level of the hierarchy (the DetailTable00 items) to have different # of columns? The structure I want is like this:

Type1 - (Name, Comments)
Category1 - (Name, Comments)
Item1 - (Name, Yes, No, Comments)
Item2 - (Name, Yes, No, Comments)
...
Category2 - (Name, Comments)
Item1 - (Name, Low, Mid, High, Comments)
Item2 - (Name, Low, Mid, High, Comments)
...
...
Type2 - (Name, Comments)
Category1 - (Name, Comments)
Item1 - (Name, Date, Comments)
Item2 - (Name, Date, Comments)
...
...
...

Type and Category columns will be the same, but the items within each CategoryX could have a slightly different layout compared to another category (because there will be columns for a scale rating, and the scale type can vary depending on the category!). Each category's items would be homogeneous, of course; the variation would be between categories.

Can I accomplish something like this without too much complication?
Pavlina
Telerik team
 answered on 26 Sep 2011
5 answers
189 views
I'm using 2 listboxes and transferring items between the two.  I have an item template on the destination listbox with a label and a databound dropdownlist.  I move items to the destination LB, then choose a selection for each dropdown item.  If I then transfer another item from source LB to destination LB, the dropdown selections are all lost (selected index becomes 0 again).
The issue lies in the sort itself, because if I comment out the sort method, the dropdowns retain their selection after a transfer.
Here is the listbox item transferred event code I'm using.  If I comment out the first 4 lines of the method, the selections are retained.  The foreach statement is apparently required in order to make the items in the itemtemplate display properly.

protected void lbAdv_Rosters_Transferred(object sender, RadListBoxTransferredEventArgs e)
    {
        lbAdv_ChosenRosters.Sort = RadListBoxSort.Ascending;
        lbAdv_ChosenRosters.SortItems();
        lbAdv_Rosters.Sort = RadListBoxSort.Ascending;
        lbAdv_Rosters.SortItems();

        foreach (RadListBoxItem item in e.Items)
        {
            item.DataBind();
        }
    }

I'm using version 2010.3.1317.35.  Thanks in advance!
Scott
Top achievements
Rank 1
 answered on 26 Sep 2011
2 answers
51 views
Does anyone have an example of using a context menu that opens on button click within a RadGrid?  Currently the grid I have has 5 button columns with a new request to add 2 new commands, and they're starting to take up a large amount of grid real estate.  What I'd like to do is just have a button as the first column of the grid, and when clicked a context menu opens with the 7 available commands, and haven't been able to find an example of this being done.  Can someone point me in the right direction?

Thanks!
Matt DiPietro
Top achievements
Rank 1
 answered on 26 Sep 2011
1 answer
228 views
Hello,

I have a RadListBox that is will only allow multiple selection. I have Selectionmode="Single" set but that does not work. I have also tried some Javascript with no luck. Obviously this is a bug but what can I do hear to get the selection mode to single.

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DataMigration.ascx.cs"
    Inherits="PDS.DataMigration1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<style type="text/css">
    .style8
    {
        color: #FFFFFF;
    }
</style>
<telerik:RadScriptBlock ID="ScriptBlock" runat="server">
<script type="text/javascript">
  
    function reMigrate()
    {
        var button = $find("<%= rb_Migrate.ClientID %>");
        button.click();
    }
</script>
</telerik:RadScriptBlock>
<div style="text-align: center; width: 100%">
    <div style="text-align: left">
        <div style="text-align: center; width: 700px; margin-top: 40px">
            <asp:Panel ID="Panel2" runat="server" Width="650px" Height="450px" BackColor="#62768A">
                <span class="style8">
                    <label>
                        Select Dealership</label></span>
                <br />
                <telerik:RadComboBox runat="server" ID="rcb_Dealerships" Width="280px" AutoPostBack="true"
                    EnableEmbeddedSkins="false" OnDataBinding="rcb_Dealerships_DataBinding" OnSelectedIndexChanged="rcb_Dealerships_SelectedIndexChanged">
                </telerik:RadComboBox>
                <br />
                <br />
                <span class="style8">
                    <label style="text-align: left">
                        Select Accounts</label></span>
                <br />
                <telerik:RadListBox ID="rlb_Accounts" runat="server" Width="600px" Height="300px" CheckBoxes="true" EnableEmbeddedSkins="false"
                BackColor="#E1EAF2" BorderColor="#E1EAF2" style="text-align: left" AutoPostBack="true" SelectionMode="Single" >
                </telerik:RadListBox>
                <br />
                <br />
                <telerik:RadButton ID="rb_Migrate" runat="server" Width="150px" Text="Migrate Accounts"
                    Skin="WebBlue" BackColor="#33393E" ForeColor="Black" OnClick="rb_Migrate_Click">
                </telerik:RadButton>
                <telerik:RadWindowManager ID="RadWindowManager1" runat="server" 
                    EnableEmbeddedSkins="false" EnableViewState="false" >
                    <%--<Windows>
                    <telerik:RadWindow runat="server" ID="ProductWin">
                    </telerik:RadWindow>
                    </Windows>--%>
                </telerik:RadWindowManager>
                <br />
                <cc1:RoundedCornersExtender ID="RoundedCornersExtender2" runat="server" TargetControlID="Panel2"
                    Radius="9">
                </cc1:RoundedCornersExtender>
            </asp:Panel>
        </div>
    </div>
</div>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="WebBlue">
</telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="Panel2">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="Panel2" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="GridPanel">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="GridPanel" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>
James
Top achievements
Rank 1
 answered on 26 Sep 2011
2 answers
133 views
I must be doing something wrong because I am having a really hard time trying to get the value of a check box in edit mode. I want the check box to be disabled if the value is true. With my code as it is now, it is always false. What am I doing wrong?

protected void RadGrid1_Test(object sender, GridItemEventArgs e)
{
    if (e.Item is GridEditFormItem && e.Item.IsInEditMode)
    {
        GridEditFormItem edititem = (GridEditFormItem)e.Item;
 
        CheckBox movedtobs_chk = edititem["MovedToBS"].Controls[0] as CheckBox;
        Boolean flag = movedtobs_chk.Checked;
 
        //my issue is this flag is always false even when the checkbox is checked.
        if (flag == true)
        {
            movedtobs_chk.Enabled = false;
        }
 
 
    }
}


Najid Hanif
Top achievements
Rank 2
 answered on 26 Sep 2011
2 answers
258 views
How can I disable Constrain Proportions button, Swap button, and Aspect Radio dropdown from the crop image pop up? I have seen this link but that didnt help me about disabling those...

http://www.telerik.com/community/forums/aspnet-ajax/image-editor/crop-dialog-using-static-width-height.aspx

Mark
Top achievements
Rank 1
 answered on 26 Sep 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?