Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
141 views
I know I can limit the file types that can be uploaded via AllowedFileExtensions, however, all it does is ignore bad file types. Since I am only allowing one file at a time to be uploaded, it would be nice if I could issue a radalert or something when the try to upload a type that is not allowed.
Any ideas?
Thanks ... Ed
Meaning Of Lights
Top achievements
Rank 2
 answered on 10 Dec 2008
1 answer
178 views
Hi,
I am trying to retrieve the user input from a rad grid input form. For some reasons that I do not want to get into right now, I am using an external button to the grid to trigger the 'save' command. i.e. I am not using a command item.

In the external button event i have the following:

void SaveButton_Click(object sender, EventArgs e) 
    { 
        foreach (GridEditableItem itm in MasterJobSchedulesGrid.EditItems) 
        { 
            Hashtable values = new Hashtable(); 
 
            itm.ExtractValues(values); 
            foreach (Parameter updateParam in MasterJobSchedulesDataSource.UpdateParameters) 
            { 
                updateParam.DefaultValue = Convert.ToString(values[updateParam.Name]); 
            } 
            MasterJobSchedulesDataSource.Update(); 
            itm.Edit = false; 
        } 
        MasterJobSchedulesGrid.Rebind(); 
    } 

The values returned are always null. I have also tried using the itm.OwnerTableView.ExtractValuesFromItem method, but it also gives me nulls.

Any help would be appreciated.

EmpowerIT
Top achievements
Rank 2
 answered on 10 Dec 2008
2 answers
316 views
Hi,

I have an RadTreeView with an custom item template for all nodes. Checkboxes are enabled, and my item template contains a RadComboBox with Load on demand.

I can't seem to figure out how to get the checkbox of that specific node checked when somebody clicks on the nodes radcombobox which resides in the item template. When i click the item template div itself the node does get selected, but when i click the radcombobox the node stays unselected. I couldn't find anything in the documentation, can somebody shed a light on this?

Below is my treeview definition, when i click on the asp:labels or the div itself it selects the node. When i click on the radcombobox it doens't.
        <telerik:RadTreeView ID="RadTreeView1" Runat="server" DataFieldID="ID"  
            DataFieldParentID="ParentWebId" DataSourceID="SharepointDataSource"  
            DataTextField="Title" DataValueField="Url" CheckBoxes="true" OnClientNodeClicked="ClientNodeClicked"> 
            <NodeTemplate> 
                <div> 
                    <asp:Label ID="SPTitle" runat="server"><%#DataBinder.Eval(Container,"Text") %></asp:Label> 
                    <asp:Label ID="SPURL" runat="server"><%#DataBinder.Eval(Container,"Value") %></asp:Label> 
                     <telerik:RadComboBox ID="SPGroup" runat="server"  
                        EnableLoadOnDemand="True" Text="Geen aangepaste rechten"  
                        OnClientItemsRequesting="OnClientItemsRequesting"> 
                      
                     <WebServiceSettings Path="../WebSrv/AddUserWebSrv.asmx" Method="GetRoles" /> 
                         <CollapseAnimation Duration="200" Type="OutQuint" /> 
                    </telerik:RadComboBox> 
                     
                </div> 
            </NodeTemplate> 
 
<CollapseAnimation Type="OutQuint" Duration="100"></CollapseAnimation> 
 
<ExpandAnimation Duration="100"></ExpandAnimation> 
        </telerik:RadTreeView> 
Bartdesign
Top achievements
Rank 2
 answered on 09 Dec 2008
6 answers
585 views
I created a nested grid using the example programmatically from here.


I want to add a Calculated Column to a radgrid and added the following code but am unsure how to define the datafields and expression.

         calculatedColumn = new GridCalculatedColumn();
            calculatedColumn.Expression = "AmountBilled-AmountReceived";
            calculatedColumn.HeaderText = "Outstanding Balance";
            calculatedColumn.DataFormatString = "{0:C}";
            tableViewProjects.Columns.Add(calculatedColumn);

3ms
Top achievements
Rank 2
 answered on 09 Dec 2008
1 answer
148 views
I am using the following code:

For Each f As UploadedFile In RadUpload1.UploadedFiles  
 
            Dim targetFolder As String = Session("UserDir")  
            Dim targetFileName As String = System.IO.Path.Combine(targetFolder, f.GetName)  
 
            If System.IO.File.Exists(targetFileName) Then 
                'Sets error label to visable and displays message.  
                lblUploadError1.Visible = True 
                lblUploadError1.Text = "File name " & f.GetName & " already exists!" 
            Else 
            'Save uploaded file(s) info to database  
 End Using
