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

I am expriencing an object expected error:

 

function OpenPositionedWindow(oButton, url, windowName) {

 

 

var oWnd = window.radopen(url, windowName);

 

}


function openWin() {

 

var oWnd = radopen("http://www.google.com", "RadWindow1");

oWnd.setSize(500, 500);

oWnd.center();


<

 

button onclick="openWin(); return false;">Test</button>


I am using Q1 2009.

 

Georgi Tunev
Telerik team
 answered on 26 Sep 2009
1 answer
160 views
Hi,

I'm trying to delete a record from the RadGrid.
So i'm handling the ondeletecommand like this:

protected void AppointmentsGrid_DeleteCommand( object source, GridCommandEventArgs e )  
    {  
      DALDataContext dc = new DALDataContext();  
 
      int appointmentID = (int)e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["AppointmentID"];  
      dc.Appointments.DeleteOnSubmit(dc.GetAppointmentByID(appointmentID));  
      dc.SubmitChanges();  
 
      AppointmentsGrid.DataBind();  
    } 

The code above works fine, but this is not an easy way to get the appointmentID.
Unfortunately i can't the following code to work:

DALDataContext dc = new DALDataContext();  
 
vw_Appointment appointment = (vw_Appointment)e.Item.DataItem;  
 
dc.Appointments.DeleteOnSubmit(dc.GetAppointmentByID(appointment.AppointmentID));  
dc.SubmitChanges(); 

Because the dataitem seems to be null all the time??
Is there an explanation for this?
Vlad
Telerik team
 answered on 26 Sep 2009
3 answers
153 views
I want to create a nested Grid and would like to be able to apply some formatting for rows in the master table if there are no child records yet created. I assume I need to put code in the ItemCreated event just not sure where to go from there. Any help would be appreciated.
AkAlan
Top achievements
Rank 2
 answered on 25 Sep 2009
7 answers
1.0K+ views
Hi, I have a grid that uses the [Add new record] button in the Command row. I click the button and the insert row appears (in-line) and all works great.

My question is how do I set the grid so that this command row is showing when the grid first loads and always shows?

Thanks
Sameer Alibhai
Top achievements
Rank 1
 answered on 25 Sep 2009
6 answers
673 views
I have a Radgird that has a GridDropDownColumn
<telerik:GridDropDownColumn DataField="SubscriptionID" HeaderText="Subscription"   
                    ListTextField="SubscriptionDescription" ListValueField="SubscriptionTypeID" UniqueName="SubscriptionTypeID"/> 

In code behind I get all the possible values
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)  
        {  
            if (e.Item is GridDataItem)  
            {  
                if (!_isBound)  
                {  
                      CapitalPortalDataContext db = new CapitalPortalDataContext();  
                      var nSubscriptions = from s in db.Subscriptions.Where(s => (bool)s.Active)  
                                           select new  
                                           {  
                                               s.SubscriptionTypeID,  
                                               s.SubscriptionDescription  
                                           };  
                    
                        (((GridDropDownColumnEditor)  
                        ((GridDropDownColumn)RadGrid1.MasterTableView.GetColumnSafe("SubscriptionTypeID")).ColumnEditor)).DataSource = nSubscriptions;                 
                      
                    _isBound = true;  
                    
                }  
            }  
        } 


What I would like to do is add another item at index 0
like to add a value of 0 and text of "Select Type"

in a normal dropdown you would create the item and add to the dropdown after the databind.  How is this possible in the radgrid?
Eric Klein
Top achievements
Rank 1
 answered on 25 Sep 2009
1 answer
177 views
How can I disable scroll bars on RadDocks and RadDockZones?

The scroll bars show automatically every time the content inside is larger than the dock and I don't seem to be able to keep this under control.

Thank you!
TelerikUser
Top achievements
Rank 1
 answered on 25 Sep 2009
0 answers
37 views

Hi
Please find me the solution, Rad upload is not looking good in Mozilla browser it is showing the black spot in the right side of the control and some time it is not uploading the image. So please give me solution.

