Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
189 views
I am looking for an example where the the radpanelbar items contain bindable controls from the datasource specified within a formview. I made the following layout but binding would not work. The bindable  column1 (in bold) below is not populated. Any better approach in handling a bindable data entry form within a radpanelitem? Please help.


<formview id="test" runat="server" datasource="onesource">  
 <EditItemTemplate> 
<telerik:radpanelbar> 
<items> 
 
 <telerik:RadPanelItem Text="1st bar" Expanded="true" > 
   <Items>                              
        <telerik:RadPanelItem Value="clInfo" > 
        <ItemTemplate> 
             <asp:TextBox id="txt1st" runat="server" Text'<%# Bind("Column1") %>' 
        <ItemTemplate> 
       </telerik:RadPanelItem> 
</items> 
</telerik:RadPanelItem> 

</items>
</telerik:radpanelbar> 
 
 </EditItemTemplate> 
 
 <InsertItemTemplate> 
....  
....  
 </InsertItemTemplate> 
</formview> 
Boyan Dimitrov
Telerik team
 answered on 12 Mar 2014
1 answer
98 views
Hi
i have a boolean field in my db with values as true/false. In my grid i want to display it as 1/0. How can this be done?
Shinu
Top achievements
Rank 2
 answered on 12 Mar 2014
5 answers
362 views
In a radwindow I'm trying to run server side code through the RadAjaxManager.ajaxRequest on docuemnt.Ready(). I get he following javascriopt error 0x800a138f - JavaScript runtime error: Unable to get property 'ajaxRequest' of undefined or null reference.  I assume the $find("RadAjaxManager1").ajaxRequest("Rebind") line isn't finding the RadAjaxManager Control.  Can I not call the ajaxRequest in document.ready()?  Is it too early?
 The control is named properly from what I can tell.

Code is below

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="DListFullTel_Update_Mult.aspx.vb" Inherits="DListFullTel_Update_Mult" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>

    <asp:PlaceHolder ID="PlaceHolder1" runat="server">

<script src="Scripts/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" language="javascript">
        $(document).ready(function () {


            
            
            $("#rblChoice_0").click(function (e) {
                disableSubmit()
            });
            $("#rblChoice_1").click(function (e) {
                disableSubmit()
            });
            $("#rblChoice_2").click(function (e) {
                disableSubmit()
            });
            $("#taComments").keyup(function () {
                disableSubmit()
            });
            $("#taComments").mouseleave(function () {
                disableSubmit()
            });

            $("#hdDataIDs").val(GetRadWindow().BrowserWindow.document.getElementById("txtInput").value) ;

            GetPageValues()

        });
        function disableSubmit() {
            if (($.trim($("#taComments").val()) == "") && ($("#rblChoice input:radio:checked").val() == 2)) {
                $("#btnSubmit").attr("disabled", "disabled")
            }
            else {
                $("#btnSubmit").removeAttr("disabled", "disabled")
            }
        }
        function CloseAndRebind(args) {
            GetRadWindow().BrowserWindow.refreshGrid(args);
            GetRadWindow().close();
        }
        function GetRadWindow() {
            var oWindow = null;
            if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog                  
            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz as well)                  
            return oWindow;
        }
        function CancelEdit() {
            GetRadWindow().close();
        }
        function GetPageValues(arg) {

            $find("<%= RadAjaxManager1.ClientID%>").ajaxRequest("Rebind");

        }
    </script>
    </asp:PlaceHolder>


    
    
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <div id="divReturn">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server"></telerik:RadSkinManager>
    <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="hdDataIDs" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="hdDataIDs">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="hdDataIDs" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default"></telerik:RadAjaxLoadingPanel>
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" HorizontalAlign="NotSet" LoadingPanelID="RadAjaxLoadingPanel1">
<asp:HiddenField ID="hdDataIDs" runat="server" ClientIDMode="Static" Value="not yet" />
<table style="width: 200px; border: 0px;" cellpadding="3" cellspacing="0">
            
            <tr>
                <td colspan="2" style="padding-left: 15px;">
                    <div id="brands">
                        <asp:RadioButtonList ID="rblChoice" runat="server" ClientIDMode="Predictable" 
                            RepeatDirection="Horizontal">
                            <asp:ListItem Value="0">Pending</asp:ListItem>
                            <asp:ListItem Selected="True" Value="1">Don&#39;t Keep</asp:ListItem>
                            <asp:ListItem Value="2">Keep</asp:ListItem>
                        </asp:RadioButtonList>
                    </div>
                </td>
            </tr>
            <tr>
                <td style="vertical-align: top; padding-left: 20px">
                    Comments:
                </td>
                <td>
                    <textarea id="taComments" name="taComments" cols="25" rows="5"></textarea>
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td colspan="2" style="padding-left: 15px;">
                    <span style="font-weight: bold;">Apply to:</span>&nbsp;<asp:Label ID="lbldialogParentName" runat="server" Text="Label"></asp:Label>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="text-align: center;">
                    <input id="btnSubmit" type="button" value="Submit" disabled="disabled" />&nbsp;&nbsp;
                    <input id="btnClose2" type="button" value="Cancel" />
                    <asp:HiddenField ID="hdlbldialogParentID" runat="server" ClientIDMode="Static" />
                    <asp:HiddenField ID="hdlbldialogDispNodeID" runat="server" ClientIDMode="Static" />
                    <asp:HiddenField ID="hdlbldialogUserID" runat="server" ClientIDMode="Static" />
                </td>
            </tr>
        </table>
        </telerik:RadAjaxPanel>
   
    </div>
    </div>
    </form>
