Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
204 views

I'm used to searching dropdownlists like : x=  ddlInviteList.Items.IndexOf(ddlInviteList.Items.FindByValue(reader["InvitedID"].ToString()));

But I'm not seeing a similar capability in RadCheckBoxList? Also, is there a way to get the length of a RadCheckBoxList ?

 

thanks

 

david
Top achievements
Rank 1
 answered on 02 Feb 2018
1 answer
142 views

Hi,

I was trying to change the Value Cell Format like #.00 € (screenshot1.png) but it seems not working (screenshot2.png)

You can test it directly on your demo

 

Thank you

Mattia
Top achievements
Rank 2
 answered on 02 Feb 2018
1 answer
369 views

Hi,

 

I was asked to build search functionality as on thomann.de see screenshot.
I am not sure whether I should go the ComboBox or the SearchBox way.

It should search in 17.000 products.

What do you suggest?

 

Thanks for your assistance,

Marc

Vessy
Telerik team
 answered on 02 Feb 2018
5 answers
128 views

Hey All, 

 

So i have a Radgrid with a radgridcolumnbutton;

 

    <telerik:GridButtonColumn ButtonType="ImageButton" 
        FilterControlAltText="Filter PDFExport column" HeaderText="PDF" 
        ImageUrl="Icons\PDF_Export.png" CommandName="generateSamplePDF_click"  UniqueName="generateSamplePDF_click" >
    </telerik:GridButtonColumn>

 

What need this button to do is to execute the the below which creates a pdf report

 

    Protected Sub generateSamplePDF_click(ByVal sender As Object, ByVal e As ...............................)

        Dim strPath As String = ""
        Dim sampleID As String = ""
        Dim filename As String = ""

        sampleID = *****whatever text is in  column 2 of the row where the button whas selected****

' this is what is used before  sampleID = grdTests.Rows(e.CommandArgument).Cells(0).Text

    

        Dim path As String = Server.MapPath("LimsPDF") & "\" & Session("loggedCompanyID") & "\"".pdf"
        strPath = Server.MapPath("~/PDF/pdf_sample_" & sampleID & ".pdf")
        filename = "pdf_sample_" & sampleID & ".pdf"
        Report_Result_UtilityClass.generateSamplePDF(strPath, sampleID)


        Response.ContentType = "application/pdf"
        Response.AddHeader("Content-Disposition", "attachment;filename=" & filename)
        Me.EnableViewState = False
        Response.WriteFile(strPath)
        Response.Flush()
        Response.Close()

    End Sub

 

any help would be very much appreciated

Rumen
Telerik team
 answered on 02 Feb 2018
7 answers
273 views
Hello,
I have notice a problem that is not possible to add a line break <br/> before an <h1> tag when using the editor. If Press the enter key it just adds another <h1></h1>tag. How can I add line breaks  for spacing above the <h1> tag?

thank you
Rumen
Telerik team
 answered on 02 Feb 2018
