Telerik Forums
UI for ASP.NET AJAX Forum
9 answers
324 views
Hi all...
this is probably a really basic question...

what i'm trying to do is to validate whether the user has specified any files to be uploaded.  I'm using just a single text box and a browse button.

I figured on using OnClientFileSelected to go to a function which will see if the file input string is zero length.

However, the event doesn't seem to be firing.  Here is the RadUpload declaration:

<telerik:RadUpload InputSize="40" Width="300" ID="RadUpload1" runat="server"

ControlObjectsVisibility="None" OnClientFileSelected="checkInputFilePath" />

<telerik:RadProgressArea ID="progressArea1" runat="server" Skin="" />

The function looks like this:

function checkInputFilePath(radUpload, eventArgs)

    {

        alert(

'here we are');

    }

The alert never happens, though an alert downstream of this, in another function, does.
Anything additionally have to be set?

Thanks in advance
david

Princy
Top achievements
Rank 2
 answered on 27 Jul 2012
3 answers
108 views
Hello,

I am using both onvaluechanging and onerror client side events of RadNumeric Textbox

If user enter non-numeric values, it is only executing onerror. If you user enter numeric value but which is invalid(lets say -10), I am handling that error but after that onvaluechanging is also executing. I dont want onvaluechaing triggers after error handler.

TIA
Shinu
Top achievements
Rank 2
 answered on 27 Jul 2012
1 answer
134 views
Greetings Telerik,
For one of our clients we need to develop a custom control for displaying conference / agendas more like
https://developers.google.com/events/io/agenda
OR
http://sesconference.com/sanfrancisco/agenda.php similarly...

So instead of we developing we have recommended telerik controls...
It will be nice to if you can share any previous implementation on similar lines.... or let us know if its possible with Telerik or not...
What our options ??? we are open to suggestions

Thanks
Shinu
Top achievements
Rank 2
 answered on 27 Jul 2012
7 answers
994 views
Im trying to implement a file download function in a grid.  The grid is controlled by an ajax manager.  In the grid i have a GridButtonColumn

<telerik:GridButtonColumn ButtonType="ImageButton"
                                        CommandName="ImageDownload" Text="Download" UniqueName="ImageDownload" ImageUrl="~/images/dnn.gif">
                                        <HeaderStyle Width="20px" />
                                        <ItemStyle HorizontalAlign="Center" />
                                    </telerik:GridButtonColumn>

I then have this function that should initiate the file save dialog for users to save the selected file to their file system

protected void RadGridImages_ItemCommand(object source, GridCommandEventArgs e)
        {
                         
            if (e.CommandName.Equals("ImageDownload"))
            {
//commandargument has the physical path on the server of the selected file
                DownloadImage(e.CommandArgument.ToString());
            }
        }
 
        private void DownloadImage(string imagePath)
        {
            FileInfo file = new FileInfo(imagePath);
            if (file.Exists)
            {
                Response.ClearContent();
                Response.AddHeader("Content-Disposition", "attachment; filename=" + file.Name);
                Response.AddHeader("Content-Length", file.Length.ToString());
                Response.ContentType = Studio1BusinessLayer.Helpers.ReturnExtension(file.Extension.ToLower());
                Response.TransmitFile(file.FullName);
                Response.End();
            }
        }

The DownloadImage method generates this error

Could not complete the operation due to error c00ce514.

Can anyone show me how to achieve a simple file download function in a radgrid ?
Radoslav
Telerik team
 answered on 27 Jul 2012
1 answer
83 views
Hi,
I have a screen in that I have Ribbonbars. I have 4 Ribbon Bar Tabs , each ribbon bar tab has 4 ribbon bar groups and each ribbbon bar group has 4 buttons.
My problem is I ahve the ribbon bar width as 100%. But these controls do not occupy the complete width. They look very clumsy.
Is there a way to adjust each Ribbon bar tab items to take up some extra space?
Thanks
Princy
Top achievements
Rank 2
 answered on 27 Jul 2012
3 answers
140 views
Hi , i am using Q1 2011 version of rad control in the application

I am trying to create a Grid dynamically and implementing sorting on that  (Grid Getting Disintegratesd on sorting{unwanted empty columns appear}):

Html Code:

<telerik:RadGrid ID="rdGrd" runat="server" AutoGenerateColumns="False" EnableEmbeddedSkins ="false" Skin="Outlook" HeaderStyle-HorizontalAlign="Left" CssClass="RadGrid_Outlook"
GridLines="Both" Height="350px" AllowSorting = "true">  

<MasterTableView ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" FilterItemStyle-HorizontalAlign="Left">

 <Columns>  

<telerik:GridBoundColumn DataField="ID" Display="False" UniqueName="ID"> <ItemStyle HorizontalAlign="Left" />  </telerik:GridBoundColumn