</body>
</html>





Viktor Tachev
Telerik team
 answered on 12 Mar 2014
1 answer
83 views
Hi
I want to hide some columns in export to pdf. is there an easy way other than hiding columns during export in commanditem event?
Princy
Top achievements
Rank 2
 answered on 12 Mar 2014
1 answer
134 views
Our RadGrid is missing the rgheader class from the th's when it is rendered. Does anyone have any experience with this or any direction on how we can fix/troubleshoot?

I've attached an image of the RadGrid as it appears with no column headers. Note that we purposefully loaded two rows of completely empty data, to confirm that the datasource/ajax request is working correctly (all is well there).

RadGrid declaration:
<telerik:RadGrid ID="AXXRadGrid" runat="server" GridLines="None" AllowAutomaticUpdates="True"
                OnItemCommand="AXXRadGrid_ItemCommand" OnItemDataBound="AXXRadGrid_ItemDataBound"
                AutoGenerateColumns="false" OnSortCommand="AXXRadGrid_SortCommand" AllowMultiRowSelection="true"
                OnItemCreated="AXXRadGrid_ItemCreated" DataSourceID="RequestMasterDataSource"
                OnHTMLExporting="AXXRadGrid_HTMLExporting" OnExportCellFormatting="AXXRadGrid_ExcelExportCellFormatting">
                <ExportSettings HideStructureColumns="true" />
                <MasterTableView TableLayout="Auto" RetrieveDataTypeFromFirstItem="true" CommandItemDisplay="Top">
                    <CommandItemSettings ShowExportToExcelButton="false" ShowAddNewRecordButton="false"
                        ShowRefreshButton="false" />
                </MasterTableView>
                <ClientSettings>
                    <Selecting AllowRowSelect="True"></Selecting>
                    <Scrolling AllowScroll="false"></Scrolling>
                    <Resizing ResizeGridOnColumnResize="True" AllowRowResize="True" AllowColumnResize="True" />
                    <ClientMessages DragToGroupOrReorder="Drag to group" />
                </ClientSettings>
                <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
                </HeaderContextMenu>
            </telerik:RadGrid>


