Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
132 views
I have a RadEditor on a page in a password secured admin section of my website. When I load the page, I am loading the content from my SQL Server 2005 database. Any image included in the content comes up as a red x instead of displaying the image. If I go into the image manager and replace it, the image shows up fine until the page is reloaded, then it goes back to the red x. When I load the content into my home page, the images display correctly (I use an asp repeater control). How do I fix the red x issue in rad editor?

aspx code:
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
                    </telerik:RadScriptManager>                   
              
              <span class="home_intro">Page Content:</span><br />
                <telerik:radeditor ID="redPageContent" runat="server" Height="1050px"
                Width="576">
                    <ImageManager UploadPaths="~/assets/images" ViewPaths="~/assets/images" />
                                        <Content></Content>
                </telerik:radeditor>

c# code:
protected void GetText()
    {
        string ID = Request.QueryString["ID"].ToString();
        // Set variables & db connection
        DataTable objDs = new DataTable();
        SqlConnection myConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["CMI"].ConnectionString);
        SqlDataAdapter da = new SqlDataAdapter("SELECT ContentDesc, ContentSidebar, ContentPage, ContentSubPage FROM tblContent WHERE ContentID=" + ID + ";", myConnection);
        myConnection.Open();
        da.Fill(objDs);
        if (objDs.Rows.Count > 0)
        {
            DataRow myRow = objDs.Rows[0];
            redPageContent.Content = myRow["ContentDesc"].ToString();
            redSidebarContent.Content = myRow["ContentSidebar"].ToString();
            lblPageName.Text = myRow["ContentPage"].ToString() + " - " + myRow["ContentSubPage"].ToString();
        }
        myConnection.Close();

    }
Shelley
Top achievements
Rank 1
 answered on 11 Jun 2009
1 answer
111 views
Hello group,
ASP.NET 2.0, VISTA, IE 7.0.5730.13, ASPNET AJAX Q1 2009, prefer VB.NET

I have a grid that I have bound to an ILIST of custom business objects and want to use the radGrid's paging ability with it.

I've gotten the grid to bind and load the first page.  Everything looks great.

