Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
537 views
Hi,

My scenario is this. I have 2 text boxes and 2 radcomboboxex which user needs to fill and then i've a button called save which "Prompts" the user for a name and saves it.

So, to do this, I did the foll in .ascx:

 

<button id="btnSave" style="width: 80px" onclick = "radprompt('Please enter a Search Name:',

 

promptCallBackFn, 330, 180); return false;"

 

>Save</button>

Now my question is
1) how do i grab the name that user entered in the prompt and use it in my .cs file.
how to make the name available in code behind file. pls do help me with code.

2) also, i need to make sure that user has selected atleast 1 radcombo box and  entered text in 1 textbox ctrl before prompting for a name. otherwise I need to alert the user telling "you don't have anything to save".
pls help me with code.
Thanks,
ZR

 

Shinu
Top achievements
Rank 2
 answered on 12 Oct 2009
1 answer
155 views
Hi,

I am using Q2 2009 . When i  double click on particular row , i want row text.
Please give me the solution ASAP.

Regards

Rahul
Shinu
Top achievements
Rank 2
 answered on 12 Oct 2009
1 answer
174 views
hi

I have successfully uploaded pdf into DB: but how do i read the pdf? Thanks

Protected

 

Sub btnUpload_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnUpload.Click

 

 

For Each file As UploadedFile In RadUpload1.UploadedFiles

 

 

Dim bytes As Byte() = New Byte(file.InputStream.Length) {}

 

file.InputStream.Read(bytes, 0,

DirectCast((file.InputStream.Length), Long))

 

 

Dim strImageName As String = txtName.Text.ToString()

 

 

Dim con As New SqlConnection()

 

con.ConnectionString = ConfigurationManager.ConnectionStrings(

"ConnectionString").ConnectionString

 

 

Dim cmd As New SqlCommand()

 

cmd.CommandText =

"spPDFtest"

 

cmd.CommandType = CommandType.StoredProcedure

cmd.Connection = con

 

Dim ImageName As New SqlParameter("@pdfName", SqlDbType.VarChar, 50)

 

ImageName.Value = strImageName.ToString()

cmd.Parameters.Add(ImageName)

 

Dim UploadedImage As New SqlParameter("@pdf", SqlDbType.Image, bytes.Length)

 

UploadedImage.Value = bytes

cmd.Parameters.Add(UploadedImage)

con.Open()

 

Dim result As Integer = cmd.ExecuteNonQuery()

 

con.Close()

 

If result > 0 Then

 

lblMessage.Text =

"File Uploaded"

 

 

End If

 

 

Next

 

 

End Sub

 

L
Top achievements
Rank 1
 answered on 11 Oct 2009
6 answers
301 views
Hello,

We are seeing this error fire hundreds of times per day on a site that uses that latest version of Telerik RadControls for ASP.NET AJAX Q2 2009. We reviewed what was out there and concluded this error must be related to the WebResource and on your site, you provide this troubleshooting page - http://www.telerik.com/help/aspnet-ajax/web-resources-troubleshooting.html which we reviewed, along with the machineKey recommendations on MSDN http://msdn.microsoft.com/en-us/library/ms998288.aspx which we implemented on our production server in web.config on the affected site. Also in Web.config, these settings are currently in use for the scriptresource and webResource - they appear correct to us but I am relisting them in case we are missing something.

<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>

                                    <add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false"/>

So my question (or begging plea) is this - is there any one out there who could provide more in depth recommendations or assistance in getting rid of this error. It seems benign from an end-user point of view, but probably affects performance, especially since we are logging hundreds of errors per day on this problem. Any assistance would be greatly appreciated!


DTech
Top achievements
Rank 1
 answered on 10 Oct 2009
0 answers
86 views
Hi, my toolbar is configured through xml and the onClick is populated as such. Is it possible to modify the onclick action through javascript?
Raddy Rad
Top achievements
Rank 1
 asked on 10 Oct 2009