6 answers
216 views
 
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test003.aspx.cs" Inherits="Test003" %>
 
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager runat="server" ID="rsmMain"></telerik:RadScriptManager>
        <telerik:RadClientDataSource
            runat="server"
            ID="DS1"
            AllowPaging="true"
            EnableServerSorting="true"
            EnableServerFiltering="true"
            EnableServerPaging="true"
        >
        <DataSource>
            <WebServiceDataSourceSettings>
                <Select EnableCaching="false" Url="../api/test"  RequestType="Post" />
            </WebServiceDataSourceSettings>
        </DataSource>
        <Schema>
            <Model ID="Id">
                <telerik:ClientDataSourceModelField FieldName="Id" DataType="Number"  />
                <telerik:ClientDataSourceModelField FieldName="Name" DataType="String" />
                <telerik:ClientDataSourceModelField FieldName="Category" DataType="String" />
                <telerik:ClientDataSourceModelField FieldName="Price" DataType="Number" />
            </Model>
        </Schema>
        <ClientEvents
                OnRequestEnd="OnRequestEnd"
                OnDataParse="OnDataParse"
                OnCountRequested="OnCountRequested"
            />
    </telerik:RadClientDataSource>
    <br />
    <telerik:RadGrid runat="server" ID="rgMain"
         RenderMode="Lightweight"
         ClientDataSourceID="DS1"
         AllowMultiRowSelection ="true"
         AllowSorting="True"
         AllowPaging="True"
         PageSize="100"
         AutoGenerateColumns="false"
         AllowFilteringByColumn="true"
        >
        <MasterTableView AutoGenerateColumns="false" ClientDataKeyNames="Id" HierarchyLoadMode="Client">
            <Columns>
                <telerik:GridBoundColumn DataField="Name" HeaderText="Name" UniqueName="Id"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Category" HeaderText="Category" UniqueName="Category"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Price" HeaderText="Price" UniqueName="Price"></telerik:GridBoundColumn>
            </Columns>
            <PagerStyle AlwaysVisible="true" Mode="NextPrevNumericAndAdvanced" />
            <NestedViewTemplate>
                <asp:Literal runat="server" ID="Test">TEST</asp:Literal>
            </NestedViewTemplate>
        </MasterTableView>
        <ClientSettings>
            <ClientEvents OnCommand="OnGridCommand" OnGridCreated="OnGridCreated" OnDataBinding="OnDataBinding" OnDataBound="OnDataBound" />
        </ClientSettings>
    </telerik:RadGrid>
    <br />
    <telerik:RadCodeBlock runat="server" ID="rcbTest">
        <script type="text/javascript">
            var gcId = "";
            var countRg = 20;
            OnRequestEnd = function (sender, args) {
                console.log('OnRequestEnd');
                //console.log(sender);
                //console.log(args);
            }
            OnDataParse = function (sender, args) {
                console.log('OnDataParse');
                var response = args.get_response();
                countRg = response.count;
                if (response) {
                    args.set_parsedData(response.Data);
                }
            }
            OnCountRequested = function (sender, args) {
                args.set_countField(countRg);
                console.log('OnCountRequested');
            }
            OnGridCommand = function(sender, args) {
                if (args.get_commandName() == "Page")
                    console.log("Page Index Changed");
                else if (args.get_commandName() == "PageSize") {
                    args.set_cancel(true);
                    if (args.get_tableView().get_pageSize() > 50) {
                        args.get_tableView().set_pageSize(50)
                        console.log("Page Size Changed BIG");
                    }
                    console.log("Page Size Changed");
                }
                else {
                    console.log('COMMAND:' + args.get_commandName());
                }
                     
            }
            OnGridCreated = function (sender, args) {
                gcId = sender.get_id();
                console.log('Grid Created');
                var mtv = sender.get_masterTableView();
                mtv.set_pageSize(20);
            }
            OnDataBinding = function (sender, args) {
                console.log('OnDataBinding');
            }
            OnDataBound = function (sender, args) {
                console.log('OnDataBound');
            }
        </script>
    </telerik:RadCodeBlock>
    </form>
</body>
</html>

 

 

Is a part of my code.
When I filtring allways ask twice. 
On start asks triple time.
When I showing Comand Panel and clikd Refresh asking four times.

 

What i Do wrong, any sugestion.

 

 

Attila Antal
Telerik team
 answered on 01 Feb 2018
0 answers
132 views
I noticed that when using Mobile Rendering in RadGrid, that the Filterlist I had create does not work.  Instead it does the generic filtering with the mobile view.  Do I take it that Filterlist is not supported in RadGrid when using Mobile rendering?
David
Top achievements
Rank 2
 asked on 01 Feb 2018
2 answers
249 views

I have grouping in my grid and want to be able to expand multiple groups but I am able to expand only one group at a time.

