Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
154 views
I am trying to complete a task that I have found half the answer for. I would like the context menu in the grid to only work on files, not folders. I found the solution for hiding the context menu. However, I'm not sure how to check each row for whether it is a file or folder. I am digging through the javascript now, but this is time sensitive so I thought I would post right away.
Dobromir
Telerik team
 answered on 07 Apr 2011
4 answers
775 views
Hi
I am using the Radlistview like a list of checkboxes and I can select multiple items out of it.

How can I get the selected values on a Button click event?

Here is my aspx code:

 <telerik:RadListView ID="rlv_Aircraft" runat="server"   
                                AllowMultiItemSelection="True" ClientDataKeyNames="name"   
                                DataSourceID="SqlDataSource_Aircraft" Skin="Black" 
                                DataKeyNames="name" > 
                                <LayoutTemplate> 
                                    <div class="RadListView RadListView_Black">  
                                        <table cellspacing="0" style="width:40px;">  
                                            <tbody> 
                                                <tr ID="itemPlaceholder" runat="server">  
                                                </tr> 
                                            </tbody> 
                                        </table> 
                                    </div> 
                                </LayoutTemplate> 
                                <ItemTemplate> 
                                    <tr class="rlvI">  
                                        <td width="20px">  
                                            <asp:Button ID="SelectButton" runat="server" CommandName="Select"   
                                                CssClass="rlvBSel" Text=" " /> 
                                        </td> 
                                        <td width="60px">  
                                            <asp:Label ID="nameLabel" runat="server" Text='<%# Eval("name") %>' /> 
                                        </td> 
                                        <td>&nbsp;  
                                        </td> 
                                    </tr> 
                                </ItemTemplate> 
                                <AlternatingItemTemplate> 
                                    <tr class="rlvA">  
                                        <td width="20px">  
                                            <asp:Button ID="SelectButton" runat="server" CommandName="Select"   
                                                CssClass="rlvBSel" Text=" " /> 
                                        </td> 
                                        <td width="60px">  
                                            <asp:Label ID="nameLabel" runat="server" Text='<%# Eval("name") %>' /> 
                                        </td> 
                                        <td>&nbsp;  
                                        </td> 
                                    </tr> 
                                </AlternatingItemTemplate> 
                                <EmptyDataTemplate> 
                                    <div class="RadListView RadListView_Black">  
                                        <div class="rlvEmpty">  
                                            There are no items to be displayed.</div> 
                                    </div> 
                                </EmptyDataTemplate> 
                                <SelectedItemTemplate> 
                                    <tr class="rlvISel">  
                                        <td width="20px">  
                                            <asp:Button ID="DeselectButton" runat="server" CommandName="Deselect"   
                                                CssClass="rlvBSel" Text=" " /> 
                                        </td> 
                                        <td width="60px">  
                                            <asp:Label ID="nameLabel" runat="server" Text='<%# Eval("name") %>' /> 
                                        </td> 
                                        <td>&nbsp;  
                                        </td> 
                                    </tr> 
                                </SelectedItemTemplate> 
                            </telerik:RadListView> 
Princy
Top achievements
Rank 2
 answered on 07 Apr 2011
1 answer
124 views
Hi, I'm using Radupload and trying to save a record to the database like so on a button click event:

If RadUpload1.UploadedFiles.Count > 0 Then
        .Picture = RadUpload1.UploadedFiles(0).FileName
Else
        .Picture = ""
End If

However, I would also like to change the filename when the file already exists. So I added the FileExists function:
        Protected Sub RadUpload1_FileExists(ByVal sender As Object, ByVal e As UploadedFileEventArgs) Handles RadUpload1.FileExists
            Dim counter As Integer = 1
            Dim file As UploadedFile = e.UploadedFile
            Dim targetFolder As String = Server.MapPath(RadUpload1.TargetFolder)
            Dim targetFileName As String = System.IO.Path.Combine(targetFolder, file.GetNameWithoutExtension & counter & file.GetExtension)
            While System.IO.File.Exists(targetFileName)
                counter += 1
                targetFileName = System.IO.Path.Combine(targetFolder, file.GetNameWithoutExtension & counter & file.GetExtension)
            End While
            file.SaveAs(targetFileName)
        End Sub

This results in changing the filename to picture1.jpg if picture.jpg already exists.
However, it will still save picture.jpg to the database.
How can I make sure it will be updated in the correct way?
Dimitar Terziev
Telerik team
 answered on 07 Apr 2011
7 answers
149 views
Hi,

My problem is that on my opened RadWindow I have a RadGrid.
Is it possible to return a complex list of object to parent?
Lets say my grid has 3 columns (1 checkbox and 2 string ones)
Can I return something like datasource or create custom class in js?
Should I iterate through the radgrid items?
Any code sample would be great.