HTML generated from RadGrid:
<table class="rgMasterTable" border="0" id="ctl00_m_g_b8cf9c0d_003b_4572_a197_c425836f7d6f_ctl00_AXXRadGrid_ctl00" style="width:100%;table-layout:auto;empty-cells:show;">
    <colgroup>
        <col style="width:60px">
        <col style="width:60px">
        <col style="width:60px">
        <col style="width:60px">
        <col style="width:60px">
        <col style="width:60px">
        <col style="width:60px">
        <col style="width:60px">
        <col style="width:60px">
        <col style="width:60px">
        <col style="width:60px">
        <col style="width:60px">
        <col style="width:60px">
    </colgroup>
<thead>
        <tr style="background-color:#EF5D63;display:none;">
            <th scope="col"><a title="Click here to sort" href="javascript:__doPostBack('ctl00$m$g_b8cf9c0d_003b_4572_a197_c425836f7d6f$ctl00$AXXRadGrid$ctl00$ctl02$ctl02$ctl00','')">SR Number</a></th><th scope="col"><a title="Click here to sort" href="javascript:__doPostBack('ctl00$m$g_b8cf9c0d_003b_4572_a197_c425836f7d6f$ctl00$AXXRadGrid$ctl00$ctl02$ctl02$ctl01','')">Client Name</a></th><th scope="col"><a title="Click here to sort" href="javascript:__doPostBack('ctl00$m$g_b8cf9c0d_003b_4572_a197_c425836f7d6f$ctl00$AXXRadGrid$ctl00$ctl02$ctl02$ctl02','')">Column 1</a></th><th scope="col"><a title="Click here to sort" href="javascript:__doPostBack('ctl00$m$g_b8cf9c0d_003b_4572_a197_c425836f7d6f$ctl00$AXXRadGrid$ctl00$ctl02$ctl02$ctl03','')">Column 2</a> <input type="button" name="ctl00$m$g_b8cf9c0d_003b_4572_a197_c425836f7d6f$ctl00$AXXRadGrid$ctl00$ctl02$ctl02$ctl04" value=" " onclick="javascript:__doPostBack('ctl00$m$g_b8cf9c0d_003b_4572_a197_c425836f7d6f$ctl00$AXXRadGrid$ctl00$ctl02$ctl02$ctl04','')"></th><th scope="col"><a title="Click here to sort" href="javascript:__doPostBack('ctl00$m$g_b8cf9c0d_003b_4572_a197_c425836f7d6f$ctl00$AXXRadGrid$ctl00$ctl02$ctl02$ctl05','')">Column 3</a></th><th scope="col"><a title="Click here to sort" href="javascript:__doPostBack('ctl00$m$g_b8cf9c0d_003b_4572_a197_c425836f7d6f$ctl00$AXXRadGrid$ctl00$ctl02$ctl02$ctl06','')">Column 4</a></th><th scope="col"><a title="Click here to sort" href="javascript:__doPostBack('ctl00$m$g_b8cf9c0d_003b_4572_a197_c425836f7d6f$ctl00$AXXRadGrid$ctl00$ctl02$ctl02$ctl07','')">Column 5</a></th><th scope="col"><a title="Click here to sort" href="javascript:__doPostBack('ctl00$m$g_b8cf9c0d_003b_4572_a197_c425836f7d6f$ctl00$AXXRadGrid$ctl00$ctl02$ctl02$ctl08','')">Column 6</a></th><th scope="col"><a title="Click here to sort" href="javascript:__doPostBack('ctl00$m$g_b8cf9c0d_003b_4572_a197_c425836f7d6f$ctl00$AXXRadGrid$ctl00$ctl02$ctl02$ctl09','')">Column 7</a></th><th scope="col"><a title="Click here to sort" href="javascript:__doPostBack('ctl00$m$g_b8cf9c0d_003b_4572_a197_c425836f7d6f$ctl00$AXXRadGrid$ctl00$ctl02$ctl02$ctl10','')">Column 8</a></th><th scope="col"><a title="Click here to sort" href="javascript:__doPostBack('ctl00$m$g_b8cf9c0d_003b_4572_a197_c425836f7d6f$ctl00$AXXRadGrid$ctl00$ctl02$ctl02$ctl11','')">Column 9</a></th><th scope="col"><a title="Click here to sort" href="javascript:__doPostBack('ctl00$m$g_b8cf9c0d_003b_4572_a197_c425836f7d6f$ctl00$AXXRadGrid$ctl00$ctl02$ctl02$ctl12','')">Column 10</a></th><th scope="col"><a title="Click here to sort" href="javascript:__doPostBack('ctl00$m$g_b8cf9c0d_003b_4572_a197_c425836f7d6f$ctl00$AXXRadGrid$ctl00$ctl02$ctl02$ctl13','')">Column 11</a></th>
        </tr>
    </thead><tfoot>
        <tr class=" rgPager">
            <td colspan="13"><table summary="Data pager which controls on which page is the RadGrid control." border="0" style="width:100%;border-spacing:0;">
                <caption>
                    <span style="display: none">Data pager</span>
                </caption><thead>
                    <tr>
                        <th scope="col"></th>
                    </tr>
                </thead><tbody>
                    <tr>
                        <td class="rgPagerCell NextPrev"><div class="rgWrap rgArrPart1">
                            Change page: <input type="button" name="ctl00$m$g_b8cf9c0d_003b_4572_a197_c425836f7d6f$ctl00$AXXRadGrid$ctl00$ctl03$ctl01$ctl02" value=" " onclick="return false;WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$m$g_b8cf9c0d_003b_4572_a197_c425836f7d6f$ctl00$AXXRadGrid$ctl00$ctl03$ctl01$ctl02", "", true, "", "", false, true))" title="First Page" class="rgPageFirst"> <input type="button" name="ctl00$m$g_b8cf9c0d_003b_4572_a197_c425836f7d6f$ctl00$AXXRadGrid$ctl00$ctl03$ctl01$ctl03" value=" " onclick="return false;WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$m$g_b8cf9c0d_003b_4572_a197_c425836f7d6f$ctl00$AXXRadGrid$ctl00$ctl03$ctl01$ctl03", "", true, "", "", false, true))" title="Previous Page" class="rgPagePrev"><input type="button" name="ctl00$m$g_b8cf9c0d_003b_4572_a197_c425836f7d6f$ctl00$AXXRadGrid$ctl00$ctl03$ctl01$ctl04" value=" " onclick="return false;WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$m$g_b8cf9c0d_003b_4572_a197_c425836f7d6f$ctl00$AXXRadGrid$ctl00$ctl03$ctl01$ctl04", "", true, "", "", false, true))" title="Next Page" class="rgPageNext">  <input type="button" name="ctl00$m$g_b8cf9c0d_003b_4572_a197_c425836f7d6f$ctl00$AXXRadGrid$ctl00$ctl03$ctl01$ctl05" value=" " onclick="return false;WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$m$g_b8cf9c0d_003b_4572_a197_c425836f7d6f$ctl00$AXXRadGrid$ctl00$ctl03$ctl01$ctl05", "", true, "", "", false, true))" title="Last Page" class="rgPageLast">
                        </div><div class="rgWrap rgInfoPart">
                              Page <strong>1</strong> of <strong>1</strong>, items <strong>0</strong> to <strong>0</strong> of <strong>0</strong>.
                        </div></td>
                    </tr>
                </tbody>
            </table></td>
        </tr>
    </tfoot><tbody>
    <tr class="rgNoRecords">
        <td colspan="13" style="text-align:left;"><div>No records to display.</div></td>
    </tr>
    </tbody>
 