When I click on the pager to move to the next page i get a callback (i'm using the RadAjaxManager) the callback happens and the grid dissapears.

I know this isn't a ton of great information but i'm frankly not sure where to start looking.

Any guidance on where to start troubleshooting this?

Many thanks
Will


Daniel
Telerik team
 answered on 11 Jun 2009
1 answer
123 views
I posted earlier about the conditional change of colors for rows but specifically the issue is the values are coming up as a html space.
The value of the data-bound cells are Boolean so how do i get the value on databind when they are essentially now checkboxes?
really stuck here, any help would be appreciated.

If (TypeOf (e.Item) Is GridDataItem) Then 
                'Get the instance of the right type 
                Dim dataBoundItem As GridDataItem = e.Item 
'how do i get the value of the Boolean databound column??? 
'this does not work - it only produces a string of "&nbsp;" 
if dataBoundItem("Ready").Text = x then 
end if 
 
End If 


UPDATE: figured it out. for those looking for a solution. 
If (TypeOf (e.Item) Is GridDataItem) Then 
                'Get the instance of the right type 
                Dim dataBoundItem As GridDataItem = DirectCast(e.Item, GridDataItem) 
                Dim cbPause As CheckBox = dataBoundItem("Pause").Controls.Item(0) 
'get val of check box 
 
end if 
Daniel
Telerik team
 answered on 11 Jun 2009
1 answer
90 views
Hello,

I have a grid that i wish to export ot excel.
The code is seemingly straight forward

 

protected void Button1_Click(object sender, EventArgs e)
        {
            radDeferredIncome.ExportSettings.IgnorePaging = true;
            radDeferredIncome.ExportSettings.OpenInNewWindow = true;
            radDeferredIncome.ExportSettings.ExportOnlyData = true;
            radDeferredIncome.ExportSettings.Excel.Format = GridExcelExportFormat.ExcelML;
 
            radDeferredIncome.MasterTableView.ExportToExcel();
        }

The problem is any column that is of type string does not show up in excel.  All the bounnd and numeric columns that have a type of Int32 do.  Has anyone else had this issue?  Is there a fix?


Thanks

John

 

Daniel
Telerik team
 answered on 11 Jun 2009
1 answer
204 views
I am trying to change the rows back and foreground color based on data gleaned from cells. I have tried the below code but the cell data being returned is "&nbsp;" not the Boolean i was expecting from the sql data bound cells.

what am i doing wrong?

Private Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound 
        Try 
            If (TypeOf (e.Item) Is GridDataItem) Then 
                'Get the instance of the right type 
                Dim dataBoundItem As GridDataItem = e.Item 
 
                Debug.WriteLine(dataBoundItem("pause").Text) 
                Dim rclr As Drawing.Color 
                Dim tclr As Drawing.Color 
                If dataBoundItem("pause").Text = True Then 
                    rclr = Drawing.Color.DarkOrange 
                    tclr = Drawing.Color.Black 
                    GoTo RowSet 
                End If 
                If dataBoundItem("ready").Text = True And dataBoundItem("run").Text = True And dataBoundItem("done").Text = True Then 
                    'done 
                    rclr = Drawing.Color.Black 
                    tclr = Drawing.Color.Gray 
                ElseIf dataBoundItem("ready").Text = True And dataBoundItem("run").Text = True And dataBoundItem("done").Text = False Then 
                    'running  
                    rclr = Drawing.Color.DarkSalmon 
                    tclr = Drawing.Color.Black 
 
                ElseIf dataBoundItem("ready").Text = True And dataBoundItem("run").Text = False And dataBoundItem("done").Text = False Then 
                    'ready 
                    rclr = Drawing.Color.DarkOliveGreen 
                    tclr = Drawing.Color.Black 
                Else 
                    'not set, dont change a thing, well maybe do it incase 
                    rclr = Drawing.Color.Black 
                    tclr = Drawing.Color.White 
                End If 
RowSet: 
                Dim Row As TableRow 
                Row = CType(e.Item, TableRow) 
                Row.BackColor = rclr 
                Row.ForeColor = tclr 
            End If 
 
        Catch ex As Exception 
 
        End Try 
    End Sub 
 
Daniel
Telerik team
 answered on 11 Jun 2009
3 answers
209 views
I have fileupload1 being used by client to upload excel file to radgrid and then to DB.  Problem is the fileupload reads the server location and not the client location of the file before uploading to the radgrid.  So not really sure what to do?  I've researched some people saying it isn't possible to read the location of client side due to security but it's the client side upload so don't know why that wouldn't work.  Here is some of my code because it still reads from server so I don't know what else to do.

    protected void btnView_Click(object sender, EventArgs e)  
    {  
        string filename = FileUpload1.FileName.ToString();  
        this.ocAccounts = this.oExcelHelper.LoadExcel(filename);  
        rgBulkEntry.DataSource = this.ocAccounts;  
        rgBulkEntry.DataBind();  
        Session.Add("Accounts", this.ocAccounts);  
    } 

permissions on that server have been granted to network service and aspnet....

Thanks in advance.
Jon-Jon Kershaw
Top achievements
Rank 2
 answered on 11 Jun 2009
2 answers
149 views
Hi,

I want to show one confirmation message on changing the combobox item for only one particlar item. I want to cancel the selection if clicked on cancel. Can i do this on client side using javascript? any help is appreatiated.
Benjamin
Top achievements
Rank 1
 answered on 11 Jun 2009
1 answer
108 views
I just upgraded to the newest release in an attempt to fix another problem, now the trigger for closing my dock does not work.

I have it setup just like the example, it is fired when I move a dock, but for some reason the close does not fire the save method.

Here is my code which is straight from the example

AsyncPostBackTrigger saveStateTrigger = new AsyncPostBackTrigger(); 
saveStateTrigger.ControlID = dock.ID; 
saveStateTrigger.EventName = "DockPositionChanged"; 
UpdatePanel1.Triggers.Add(saveStateTrigger); 
 
saveStateTrigger = new AsyncPostBackTrigger(); 
saveStateTrigger.ControlID = dock.ID; 
saveStateTrigger.EventName = "Command"; 
UpdatePanel1.Triggers.Add(saveStateTrigger); 


Thanks
David Moore
Top achievements
Rank 1
 answered on 11 Jun 2009
2 answers
1.7K+ views
Does the Telerik.Web.UI.DialogHandler.aspx file exist as an independent file? And, if so, what directory does it reside in?

I have a url rewrite handler which is somehow messing up the dialogs. I have tried bypassing the url rewrite, but for some reason the dialogHandler.aspx file is being sought in one of my directories, and it does not exist anywhere within my solution.

-Ken Williams
mstevens
Top achievements
Rank 1
 answered on 11 Jun 2009
2 answers
109 views
Hi, I'm working with a RadGrid on a web application, and I'm usin the EditFormSettings to customize the Edit Form in my grid, inside I have 2 checkboxes and I would like to get the value of that controls so then when CheckBox1 is True, the other one must be False. I used to do this with a formview typing this code:
Dim CheckBox1 As CheckBox = Ctype(FormView.FindControl("CheckBox1"), CheckBox)

but now with this RadGrid I cant get the value, hope anyone could help me
Dany V
Top achievements
Rank 1
 answered on 11 Jun 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?