Thanks
Marin Bratanov
Telerik team
 answered on 07 Apr 2011
5 answers
333 views
Hi,

I'm using a RadScheduler inside a RadAjaxPanel, with an ASP.NET Timer to have scheduler data auto-refreshed.

Is it possible to keep scrolling state between ajax refresh to avoid user always scroll ?
Or is there another way to have automatic refresh behavior ?

Thanks.
Peter
Telerik team
 answered on 07 Apr 2011
1 answer
74 views
Hi,

When I use the Image Manager to insert an image into the contents of the RadEditor a link like <img alt="" src="" longdesc="" /> is inserted (when I switch from the design view to the html view).
This is not xhtml compliant.
It is unclear to me why the attribute longdesc="" is inserted instead of title="".

Please inform me how to change longdesc into title when inserting images.

Regards
Rumen
Telerik team
 answered on 07 Apr 2011
1 answer
130 views
Hello,

I have seen the implemented solutioin for this here:

http://www.telerik.com/community/forums/aspnet/treeview/show-image-at-right-side-of-selected-node.aspx

however I have not been able to use this for multiple buttons to the right of the selected treeview node...

I have tried everything to get my code working, and am trying to copy how the radfilter creates the buttons in the rfTool div box...

right now i have the following as a nodetemplate:

<NodeTemplate>
    <div>
    <asp:Label style="display:inline;" />
    <asp:Label style="display:inline;" /></div>
    <div>
    <a id="tnb1" class="tnTool" >firstButton</a>
    <a id="tnb2" class="tnTool" >firstButton</a></div>
</NodeTemplate>

with the following css defined:

.tnTool
{
 background-image: url('/Images/FileExplorerToolbarSprites.png');
 visibility:hidden;
 text-indent:-3333px;
 text-decoration:none;
 float:left;
 white-space:nowrap;
 width:0px;
 height:0px;
}
 
.boolTreeHover .tnTool
{
 display:inline;
 visibility:visible !important;
 width:18px;
 height:18px;
}
 
#tnb1.tnTool:hover {background-position:0 -18px;}
 
#tnb2.tnTool:hover { background-position:0 -36px;}

the class "boolTreeHover " is applied to the "selectedCssClass" property of the node in the code-behind.

the attached image shows what is rendered...

for some reason i *cannot* get the two anchor tags to render inline with the other two labels...

if i put the whole template into one div box, it renders on the same line, but the float:left css renders the buttons BEFORE the labels, rather than after.

any help would be greatly appreciated... thanks!









Nikolay Tsenkov
Telerik team
 answered on 07 Apr 2011
0 answers
118 views
Hello,

our RadGrids which are created dynamically in code on server side, were rendered properly in IE 8.

However, in IE 9, it is not he case.
headers and columns are mislined, and both columns and headers don't take 100% width of the screen.
They are squezeed to left and about 50% of the width.
Using

<

 

meta http-equiv="X-UA-Compatible" content="IE=8" />

 

 

 

doesn't help

For now, We would prefere to keep our site IE 8 compatible and force documents to IE8 mode
What prevents IE to use IE8 mode for RadGrid on our pages?

Version of telerik we use is 2010.1.415.35

Thanks,
Marijana

Marijana Cubra
Top achievements
Rank 1
 asked on 07 Apr 2011
5 answers
146 views
Hi,
I have a requirement to build a RadGrid entirely programmatically that is capable of:
a) Filtering
b) Showing a detail table

In order to get filtering working I can't use simple databinding with a dataset so I've chosen to use an ObjectDataSource . The problem is that I can't seem to set the "SelectParameters" for the ObjectDataSource that populates the detail table (you seem to only be able to do this declaratively).  

////Create ObjectDataSource for Detail table
            myDataTable2 = new DataTableWrapper(sourceDataTable2);
            t = myDataTable.GetType();
            objDataSource = new ObjectDataSource();
            objDataSource.ID = "myDataSource2";
            objDataSource.TypeName = t.AssemblyQualifiedName;
            objDataSource.SelectMethod = "GetDetailTable";
            //objDataSource.SelectParameters <-- need to set this somehow but it is readonly!!!!
            objDataSource.ObjectCreating += new ObjectDataSourceObjectEventHandler(objDataSource2_ObjectCreating);
            this.Controls.Add(objDataSource);


If anyone can help me I'd appreciate it.

Thanks,

Nick
Pavlina
Telerik team
 answered on 07 Apr 2011
4 answers
834 views
Dear Sirs!
I do know how access the controls in ItemTemplate of RadGrid.
But I cannot access the controls in HeaderTemplate!.

Can you help me?

Thank you very much in advance

Boris
Boris
Top achievements
Rank 1
 answered on 07 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?