</table>
Princy
Top achievements
Rank 2
 answered on 12 Mar 2014
3 answers
139 views
This is just a general question, but when people are getting into asp.net, do people still learn webforms?  Seems like everyone is always bashing it, saying how much better MVC is.

I think if you use RadScriptManager, RadWindowManger and telerik grids, there's is nothing better for creating a fast LOB web app.  You can even put Web API into a webforms website and make client side calls to it.  The thing is, I don't want to keep writing Webform sites if no one knows webforms anymore.

I think for writing pages that will also be used in mobile, HTML5/javascript pages and node.js and client/server instead of MVC is the future.
Jeff
Top achievements
Rank 1
 answered on 12 Mar 2014
1 answer
188 views
I have a pie chart where the labels are 0, 1, 2, 3, 4, 5+.  But the "0" category doesn't show up in the legend, even though it's showing up in the chart.  It works fine if I change the label to "Zero", but won't show up when it's "0".  It's also missing from the tool tip.  The client template for the tooltip is 
"#=category#<br />#=dataItem.code_count# (#=value#%)".  Again, the tooltip shows up fine for "Zero", "1", "2", etc., but for "0", #=category# shows up blank.  Is there any way to display category labeled "0"?
Danail Vasilev
Telerik team
 answered on 12 Mar 2014