Thanks & regards
Pankaj Tyagi
pankaj
Top achievements
Rank 1
 asked on 25 Sep 2009
2 answers
133 views
Hello,

I have an ASP.NET applcation that i want to convert over to using the Telerik controls and i'm wondering if anyone has configured a tag list comparison of the 2 approaches?

For example in ASP.NET you would specify:

<asp:BoundField


and in Telerik you would specify:
<Telerik:GridBoundColumn

i believe.

So has anyone seen such a list by any chance?

Thanks very much!
Bob
Top achievements
Rank 1
 answered on 25 Sep 2009
4 answers
157 views
Hi, its my first time to use Radeditor. I was just wondering if I can change some text color during preview mode using some of my custom tool.
Heres the situation. Text are already created by other user and the only modification that this page will do, is to do some text highlight and color change. If they are going to do this in design mode they can alter the text by adding and removing some. So I just wanted to make the changes in preview mode only or maybe a readonly but when they do some text hightlight and clicking my custom button it will update the preview... Is there a way that this can be done? Any inputs would be very much appreciated.

Im using ASP.NET AJAX Q1 2009

Thanks in advance,
RJ
RJ
Top achievements
Rank 1
 answered on 25 Sep 2009
1 answer
159 views
Where can i find some examples of using a RADUpload in a grid that doesnt use GridBinaryImageColumn
Im storing the URL of the image, not the binary contents of the image itself

The method im using doesnt work as UploadedFiles are always zero, heres how Im trying to make it work, in my grid

<telerik:GridTemplateColumn HeaderText="Image File" UniqueName="ImageUpload">  
                        <ItemTemplate> 
                        <asp:Label ID="LabelImage" runat="server" Text='<%# Eval("FileName") %>'></asp:Label> 
                        </ItemTemplate> 
                        <EditItemTemplate> 
                                <telerik:RadUpload ID="RadUploadImage" runat="server"   
                                InitialFileInputsCount="1" MaxFileInputsCount="1" 
                                ControlObjectsVisibility="None" MaxFileSize="100000"   
                                AllowedFileExtensions=".jpg,.gif,.jpeg" TargetFolder="~/Uploads"/>  
                        </EditItemTemplate> 
                    </telerik:GridTemplateColumn> 

and then in my codebehind

protected void RadGridPanelImages_InsertCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)  
        {  
            var editableItem = ((GridEditableItem)e.Item);  
            string thumbURL = string.Empty;  
            string ImageURL = string.Empty;  
            string url = TheCompanyBL.Helpers.GetSiteURL();  
            string ImageUploadURL = url + "/Uploads/";  
              
 
              
            RadComboBox rcb = (RadComboBox)e.Item.FindControl("RadComboBoxPanelID");  
            if (rcb != null)  
            {  
                ip.PanelID = int.Parse(rcb.SelectedValue);  
            }  
            else  
            {  
                ip.PanelID = -1;  
            }  
              
            int id = -1;  
            RadUpload ru = (RadUpload)e.Item.FindControl("RadUploadImage");  
            if (null != ru)  
            {  
                string target = Server.MapPath(ru.TargetFolder);  
                string sFileType = ru.UploadedFiles[0].GetExtension(); ---  this generates an error even though I HAVE selected a file  
                  
                        ip.FileName = ru.UploadedFiles[0].FileName;  
                        imagemanager.ResizeAndSave(ru.UploadedFiles[0], ImageUploadURL, target, "PanelImages", true, out thumbURL);  
                        imagemanager.ResizeAndSave(ru.UploadedFiles[0], ImageUploadURL, target, "PanelImages", false, out ImageURL);  
                        ip.ImageURL = ImageURL;  
                        ip.ThumbnailURL = thumbURL;  
                      
            }  
 
            if (!String.IsNullOrEmpty(thumbURL) && !String.IsNullOrEmpty(ImageURL))  
            {  
                string err = panelmanager.Add(ip, out id);  
            }  
             
 
        } 
Atanas Korchev
Telerik team
 answered on 25 Sep 2009
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?