1 answer
91 views

I having an issue rebinding and/or clearing the old results in the grid. The code below populates RadGridType. On load returnCourseName return 63 records (confirmed). Then the user selects something on RadGridProduct and this function is launched again, this time returnCourseName returns 21 records (confirmed) but the 63 records are still in RadGridType. All I want to do is clear the grid and send it new results. That all!!!

<telerik:RadGrid   
                                        ID="RadGridType"   
                                        runat="server"   
                                        AutoGenerateColumns="False"   
                                        GridLines="None"   
                                        AllowMultiRowSelection="True"   
                                        ShowHeader="False"   
                                        BorderStyle="None"   
                                        Skin="Web20"   
                                        ForeColor="#3399CC"   
                                        Font-Bold="False"   
                                        Font-Italic="False"   
                                        Font-Names="Verdana"   
                                        Font-Overline="False"   
                                        Font-Strikeout="False"   
                                        Font-Underline="False">  
                                        <AlternatingItemStyle   
                                            Font-Bold="False"   
                                            Font-Italic="False"   
                                            Font-Overline="False"   
                                            Font-Strikeout="False"   
                                            Font-Underline="False"   
                                            ForeColor="#3399CC"   
                                            Wrap="True" /> 
                                        <ItemStyle   
                                            Font-Bold="False"   
                                            Font-Italic="False"   
                                            Font-Overline="False"   
                                            Font-Strikeout="False"   
                                            Font-Underline="False"   
                                            ForeColor="#3399CC"   
                                            Wrap="True" /> 
                                        <MasterTableView   
                                            Font-Bold="False"   
                                            Font-Italic="False"   
                                            Font-Names="Verdana"   
                                            Font-Overline="False"   
                                            Font-Strikeout="False"   
                                            Font-Underline="False"   
                                            Font-Size="11px">  
                                        <RowIndicatorColumn> 
                                        <HeaderStyle Width="20px"></HeaderStyle> 
                                        </RowIndicatorColumn> 
                                        <ExpandCollapseColumn> 
                                        <HeaderStyle Width="20px"></HeaderStyle> 
                                        </ExpandCollapseColumn> 
                                            <Columns> 
                                                <telerik:GridClientSelectColumn Display="False" UniqueName="columnBlank">  
                                                </telerik:GridClientSelectColumn> 
                                                <telerik:GridBoundColumn   
                                                    DataField="CourseName"   
                                                    UniqueName="colCourseNameSelect"   
                                                    HeaderButtonType="None">  
                                                </telerik:GridBoundColumn> 
                                            </Columns> 
                                            <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" ForeColor="#3399CC" Wrap="True" /> 
                                            <AlternatingItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" ForeColor="#3399CC" Wrap="True" /> 
                                            <EditItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" Wrap="True" BackColor="Black" ForeColor="White" /> 
                                        </MasterTableView> 
                                        <SelectedItemStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" Wrap="True" ForeColor="Maroon" BackColor="Silver" /> 
                                        <ClientSettings EnableRowHoverStyle="False">  
                                            <Selecting AllowRowSelect="True" /> 
                                        </ClientSettings> 
                                    </telerik:RadGrid> 

public void returnCourseName(string strLocation)  
    {  
        GridItemCollection GDC = RadGridProduct.SelectedItems;  
        RadGridType.DataSource = new List<string>(0);  
        RadGridType.DataBind();  
        RadGridType.DataSource = clsTraining.returnCourseName(strLocation, GDC);  
        RadGridType.DataBind();  
    } 
Schlurk
Top achievements
Rank 2
 answered on 09 Oct 2009
6 answers
115 views

I have a number of pages that all use a given master page.

The master page includes a RadAjaxManager and a LoadingPanel control.

I would like, if it possible to arrange it so, to have /all/ of the controls on the page blocked whenever and AJAX request fires and to have the LoadingPanel displayed.