<telerik:RadGrid ID="rgQ1CashValues" runat="server" DataSourceID="dataSrcMonthlyCashValues" EnableViewState="false"
                    OnPreRender="grid_PreRender" OnItemCommand="grid_ItemCommand" OnItemDataBound="grid_ItemDataBound"
                    OnItemCreated="grid_ItemCreated" >
                    <MasterTableView TableLayout="Fixed" CommandItemDisplay="Top" DataSourceID="dataSrcMonthlyCashValues"
                        Name="Q1CashValuesSummary" EnableNoRecordsTemplate="true" DataKeyNames="carriername" ShowGroupFooter="true" GroupsDefaultExpanded="false">
                        <CommandItemSettings ShowAddNewRecordButton="false" ShowRefreshButton="false" ShowExportToExcelButton="true"
                            ExportToExcelText="" ExportToPdfText="" ShowExportToPdfButton="true" />
                        <GroupByExpressions>
                            <telerik:GridGroupByExpression>
                                <SelectFields>
                                    <telerik:GridGroupByField FieldAlias="" HeaderText=" " HeaderValueSeparator=""
                                        FieldName="carriername" ></telerik:GridGroupByField>
                                </SelectFields>
                                <GroupByFields>
                                    <telerik:GridGroupByField FieldName="carriername"></telerik:GridGroupByField>
                                </GroupByFields>
                            </telerik:GridGroupByExpression>
                        </GroupByExpressions>
                        <Columns>
                            <telerik:GridBoundColumn  DataField="fullname" HeaderText="Participant" UniqueName="fullname"
                                 ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" FooterStyle-HorizontalAlign="Left">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="policynumber" UniqueName="PolicyNumber" HeaderText="Policy No"
                                 HeaderStyle-Width="8%" SortExpression="policynumber">
                            </telerik:GridBoundColumn>
                            <telerik:GridDateTimeColumn DataField="issuedate" UniqueName="PolicyDate" HeaderText="Policy Date"
                                SortExpression="issuedate" HeaderStyle-Width="8%" DataFormatString="{0:d}">
                            </telerik:GridDateTimeColumn>
                            <telerik:GridBoundColumn Aggregate="Sum" DataField="JanEnd" HeaderText="January" DataFormatString="{0:c2}"
                                HeaderStyle-Width="11%" >
                            </telerik:GridBoundColumn>
                        </Columns>
                    </MasterTableView>
                    <GroupingSettings RetainGroupFootersVisibility="true" GroupContinuesFormatString="" GroupContinuedFormatString="" GroupSplitDisplayFormat="showing {0} of {1} participants" />
                </telerik:RadGrid>
MBEN
Top achievements
Rank 2
Veteran
 answered on 31 Jan 2018
13 answers
828 views
Using the Q3 version of the ASP.NET/AJAX RadControl Suite, is there a built-in way to save / restore the current layout (ie: filtering, sorting, column order, visible columns, etc) of the grid?

ie:  Similar to what DevExpress provides:  http://www.devexpress.com/Help/?document=ASPxGridView/CustomDocument4342.htm&levelup=true

I found a code sample on your help site which seems to provide a sample piece of code for this (http://www.telerik.com/help/aspnet-ajax/grdsavingsettingsonperuserbasis.html) but the code does not compile.  (Haven't really dug into why...)

Thanks,

Roy
DogBizPro
Top achievements
Rank 1
 answered on 31 Jan 2018
2 answers
151 views
Hi, I have a site which uses forms authentication and has a grid with an AJAX manager. When the session expires, I'd like the user to be bounced back to the login page. A page refresh sends me back to the login correctly. However, when interacting with the grid (sorting, filtering, etc) after the session has expired, I get the following error in a popup box:

Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 0

I searched the forum for solutions, but all the posts appear to be a few years old. What is the current solution to this problem? Thanks.


Daniel
Top achievements
Rank 1
 answered on 31 Jan 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?