Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
68 views
     Hello,
I have a grid with the same parameters:

<table style="width:1024px">
<tr>
<td>
    <telerik:RadGrid ID="rgrSearchClients" runat="server" 
        CellSpacing="0" GridLines="None"  AllowPaging="True" 
        AllowCustomPaging="True" VirtualItemCount="10000"  PageSize="15"
        ShowStatusBar="True" onneeddatasource="RadGrid1_NeedDataSource" 
        Culture="ru-RU"  Visible="False" 
        EnableHeaderContextMenu="True" AutoGenerateColumns="false" 
        HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left" 
        AlternatingItemStyle-HorizontalAlign="Left" 
        onitemcommand="rgrSearchClients_ItemCommand" 
        >
        <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">
            <Selecting AllowRowSelect="True" />
           <ClientEvents OnRowDblClick="RowDblClick"   />           
            <Resizing AllowColumnResize="True" ResizeGridOnColumnResize="true" />            
        </ClientSettings>

<AlternatingItemStyle HorizontalAlign="Left"></AlternatingItemStyle>

<MasterTableView NoMasterRecordsText="По вашему запросу ничего не найдено.">

    <Columns>
    <telerik:GridBoundColumn HeaderText="ID"  DataField="ID" 
            Groupable="False" Display="false">

        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn HeaderText="GID"  DataField="GID" 
            Groupable="False">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn HeaderText="SSCODE"  DataField="SSCODE" Groupable="False" >
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn HeaderText="ShortName"  
            DataField="SHORT_NAME" Groupable="False" >     
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn HeaderText="FullName"  
            DataField="FULL_NAME" Groupable="False" >
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn HeaderText="RegName" DataField="REG_NAME" 
            Groupable="False">
        </telerik:GridBoundColumn>       
       <telerik:GridBoundColumn HeaderText="Address" DataField="ADSRESS_MAIN" 
            Groupable="False" >
        </telerik:GridBoundColumn>
    </Columns>
</MasterTableView>

<HeaderStyle HorizontalAlign="Center"></HeaderStyle>

<ItemStyle HorizontalAlign="Left"></ItemStyle>

    <PagerStyle Mode="NumericPages" />

    </telerik:RadGrid>
</td>
</tr>
</table>