7 answers
191 views

Hi,


I have implemented universal list editor, which allow me to simple edit entities by EntityDataSource. It works ok with automatic insert/update/delete functionality.



Now I'm starting new web project based on Code First EF6. So I cannot use EntityDataSource. I downloaded DatabaseDataSource from https://dbcontextdatasource.codeplex.com/



Datasource works correctly for selecting but it does not works with automatic insert/update and delete commands.



I looked to RadGrid source code and it looks that it works only with knowing datasources from .Net framework, but not with custom datasources. The insert/update/delete commands are invoked on Grid but it is not invoked to data source.



Is there some solution how to do with custom datasource or another solution how to works with automatic CUD operations with RadGrid and Code First EF6?



Thanks

Vlad

Maria Ilieva
Telerik team
 answered on 12 Mar 2014
1 answer
50 views
Hello,

Is there a way to use persisting grid setting through the client side on not like the below example that you showed (I added a link).

in the example you use a button for save settings. I want to save the grid settings of column order after a user reorder the columns of the grid through ajax from the client side. And when the user will return in the future to the grid he will see the order of his grid (I don't want to use cookie!). I want to save the settings on my DB and create the grid through the order of the columns that he decided.

link of your example:
http://demos.telerik.com/aspnet-ajax/controls/examples/integration/persisting-grid-settings/defaultcs.aspx?product=grid

thanks.
Pavlina
Telerik team
 answered on 12 Mar 2014
6 answers
438 views
ASPX CODE:

 <telerik:GridTemplateColumn UniqueName="OS_VERSION" HeaderText="OS Version" DataField="OS_VERSION"
                    SortExpression="Device_Control" ItemStyle-Wrap="false" FilterControlWidth="30px"
                    Visible="true" AutoPostBackOnFilter="true">
                    <EditItemTemplate>
                        <telerik:RadComboBox runat="server" ID="OSVersionRadCombobox_Edit" MarkFirstMatch="true"
                            AllowCustomText="false" EnableTextSelection="true" Height="140px" Width="100px"
                            Filter="Contains" DropDownWidth="100px" EmptyMessage="Select">
                        </telerik:RadComboBox>
                        <asp:RequiredFieldValidator ID="OSVersionRadComboboxFieldValidator" runat="server"
                            InitialValue="Select" ControlToValidate="OSVersionRadCombobox_Edit" ErrorMessage="Please select a OS Version"
                            Display="Dynamic" Font-Size="X-Small" Font-Bold="true" Font-Italic="true" ForeColor="Maroon">
                        </asp:RequiredFieldValidator>
                        <br />
                        <asp:Label ID="NoRecrdFndlbl_edit" ForeColor="Brown" Font-Bold="true" Font-Italic="true"
                            Font-Size="X-Small" runat="server" Visible="false" Text="No OS Versions found"></asp:Label>
                    </EditItemTemplate>
......................................



Any body suggest please
Angel Petrov
Telerik team
 answered on 12 Mar 2014
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?