End IF
Next
 

The problem is that I want to display an error message for any of the 5 possible uploaded files by changing the lblUploadError1.Text thru lblUplaodError5.Text

So somehow I need to associate the f.GetName with each of the files that were uploaded.

Any suggestions?

Thanks,
Joe
Joe
Top achievements
Rank 2
 answered on 09 Dec 2008
4 answers
92 views
In my scheduler, the OnResourceHeaderCreated is not firing. I've paired down my Scheduler to try and make sure that it's not due to any other properties and it doesn't appear to be.

Has anyone else had this problem?

From what I can see, none of the demos are using this event, so I can't look at a working example there.

Thanks!

Jeff
Jeff Nafe
Top achievements
Rank 1
 answered on 09 Dec 2008
2 answers
150 views
Ok, so here is my dilemma. I have read through all the posts on here that are tagged with "FileExists". My upload control allows multiple files to be uploaded. This is tied to a form with other data. When the user clicks submit I need to submit the other data to a database and then I need to iterate through all of the files and insert records for each of those with the filename of the file on the server. Soooooo...if I hook up to RadUpload.FileExists and rename the file, how am I going to go through and insert records for each file with accurate names? I have heard suggestions to build a collection of strings. My question is with what?? I could easily create a collection of all the files that had to be renamed with their new names but that is not ALL of the files that were uploaded, it is just the ones that had to be renamed. So then I could iterate through the UploadedFiles collection but the problem with that is that it is going to also return the files that had to be renamed. Get what I am saying? End game: I just want to be able to insert a record into the DB for each file that is uploaded with the correct file name.

Thanks!
jfkrueger
Top achievements
Rank 1
 answered on 09 Dec 2008
1 answer
124 views
Hi,

We made 2 menu's one vertical (showing menu levels 1 and 2), and one horizontal (displaying menu levels 3 and 4)
The horizontal menu is only shown when menu items are available on the third level .
- When doing a mouse over on the vertical menu, the "hand" cursor is shown, indicating that a click is possible on this item.  Works perfect for the vertacal menu, but won't work in the horizontal menu.  Tried almost everything, so any suggestion is welcome.
- The second problem has to do with the presentation of the menu in firefox.  many of the properties defiined in the css are not shown in firefox. 

Check http://dnn.kasterlee.be if you'd like to see what i'm talking about ...

Thanks!
Kamen Bundev
Telerik team
 answered on 09 Dec 2008
3 answers
100 views
I am having a bit of a hard time with a RadMenu scenario.

I have a UserControl which contains a RadMenu. The UserControl is placed in Master Pages for the site. Most of the Menus are added dynamically at run-time. However, one item- always the last item in the list, is intended to display the date currently in active selection for the application. The menu expands to show a single templated item containing a RadCalendar. On the first load of a page, everything seems fine.

My troubles are as follow:
1. The RadCalendar always disappears on postback.
2. The event which I have tried every way I can find to register for the SelectionChanged Event of the RadCalendar, and which I would like to handle in the UserControl itself, does not fire.

Does anyone have any tips for this scenario? Anyone else have a similar implementation that is working? The code I found in the code library was unfortunately not very helpful. It gave me things to try, but so far nothing has worked.

Many thanks for any help!
Atanas Korchev
Telerik team
 answered on 09 Dec 2008
3 answers
169 views

Hello,

I have a quick question;

I use the following method to expand and collapse grid rows (client side) when I have a hierarchical grid;

*****************************************
var RadGrid1 = $find("<%= RadGrid1.ClientID %>");
for (var i = 0; i < RadGrid1.get_masterTableView().get_dataItems().length; i++) {
 var item = RadGrid1.get_masterTableView().get_dataItems()[i];
 var MasterTable = RadGrid1.get_masterTableView();
 var row = RadGrid1.get_masterTableView().get_dataItems()[i];
 var cell = MasterTable.getCellByColumnUniqueName(row, "ExpandColumn");

 if (cell.innerHTML != "") {
     if (gridExpanded == false) {
  item.set_expanded(true);
  gridChanged2 = true;
     }
     else {
  item.set_expanded(false);
  gridChanged2 = false;
     }
 }
}
gridExpanded = gridChanged2;
*****************************************

But now I need to expand and collapse a rid that is setup with Groups or "GroupBy" with GroupHeaders via client side code and I can't seem to find the proper object / property to make it work.

Can you please point me in the right direction? How do I expand and collapse a grid with client side code that is grouped?

Many thanks in advance,

Dave

Dave Navarro
Top achievements
Rank 2
 answered on 09 Dec 2008
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?