Everything works normally when I use built-in Visual Studio web server. But when I publish project to IIS, it`s work strange on reordering columns:
For example, I want to reordel Column2(width=100px) and Column5(width=200px). When I drag and drop Column5 before Column2, columns exchange possitions but Column5 have size 100px and Column2 have size 200px.   I try different combination of Grid properties, such as <MasterTable TableLayout="fixed",   fixed <Colunn... HeaderStyle-Width="100px", but nothing help me.
Angel Petrov
Telerik team
 answered on 05 Mar 2013
2 answers
263 views
Hi,

I upgraded my telerik Controls to the latest version. I was changing the new skin to work like the old skins I had created for my app.
However for some things the styles were getting overwritten by styles specified in WebResource.axd.
I want to apply only the styles that I have specified in my css.

Please let me know what I am doing wrong.
I have pasted below my old css for the grid and Input. If you can help me convert the css so it works exactly like the old one I would appreciate that. Unfortunately, I am not a css person so I I am finiding it very difficult to make it run like the old css.

It would be very helpful if you provided a tool that could convert the old css to the new css.

Grid:
  
/* Telerik RadGrid Telerik / embedded skin */
  
.RadGrid_MLightning
{
    background: #F9F9F9;    
}
  
.RadGrid_MLightning,
.RadGrid_MLightning table,
.GridFilterMenu_MLightning table
{
    font: normal 9pt Tahoma;    
      
}
  
.MasterTable_MLightning
{
    border: 0px !important;
    border-collapse: separate !important;
    color: #000;
      
    /*-moz-user-select: none;*/ /*disables text selecting in Firefox to combat unpleasant visual appearance*/
}
  
  
  
.MasterTable_MLightning td
{   
    padding:0px 0px 7px 0px;
      
    border-right :0px;
}
  
.MasterTable_MLightning th
{
    background:#ffffff;
    text-align: left;
}
  
.RadGrid_MLightning td,
.RadGrid_MLightning td a
    color: #000;    
}
  
  
  
th.GridHeader_MLightning, th.ResizeHeader_MLightning
{
    background: #003e7e repeat-x 0 100%;
    border-right: solid 1px #FFFFFF;
    border-bottom: solid 1px #003e7e;
    border-top: solid 1px #003e7e;
    height: 16px;
    color: #ffffff;
    font-family:Tahoma;
}
  
th.GridHeader_MLightning,
th.ResizeHeader_MLightning
{
    padding:3px;
}
  
.GridHeader_MLightning a
{
    color: #ffffff;
    text-decoration: none;
}
  
td.GridHeader_MLightning input
{
    float: left;
    border: solid 1px #666;
    background: #fafafa;
    font: bold 11px Verdana, Arial, Sans-serif;
    color: #989cb0;
    height: 20px;
    vertical-align:middle;
}
  
.GridFilterRow_MLightning td
{
    border-left: 1px solid #f9f9f9; 
    background-color: #8FBCD1;  
    empty-cells: hide;
    text-align:center;
    height: 16px;
    padding:0px 0px 0px 0px;
}
  
.GridRow_MLightning td,
.GridAltRow_MLightning td,
.SelectedRow_MLightning td,
.ActiveRow_MLightning td,
.GridEditRow_MLightning td
{
    padding-top:2px;
    padding-bottom:2px;
}
.GridRow_MLightning
{
    background: #ffffff;
}
  
.GridRow_MLightning td
{
    white-space: normal;
    text-align: center;
    color: #898a8c;
    font-family: Tahoma;
    font-size: 8pt;
    padding: 10px 0px 10px 0px;
    border: solid 1px #C4C4C4;
      
}
  
.GridRow_MLightning td div
{
    text-align: left;
    padding-left: 5px;
}
  
.GridRow_MLightning td a
{
    color: #73abc9;
    font-family:Tahoma;
    font-size:8pt;
}
  
  
.GridAltRow_MLightning
{
    background: #ffffff;
}
.GridAltRow_MLightning td
{
    white-space:normal;     
    text-align: center;
    color:#898a8c;
    font-family:Tahoma;
    font-size:8pt;
    padding: 10px 0px 10px 0px; 
    border: solid 1px #C4C4C4;
}
  
.GridAltRow_MLightning td a
{
    color: #73abc9;
    font-family:Tahoma;
    font-size:8pt;
}
  
.GridAltRow_MLightning td div
{
    text-align: left;
    padding-left: 6px;
}
  
.SelectedRow_MLightning
{
    background: #707070 url( '../../App_Themes/UTC/Grid/selectedRow.gif' ) repeat-x 50% bottom;
}
.SelectedRow_MLightning td
{
    border-top: solid 1px #eaeaea;
    border-left: none;
    border-bottom: solid 1px #83c60b;
    padding-left:4px;
}
  
.GridEditRow_MLightning
{
    background-color: #ffffe1;
}
.GridEditRow_MLightning input
{
    font-size: 11px;
}
  
.ActiveRow_MLightning
{
    background: #edf2d9;
}
.ActiveRow_MLightning td,
.GridEditRow_MLightning td
{
    border-top: solid 1px #eaeaea;
    border-left: solid 1px #eaeaea;
    border-bottom: solid 1px #fefefe;
}
  
.GridRowOver_MLightning
{
    background:none #fff;
}
  
.GridPager_MLightning
{
    background: #898a8c;
    color: #ffffff;
      
}
.GridPager_MLightning td
{
    /*border: solid 1px #fff;*/
    border: 1px solid #c7c7c7;
    border-right: 0;
    color: #999;
    height: 14px;
    padding-top: 1px;
    padding-bottom: 1px;
    font-family: Tahoma;
    font-size: 8pt;
    background: #898a8c;
}
.GridPager_MLightning td div
{
    padding-left:0px;
    color: #ffffff;
}
  
.GridPager_MLightning td a
{
    padding-left:1px;
    color: #ffffff;
}
  
.GridPager_MLightning td a:hover,
.GridFooter_MLightning td a:hover
{
    color: #333;
}
  
.PagerLeft_MLightning *,
.PagerRight_MLightning *,
.PagerCenter_MLightning *
{
    vertical-align:middle;
}
  
.PagerLeft_MLightning,
.PagerRight_MLightning,
.sliderPagerLabel_MLightning
{
    line-height:17px;
    padding-top:2px;
}
  
.PagerLeft_MLightning
{
    float:left;
}
.PagerRight_MLightning,
.sliderPagerLabel_MLightning
{
    float:right;
    padding-right:4px;
}
.GridPager_MLightning .radslider
{
    float:left;
}
.GridPager_MLightning img
{
    border:0;
}
  
.GridPager_MLightning .radInput_MLightning
{
    vertical-align:middle;
}
  
.PagerCenter_MLightning
{
    display:block;
    text-align:center;
}
  
.GridFooter_MLightning
{
    background: #6dabaa;
    height: 16px;
    color: #666;
    line-height: 10px;
}
.GridFooter_MLightning td
{
    border: solid 2px #6dabaa;
    border-top: 1px solid #6dabaa;
    border-left: 7px solid #6dabaa;
    border-right: 7px solid #6dabaa;
}
.GridFooter_MLightning td a
{
    color: #666;
}
  
tr.GroupHeader_MLightning
{
      
    height: 22px;
}
tr.GroupHeader_MLightning td
{
    border-left:0px solid #fff;
    border-right:0;
    border-bottom: solid 1px #c2c2c2;
    padding: 7px;
}
  
.GroupHeader_MLightning td div div{top:-0.5em;}
* html .GroupHeader_MLightning td div div{top:0.4em;}
*+html .GroupHeader_MLightning td div div{top:0.4em;}
.GroupHeader_MLightning td div div div{top:0;}
  
  
  
.GroupPanel_MLightning
{
    background-color: #e8e8e8;
    width: 100%;
    border-collapse: collapse;
    border-bottom: 1px solid #b1b1b1;
}
  
.GroupPanel_MLightning td
{
    padding: 2px 4px;
}
  
.GroupPanelItems_MLightning
{
    background: #efefef;
    color: #999999;
    border: solid 1px white;
    border-right: solid 1px #c6c6c6;
    border-bottom: solid 1px #c6c6c6;
    white-space:  nowrap;
    font-size: 10px;
}
  
.TopReorderIndicator_MLightning
{
    background: url('../../App_Themes/UTC/Grid/MoveDown.gif') no-repeat;
}
  
.BottomReorderIndicator_MLightning
{
    background: url('../../App_Themes/UTC/Grid/MoveUp.gif') no-repeat;
}
  
.GridFilterMenu_MLightning
{
    cursor:default;
      
}
  
.GridFilterMenu_MLightning .GridFilterMenuSelectColumn_MLightning,
.GridFilterMenu_MLightning .GridFilterMenuTextColumn_MLightning
{
    padding:3px 4px;
}
  
.GridFilterMenu_MLightning .GridFilterMenuSelectColumn_MLightning
{
    background:#f9f9f9;
    text-align:center;
}
  
.GridFilterMenu_MLightning .GridFilterMenuTextColumn_MLightning
{
    background: #FFFFFF;
    color: #333;
}
  
.GridFilterMenu_MLightning .GridFilterMenuHover_MLightning
{
    background:#c1f320;
}
  
/*AJAX Loading*/
  
.GridLoadingTemplate_MLightning
{
    background:#fff !important;
    font:normal 24px/54px arial,sans-serif;
    color:#b5ea0e;
}
  
/*loading*/
  
.LoadingPanel_MLightning {
    background: url( 'Grid/loading.gif' ) center center no-repeat #fff;
}
  
/* rtl support */
  
.RadGridRTL_MLightning th,
.RadGridRTL_MLightning td
{
    text-align:center;
}
  
.RadGridRTL_MLightning .PagerLeft_MLightning,
.RadGridRTL_MLightning .GridPager_MLightning .radslider
{
    float:left;
}
.RadGridRTL_MLightning .PagerRight_MLightning,
.RadGridRTL_MLightning .sliderPagerLabel_MLightning
{
    float:left;
}
.GridCommandRow_MLightning
{
    background: #a7a7a9;
    color: #ffffff;
}
  
.GridCommandRow_MLightning td
{
    background: #a7a7a9;
    /*border: solid 1px #c7c7c7;*/
    color: #ffffff;
    height: 16px;
    padding-top: 1px;
    padding-bottom: 1px;
    font-family: Tahoma;
    font-size: 9pt;
    text-align:right;
}
  
.GridCommandRow_MLightning td a
{
    /*color: #73abc9;*/
    text-align:right;
      
}
  
Input:
  
/*Telerik RadInput M Lightning Skin*/
  
  
.datePicker {
    background-color: #F6F6F6;
    border: 1px solid #CCCCCC;
    font-family: Tahoma,verdana,sans-serif;
    font-size: 12px;
    padding: 3px;
    padding-right:0px;
}
  
/*global*/
  
.radInput_MLightning {
    font-family: tahoma;
    font-size: 9pt;
    vertical-align: middle; 
    color:#898a8c;
}
  
.radInput_MLightning table, .radInput_MLightning table td {
    border: 0;
}
  
.radInput_MLightning table {
    vertical-align: bottom;
}
  
.radInput_MLightning td {
    padding: 0;
    vertical-align: middle;
    overflow: visible; /*RadGrid*/
}
  
.radInput_MLightning td.inputCell {
    padding-right: 2px;
}
  
.radInput_MLightning textarea {
    vertical-align: middle;
    overflow: auto;
    display: block;
}
  
/*textbox states*/
  
.radEnabledCss_MLightning, .radEmptyMessageCss_MLightning, .radHoverCss_MLightning, .radFocusedCss_MLightning, .radReadOnlyCss_MLightning, .radDisabledCss_MLightning, .radNegativeCss_MLightning, .radInvalidCss_MLightning
{
    font-family: Tahoma,verdana,sans-serif;
    border: 1px solid #666666;
    background-color: #FFFFFF;
    padding: 3px;
    font-size: 9pt; 
    color:#898a8c;
}
  
.radEnabledCss_MLightning {
}
  
.radEmptyMessageCss_MLightning {
}
  
.radHoverCss_MLightning {
}
  
.radFocusedCss_MLightning {
}
  
.radReadOnlyCss_MLightning, .radDisabledCss_MLightning {
    color: gray;
    background: #eee;
}
  
.radNegativeCss_MLightning {
}
  
.radInvalidCss_MLightning {
    background: url('Input/sprite.gif') 99% -183px no-repeat;
    color: #f32800;
}
  
/*buttons*/
  
.radInput_MLightning a {
    display: block;
    text-indent: -4444px;
    overflow: hidden;
    position: relative; /*FF*/
    outline: none; /*FF*/
    z-index: 2; /*Opera*/
    background: url('Input/sprite.gif') no-repeat;
}
* html .radInput_MLightning a {
    position: static;
}
/*IE6*/
* + html .radInput_MLightning a {
    position: static;
}
/*IE7*/
  
/*go*/
  
.radInput_MLightning a.gobutton {
    width: 20px;
    height: 17px;
    line-height: 17px;
    background-position: 3px 4px;
}
  
/*spin*/
  
.radInput_MLightning a.spinbutton {
    width: 13px;
    height: 7px;
    line-height: 7px;
    margin: 0 1px;
}
  
.radInput_MLightning a.up {
    background-position: 3px -36px;
}
  
.radInput_MLightning a.down {
    background-position: 3px -64px;
    margin-top: 2px;
}
  
/*label*/
  
.radLabelCss_MLightning {
    margin: 0 4px 0 0;
    color: #000;
    white-space: nowrap;
}
Rick
Top achievements
Rank 2
 answered on 05 Mar 2013
1 answer
69 views
Hi telerik team.
I am using the Editor component to change the format of my email templates, but everytime when I submit changes or when I get a template and show it in the editor the content inside make a kind of zoom of the size. See the example in this demo and do the same. how could I change this and dont resize the fonts. Thanks.

http://demos.telerik.com/aspnet-ajax/editor/examples/saveindatabase/defaultcs.aspx
Rumen
Telerik team
 answered on 05 Mar 2013
4 answers
155 views
hi 
i have an Ajaxified RadGrid,popup edit template form within this form i have a linkbutton that should download a file but it's not working. please can any one help me out with a code snippet demonstrates how to accomplish this ??

thanks 
Heera
Top achievements
Rank 1
 answered on 05 Mar 2013
2 answers
250 views
I have a menu that has 3 levels.  The WebBlue Theme has the following style:

.RadMenu_WebBlue .rmItem a.rmLink {
    width: 155px !important;
    overflow: hidden !important;
}
.RadMenu_WebBlue .rmLink:hover, .RadMenu_WebBlue .rmFocused, .RadMenu_WebBlue .rmExpanded {
    width: 155px !important;
    min-height: 25px !important;
    color: #276c9d !important;
    background: #FFFFFF !important;
    border-color: #336699 !important;
}

The top 2 levels of the menu I want the width to be 155px and this is working fine.  What I would like to accomplish is setting level 3 of the menu to a width much larger than the top 2 levels to 340px.  I feel like I'm kind of close, but need help getting the text to display correctly.  Please see attached screen shot.

<head runat="server">
    <title></title>
    <script type="text/javascript">
        function onClientItemOpening(s, e) {
            var item = e.get_item();
            if (item.get_text() == 'Sub Menu 1') {
                for (var i = 0; i < item.get_items().get_count(); i++) {
                    var li = item.get_items().getItem(i).get_element();
                    li.style.width = 340;
                }
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <div>
        <telerik:RadMenu ID="RadMenu1" runat="server" OnClientItemOpening="onClientItemOpening">
            <Items>
                <telerik:RadMenuItem Text="Applications"></telerik:RadMenuItem>
                <telerik:RadMenuItem Text="This App">
                    <Items>
                        <telerik:RadMenuItem Text="Sub Menu 1">
                            <Items>
                                <telerik:RadMenuItem Text="Sub Menu Item With Longer Text Than Parent 1"></telerik:RadMenuItem>
                                <telerik:RadMenuItem Text="Sub Menu Item With Longer Text Than Parent 2"></telerik:RadMenuItem>
                                <telerik:RadMenuItem Text="Sub Menu Item With Longer Text Than Parent 3"></telerik:RadMenuItem>
                            </Items>
                        </telerik:RadMenuItem>
                    </Items>
                </telerik:RadMenuItem>
            </Items>
        </telerik:RadMenu>
    </div>
    </form>
</body>
</html>

Rob
Top achievements
Rank 1
 answered on 05 Mar 2013
3 answers
122 views
I am wondering if it is possible to show only one group of data per page in the RadGrid. Right now the paging works just fine but some groups are separated by one or more pages. The data in the group varies...sometimes there are only a couple of rows and other times there can be 20.
Andrey
Telerik team
 answered on 05 Mar 2013
2 answers
153 views
Hi,

Please let me know whether it is possible to replace the token remove image(X) with a custom one. To make it more clear when we add a item token into AutoCompleteBox, there is a cross symbol to remove it from the AutoCompleteBox. I want to add a custom image instead of the native x button.

Thanks,
Henry.
Henry
Top achievements
Rank 1
 answered on 05 Mar 2013
1 answer
83 views
IS there any way, when using the ListView and DataPager with multiple items on multiple pages, after selecting one of the item links and going to a separate page to be able to return to the page of the original selected item?
Eyup
Telerik team
 answered on 05 Mar 2013
5 answers
169 views
Hello , My Name Is Mohamed , and i need assistant in getting data from selected row  :
when i update in this cell i want to use the name to retrieve the mail address from DB and send mail with C# that the cell is updated with the new value :

when i choose from the drop down list " manger confirmation " i want to check the name in databse and retrieve the user mail and send mail for him with this update



ASP:
<telerik:RadGrid ID="RadGrid1" runat="server" AllowAutomaticUpdates="True"
        AutoGenerateEditColumn="True" CellSpacing="0" DataSourceID="SqlDataSource1"
        GridLines="None" AllowSorting="True" AllowPaging="True">
        <ClientSettings Selecting-AllowRowSelect="true" EnablePostBackOnRowClick="True">
          
        </ClientSettings>
        <MasterTableView autogeneratecolumns="False" datakeynames="V_ID"
            datasourceid="SqlDataSource1" EditMode="PopUp" >
            <CommandItemSettings ExportToPdfText="Export to PDF" >
            </CommandItemSettings>
            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
            </RowIndicatorColumn>
            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"
                ButtonType="PushButton" HeaderButtonType="PushButton">
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridBoundColumn DataField="V_ID" DataType="System.Int32"
                    FilterControlAltText="Filter V_ID column" HeaderText="No#"
                    SortExpression="V_ID" UniqueName="V_ID" ReadOnly="True">
                </telerik:GridBoundColumn>
                <telerik:GridTemplateColumn DataField="U_Name"
                    FilterControlAltText="Filter U_Name column" HeaderText="Employee Name"
                    Reorderable="False" SortExpression="U_Name" UniqueName="U_Name">
                    <EditItemTemplate>
                        <asp:TextBox ID="U_NameTextBox" runat="server" Text='<%# Bind("U_Name") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="U_NameLabel" runat="server" Text='<%# Eval("U_Name") %>'></asp:Label>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn DataField="V_Issue_Date" DataType="System.DateTime"
                    FilterControlAltText="Filter V_Issue_Date column" HeaderText="Issue Date"
                    Reorderable="False" SortExpression="V_Issue_Date" UniqueName="V_Issue_Date">
                    <EditItemTemplate>
                        <asp:TextBox ID="V_Issue_DateTextBox" runat="server"
                            Text='<%# Bind("V_Issue_Date") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="V_Issue_DateLabel" runat="server"
                            Text='<%# Eval("V_Issue_Date", "{0:dd/MM/yyyy}") %>'></asp:Label>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn DataField="V_Type"
                    FilterControlAltText="Filter V_Type column" HeaderText="Vacation Type"
                    Reorderable="False" SortExpression="V_Type" UniqueName="V_Type">
                    <EditItemTemplate>
                        <asp:TextBox ID="V_TypeTextBox" runat="server" Text='<%# Bind("V_Type") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="V_TypeLabel" runat="server" Text='<%# Eval("V_Type") %>'></asp:Label>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn DataField="V_Start_Date" DataType="System.DateTime"
                    FilterControlAltText="Filter V_Start_Date column" HeaderText="Start Date"
                    Reorderable="False" SortExpression="V_Start_Date" UniqueName="V_Start_Date">
                    <EditItemTemplate>
                        <asp:TextBox ID="V_Start_DateTextBox" runat="server"
                            Text='<%# Bind("V_Start_Date") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="V_Start_DateLabel" runat="server"
                            Text='<%# Eval("V_Start_Date", "{0:dd/MM/yyyy}") %>'></asp:Label>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn DataField="V_End_Date" DataType="System.DateTime"
                    FilterControlAltText="Filter V_End_Date column" HeaderText="End Date"
                    Reorderable="False" SortExpression="V_End_Date" UniqueName="V_End_Date">
                    <EditItemTemplate>
                        <asp:TextBox ID="V_End_DateTextBox" runat="server"
                            Text='<%# Bind("V_End_Date") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="V_End_DateLabel" runat="server" Text='<%# Eval("V_End_Date", "{0:dd/MM/yyyy}") %>'></asp:Label>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn DataField="Total_Days" DataType="System.Int32"
                    FilterControlAltText="Filter Total_Days column" HeaderText="Total Days"
                    Reorderable="False" SortExpression="Total_Days" UniqueName="Total_Days">
                    <EditItemTemplate>
                        <asp:TextBox ID="Total_DaysTextBox" runat="server"
                            Text='<%# Bind("Total_Days") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Total_DaysLabel" runat="server" Text='<%# Eval("Total_Days") %>'></asp:Label>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn DataField="V_Start_Time" DataType="System.TimeSpan"
                    FilterControlAltText="Filter V_Start_Time column" HeaderText="Start Time"
                    Reorderable="False" SortExpression="V_Start_Time" UniqueName="V_Start_Time">
                    <EditItemTemplate>
                        <asp:TextBox ID="V_Start_TimeTextBox" runat="server"
                            Text='<%# Bind("V_Start_Time") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="V_Start_TimeLabel" runat="server"
                            Text='<%# Eval("V_Start_Time") %>'></asp:Label>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn DataField="V_End_Time" DataType="System.TimeSpan"
                    FilterControlAltText="Filter V_End_Time column" HeaderText="End Time"
                    Reorderable="False" SortExpression="V_End_Time" UniqueName="V_End_Time">
                    <EditItemTemplate>
                        <asp:TextBox ID="V_End_TimeTextBox" runat="server"
                            Text='<%# Bind("V_End_Time") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="V_End_TimeLabel" runat="server" Text='<%# Eval("V_End_Time") %>'></asp:Label>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn DataField="V_Reason"
                    FilterControlAltText="Filter V_Reason column" HeaderText="Reason"
                    Reorderable="False" SortExpression="V_Reason" UniqueName="V_Reason">
                    <EditItemTemplate>
                        <asp:TextBox ID="V_ReasonTextBox" runat="server" Text='<%# Bind("V_Reason") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="V_ReasonLabel" runat="server" Text='<%# Eval("V_Reason") %>'></asp:Label>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn DataField="V_Dep_Mgr_Confirmation"
                    FilterControlAltText="Filter V_Dep_Mgr_Confirmation column"
                    HeaderText="Manger Confirmation" SortExpression="V_Dep_Mgr_Confirmation"
                    UniqueName="V_Dep_Mgr_Confirmation">
                    <EditItemTemplate>
                        
 
      <asp:DropDownList ID="DropDownList4" runat="server" BackColor="#ffff99" Text='<%# Bind("V_Dep_Mgr_Confirmation") %>' >
              <asp:ListItem></asp:ListItem>
              <asp:ListItem>Confirmed</asp:ListItem>
              <asp:ListItem>N't Confirmed</asp:ListItem>
    </asp:DropDownList>
 
 
 
 
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="V_Dep_Mgr_ConfirmationLabel" runat="server"
                            Text='<%# Eval("V_Dep_Mgr_Confirmation") %>'></asp:Label>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn DataField="V_Dep_Mgr_Comment"
                    FilterControlAltText="Filter V_Dep_Mgr_Comment column"
                    HeaderText="Manger Comment" SortExpression="V_Dep_Mgr_Comment"
                    UniqueName="V_Dep_Mgr_Comment">
                    <EditItemTemplate>
                        <asp:TextBox ID="V_Dep_Mgr_CommentTextBox" BackColor="#ffff99"  runat="server"
                            Text='<%# Bind("V_Dep_Mgr_Comment") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="V_Dep_Mgr_CommentLabel" runat="server"
                            Text='<%# Eval("V_Dep_Mgr_Comment") %>'></asp:Label>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn DataField="U_Serial_Number" DataType="System.Int32"
                    FilterControlAltText="Filter U_Serial_Number column"
                    HeaderText="Employee Serial Number" Reorderable="False"
                    SortExpression="U_Serial_Number" UniqueName="U_Serial_Number"
                    Visible="False">
                    <EditItemTemplate>
                        <asp:TextBox ID="U_Serial_NumberTextBox" runat="server"
                            Text='<%# Bind("U_Serial_Number") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="U_Serial_NumberLabel" runat="server"
                            Text='<%# Eval("U_Serial_Number") %>'></asp:Label>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
            </Columns>
            <EditFormSettings>
                <EditColumn  FilterControlAltText="Filter EditCommandColumn column"
                    ButtonType="PushButton"   UpdateText="Are You Sure"  EditText="Edit" HeaderButtonType="PushButton">
                </EditColumn>
            </EditFormSettings>
            <EditItemStyle ForeColor="Red" />
        </MasterTableView>
        <FilterMenu EnableImageSprites="False">
        </FilterMenu>
        <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
        </HeaderContextMenu>
    </telerik:RadGrid>
Eyup
Telerik team
 answered on 05 Mar 2013
1 answer
119 views
Hi guys,

I'm having a problem with the drag and drop functionality of the radlistbox.

In my scenario i need to create dynamic controls depending to the data coming from the database. When I drag and drop an item from static listbox to the listboxes dynamically created, items does not show up until some other control other than listbox forces an autopostback. I have tried setting autopostbackaftertransfer  to true but still the same result. I can see that item dropped event on the server side is triggering and all the items I previously dropped to the listbox is available within the listbox's item collection thou not visible until another control forces a postback. Any ideas what could be causing the problem?

protected void Page_Load(object sender, EventArgs e)
    {        
        if (Page.IsPostBack)
        {
             //generate forms again using existing variables
             GenerateSlotForms();          
        }
        else
        {  
             //get some initial variables from querystring
            GenerateSlotForms();
        }
 
}
 
 protected void GenerateSlotForms()
        {
             
                divSlot.Visible = true;
                int tblRows, tblCols;
                DataView dvCorpSlot;
                dvCorpSlot = (DataView)CorpSlot.Select(DataSourceSelectArguments.Empty);  //corporation lists
                 
                
                if (RadNumericTextBox5.Value == 1)
                {
                    tblRows = 1;
                    tblCols = 1;
                }
                else
                {
                    tblRows = (Convert.ToInt16(dvCorpSlot.Count) / 2) + (Convert.ToInt16(dvCorpSlot.Count) % 2);
                    tblCols = 3;
                }
 
                int k = 0;
 
                for (int i = 0; i < tblRows; i++)
                {
                    TableRow tr = new TableRow();
                    for (int j = 0; j < tblCols; j++)
                    {
                        PlaceHolder1.Controls.Add(tr);
 
                        TableCell tc = new TableCell();
 
                        if ((i * 3) + j + 1 <= Convert.ToInt16(dvCorpSlot.Count))
                        {
                       
                            tc.Controls.Add(CreateControlSlotListBox(k));
                          
                            tr.Cells.Add(tc);
 
                            k++;
                        }
                    }
 
                    tbl.Rows.Add(tr);
            }
        }    
     private Control CreateControlSlotListBox(int i)
        {
            ListBox SlotListBox = new ListBox();
            SlotListBox.ID = "SlotListBox" + i;
            SlotListBox.Width = 190;
            
            return SlotListBox;
        }

    protected void RadListBox_Dropped(object sender, RadListBoxDroppedEventArgs e)
        {
            foreach (RadListBoxItem item in e.SourceDragItems)
            {
                string controlname = e.HtmlElementID;
                if (controlname.Contains("Skinned")) { controlname = controlname.Substring(7); }
                ListBox slotListBox = (ListBox)Page.FindControl(controlname);
                slotListBox.Items.Add(item.Text);
                slotListBox.Items.FindByText(item.Text).Value = item.Value;

            }

<div id="divSlot" runat="server" visible="false">

<
telerik:RadListBox ID="RadListBox1" runat="server" EnableDragAndDrop="true" SelectionMode="Multiple"
AllowTransferDuplicates="True" DataKeyField="Descr" OnDropped="RadListBox_Dropped" Height="250"
D
ataSourceID="PPIEEmployeeListAll" DataTextField="Descr" DataValueField="Expr1">                  </telerik:RadListBox>

<
asp:PlaceHolder ID="PlaceHolder1" runat="server" EnableViewState="false"></asp:PlaceHolder>
/div>



Nencho
Telerik team
 answered on 05 Mar 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?