I know I could modify /each/ page but I'd rather, if possible, have it all managed from the Master Page.

Is such a thing possible?

-- 

Stuart

Stuart Hemming
Top achievements
Rank 2
 answered on 09 Oct 2009
2 answers
94 views
I am trying to install the RadEdtior and I've completed all the steps here.

http://www.telerik.com/help/aspnet-ajax/moss-install-aspnet-ajax-35.html
 and here
http://www.telerik.com/help/aspnet-ajax/installing-radeditor-in-moss-2007-farm.html

I belive that its installed correctly, so when i got to activate for lists I get a strange result.

I get the rad editor but with no content and the toolbar is 1px. If i type in the html and switch to design the text clears. I am open to try anything at this point.

Tom Daly
Thomas
Top achievements
Rank 1
 answered on 09 Oct 2009
18 answers
436 views
Ever since upgrading to the new 2009 Q1 my column widths are being ignored in IE8.

Everything renders perfect in Firefox and Opera, but IE8 is broken. In addition to the column widths being ignored, any template fields with hyperlinks are crossing over into other columns. I'm using the converted "Vista" skin provided by Telerik to maintain the Q3 2008 look. The Q3 2008 release did not have this issue. I'm wondering if you guys have tested the new skins with the MasterTableView TableLayout="Fixed" property set. Also, In all my grids I set widths for all columns except one, so that any extra width will go to that column. This has never been a problem until the new release. Here is my markup, although I'm not sure how helpful it will be. I emptied out my template fields just to rule out the contents of them causing the problem.

  <telerik:RadGrid ID="DetailGrid" runat="server" AllowPaging="True" AllowSorting="True"
                AllowCustomPaging="True" GridLines="None" ShowGroupPanel="True" AutoGenerateColumns="false"
                CssClass="grid2Line" PageSize="10" MasterTableView-AllowCustomPaging="true" Skin="swVista"
                EnableEmbeddedSkins="false" EnableEmbeddedBaseStylesheet="false" OnNeedDataSource="DetailGrid_NeedDataSource"
                OnSortCommand="DetailGrid_SortCommand">
                <MasterTableView TableLayout="Fixed" OverrideDataSourceControlSorting="true" Width="100%">
                    <PagerTemplate>
                        <uc1:GridPagerTemplate ID="GridPagerTemplate1" runat="server" />
                    </PagerTemplate>
                    <PagerStyle AlwaysVisible="true" />
                    <RowIndicatorColumn>
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn>
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </ExpandCollapseColumn>
                    <Columns>
                        <telerik:GridBoundColumn UniqueName="StartTimeClean" SortExpression="StartTime" HeaderText="Arrived"
                            GroupByExpression="StartTimeGB Arrived Group By StartTimeGB" DataField="StartTimeClean"
                            ItemStyle-CssClass="gridItemRow" ItemStyle-HorizontalAlign="Right" Visible="True">
                            <HeaderStyle Width="90px"></HeaderStyle>
                        </telerik:GridBoundColumn>
                        <telerik:GridTemplateColumn UniqueName="LocationImage" Visible="true" HeaderText="From"
                            SortExpression="CountryName" GroupByExpression="CountryName Country Group By CountryName">
                            <HeaderStyle Width="54px" HorizontalAlign="Center"></HeaderStyle>
                            <ItemStyle></ItemStyle>
                            <ItemTemplate>
                                DODO
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn UniqueName="Visit" DataFormatString="{0:###,###,##0}" SortExpression="VisitNumber"
                            HeaderText="Visit" DataField="VisitNumber" ItemStyle-HorizontalAlign="Center"
                            HeaderStyle-HorizontalAlign="Center" ItemStyle-CssClass="gridItemRow" GroupByExpression="VisitNumber Visit Group By VisitNumber">
                            <HeaderStyle Width="52px"></HeaderStyle>
                        </telerik:GridBoundColumn>
                        <telerik:GridTemplateColumn UniqueName="TemplateColumn2" SortExpression="StartPageTitle"
                            HeaderText="Entry Page" GroupByExpression="StartPageURL Entry&nbsp;Page&nbsp;URL Group By StartPageURL">
                            <HeaderStyle></HeaderStyle>
                            <ItemStyle Height="35px"></ItemStyle>
                            <ItemTemplate>
                                DODO
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn UniqueName="Location" GroupByExpression="Country Group By City"
                            SortExpression="Country" HeaderText="Location" Visible="false">
                            <HeaderStyle Width="0px"></HeaderStyle>
                            <ItemStyle Height="35px"></ItemStyle>
                            <ItemTemplate>
                                 DODOfs
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn UniqueName="CountryCode" SortExpression="CountryCode" HeaderText="CountryCode"
                            DataField="CountryCode" Visible="false">
                            <HeaderStyle Width="0px"></HeaderStyle>
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn UniqueName="PageViews" DataFormatString="{0:###,###,##0}"
                            SortExpression="PageViews" HeaderText="Page Views" DataField="PageViews" ItemStyle-HorizontalAlign="Center"
                            HeaderStyle-HorizontalAlign="Center" ItemStyle-CssClass="gridItemRow" GroupByExpression="PageViews Page&nbsp;Views Group By PageViews">
                            <HeaderStyle Width="58px"></HeaderStyle>
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn UniqueName="TimeOnClean" SortExpression="TimeOn" HeaderText="Time On"
                            GroupByExpression="TimeOn Time&nbsp;On Group By TimeOn" DataField="TimeOnClean"
                            HeaderStyle-HorizontalAlign="Center" ItemStyle-CssClass="gridItemRow" ItemStyle-HorizontalAlign="Center"
                            Visible="true">
                            <HeaderStyle Width="62px"></HeaderStyle>
                        </telerik:GridBoundColumn>
                        <telerik:GridTemplateColumn UniqueName="TimeOn" SortExpression="TimeOn" HeaderText="Time On"
                            DataField="TimeOn" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"
                            GroupByExpression="TimeOnGroupBy Time&nbsp;On Group By TimeOnGroupBy" Visible="false">
                            <HeaderStyle Width="62px"></HeaderStyle>
                            <ItemTemplate>
                               DODO
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn UniqueName="Referrer" GroupByExpression="ReferrerName Referrer&nbsp;Name Group By ReferrerName"
                            HeaderText="Referrer / Keyword" SortExpression="ReferrerName">
                            <HeaderStyle Width="180px"></HeaderStyle>
                            <ItemStyle Height="35px"></ItemStyle>
                            <ItemTemplate>
                               DODO
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                    </Columns>
                </MasterTableView>
                <ClientSettings AllowDragToGroup="False">
                </ClientSettings>
                <GroupingSettings GroupContinuesFormatString="" GroupContinuedFormatString="" />
            </telerik:RadGrid>

Any help would be greatly appreciated as I am not able to use the new release with this issue present.

Thanks,
Levi
Andrew Benson
Top achievements
Rank 2
 answered on 09 Oct 2009
2 answers
104 views
Hello forum,
RadControl newbie looking for help:

I would like to build a grid custom paging function that returns a pagesize dependant on a datasource value - is this possible? The actual scenario I'm trying to accomplish is displaying a grid of tracks belonging to an album (trackcollection). If the album contains more than one CD, ideally, I'd like to page/show the tracks belonging to this particular CD only.

Each datasource row/griditem contains among other things cdNo and trackNo - if an album contains 4 CDs with 12, 14, 4, and 6 tracks respectively, the paging function should then result in 12 records on page1, 14 on page2 and so on.

Does anyone have something that could get me going in the right direction?

Thank you very much.
knut
Knut
Top achievements
Rank 1
 answered on 09 Oct 2009
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?