<telerik:GridBoundColumn DataField="Name" HeaderText="Name" UniqueName="Name">

 <ItemStyle HorizontalAlign="Left" />

 </telerik:GridBoundColumn>

 </Columns>

 </MasterTableView>

<ClientSettings EnableRowHoverStyle="false">
<Selecting AllowRowSelect="false" />
<Scrolling AllowScroll="true" SaveScrollPosition="true" UseStaticHeaders = "true" /> </ClientSettings>
</telerik:RadGrid>

Vb Code On page load : (DtWrAra is a datatable)

 

Private Sub AddDynamicColumns()

For c As Integer = 0 To DtWrAra.Count - 1
Dim cbDownload As New GridTemplateColumn()

cbDownload.HeaderText = DtWrAra(c).Name

cbDownload.UniqueName = DtWrAra(c).Id

cbDownload.ItemTemplate = New RadGridCheckBoxTemplate(DtWrAra(c).Id) 

Me.rdGrd.MasterTableView.Columns.Add(cbDownload)
Next
End Sub
 

 

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
rdGrd.DataSource = SampleDataSourceObject
AddDynamicColumns()

rdGrd.DataBind()

End Sub

========
These check box template columns are later checked on eachrow basis.

When i am performing sorting operation grid getting distorted .I am not Certain about the cause. Attached a screen shot..
If any one can help me on this ...

Thanks,
Saurabh

 

Shinu
Top achievements
Rank 2
 answered on 27 Jul 2012
0 answers
140 views
I am using RadGrid with a GridHyperLinkColumn.  I am binding the grid on the client side.  When I use the hyperlink, it seems that the hreg in the generated <a tag is a reference to the local server.  This is not what is in the bound object.  I have an object, with a prperty "Url", Url has the value http://google.com

<telerik:GridHyperLinkColumn HeaderText="Preplan" DataTextField="Url" DataNavigateUrlFields="Url"
Target="_blank" DataNavigateUrlFormatString="{0}" HeaderStyle-HorizontalAlign="Center"
ItemStyle-HorizontalAlign="Left" Visible="false" AllowFiltering="false" />

Above is the markup that I am using, however the output is this:

<a target="_blank" href="/mytestsite/Home/tabid/41/language/en-US/http://google.com">http://google.com</a>

I am using DotNetNuke 5.6 with version 2010.02.0929.35 of Telerik.Web.UI.dll

Given that the text is correct and looking @ the object in the debugger, the given data string is http://google.com, I can only assume that the control is adding the relative path...

what I find interesting is that if I change the DataNavigationUrlFormattingString in the markup to be DataNavigateUrlFormatString="http://google.com"  I get the expected result:
<a target="_blank" href="http://google.com">http://google.com</a>

Any thoughts on what I'm doing wrong?

An update:
It seems that if I use the property: DataNavigateUrlFormatString="http://{0}"

 

I get a different result, then I get either :  <a href="http:http://google.com" target="_blank">http://google.com</a> or <a href="http://google.com" target="_blank">http://google.com</a>
depending on the contents of the field, if it is http://google.com then you get the former, if it's google.com  then it's the latter.

 

 

 

 

 

Geoffrey
Top achievements
Rank 1
 asked on 26 Jul 2012
5 answers
113 views
Hello,

I have a grid with 28 column filters. My question is: once a filter is applied, is there a way for the user to know that a particular filter is active? As there is no change in the filter icon or color (or column background), then how can the user know there is filtering in the grid and on which column(s)?
Is there any grid built-in property that allows to achieve this functionality?

Regards,
M.R.
M. R.
Top achievements
Rank 1
 answered on 26 Jul 2012
1 answer
79 views
Hey guys,
I have an issue with batch update similar to this example:
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/clienteditbatchupdates/defaultcs.aspx 

my issue is I cant use the SqlDataSource but must use the ObjectDataSource as all Database requests goes through Stored Procedures and the stored procedure updates two tables...two update commands in the procedure.

What do I need to change in your example to get this working with an objectdatasource?

Thanks,


Dimitrios
Top achievements
Rank 1
 answered on 26 Jul 2012
16 answers
249 views
Hi, I'm facing something strange with rad orgchart control.

I've an orgchart which i bind it with some data in the Page_PreInit, and within each node i created RadDockZone Template inside every node.

the problem is: At the last node in the orgchart it doesn't fire the InstantiateIn directly for the raddockzone template , while it's fire directly with the rest nodes except the last one,  it's fire but too late , it fire after orgchart_DataBound and Page_Init and Page_Load. so this problem doesn't allow me to save the dock state in the last zone in the last node.

UPDATE : WORKING CODE IS IN THE THIRD POST PLEASE TRY IT.

Thank you.
Kate
Telerik team
 answered on 26 Jul 2012
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?