Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
78 views
After programamtically changing the expanded GridItem setting the property RadGridItem.Expanded to true, the RadGrid_ItemCommand event is not fired. It should be automatically fired since it should behave the same as expanding the item with a mouse click.
Princy
Top achievements
Rank 2
 answered on 25 Oct 2010
4 answers
190 views
hi

I've run into another wee issue, I have a text box (bog standard one) that when I type in part or all of a company name populates a dropdown commbobox (with checkboxes), that all works fine what  need to do is when they select a company from the new list I want it to update another list, but I dont seem to have anyway of capturing the fact that the text has changed in the combobox. I've tried all manner of ways, behind and in the page but I cant get the  OnTextChanged="CaseType_TextChanged" in the same way it works for the text box. Ive tried  ddlCaseList.TextChanged +=new EventHandler(ddlCaseList_TextChanged); but to no avail. I just need to know where to put the the call which captures the event that will fire the event handler!


any thoughts ?

thanks
Pavlina
Telerik team
 answered on 25 Oct 2010
2 answers
134 views
Hi guys,

I am using your Editor and I have 2 issues :

1- On Deployment I get the following error :

Could not find a part of the path 'c:\windows\system32\inetsrv\~\App_Code\ToolsFile.xml'.

I have set ToolsFile="~/App_Code/ToolsFile.xml" in Editor Control. the xml file is located inside the App_Code folder.

2- I can't find a way to able rtl writing in the editor. I have a multilingual website and this is a show stopper
.

Any suggestions? Thanks.




Joseph
Top achievements
Rank 1
 answered on 25 Oct 2010
1 answer
117 views
Can I reference the same ColumnEditor from two different column's ColumnEditorID property in the same RadGrid? It would appear I cannot. If not, I suppose I do not see the advantage that declarative column editors have over TemplateColumns.
Tsvetina
Telerik team
 answered on 25 Oct 2010
2 answers
64 views
Hi All,

I have an issue where if I use the MediaManager to link in a wmv file to the RadEditor it hangs IE6 on the following Reponse.Redirect.

On the Button_Click event I am calling a method to save to the database.
<asp:Button runat="server" ID="SubmitButton" Text="Submit For Approval" CausesValidation="true" OnClick="SubmitButton_Click" OnClientClick="javascript:window.scrollTo(0,0);" />

Which calls the method in the code behind.
    Protected Sub SubmitButton_Click(ByVal sender As ObjectByVal e As EventArgsHandles SubmitButton.Click
        CreateNewArticle()
    End Sub

    Private Sub CreateNewArticle()

        Dim newArtID As Int32 = 0
        Dim body As String = String.Empty
        Dim art As Article = Nothing
        Dim artBody As ArticleDetail = Nothing

        Try
            'create the new article
            art = Article.CreateArticle(-1,
                                        articletitle.Text,
                                        articlesummary.Text,
                                        False,
                                        Date.Now,
                                        System.Web.HttpContext.Current.User.Identity.Name.Remove(0, InStr(System.Web.HttpContext.Current.User.Identity.Name, "\")).Replace("."" ").ToUpper,
                                        GetVisibiliy)
            art.UpdatedDate = Date.Now

            If articlebody.Content.Contains("<img"Then
                art.ThumbnailImage = Mid(articlebody.Content, InStr(articlebody.Content, "src=") + 5, InStr(InStr(articlebody.Content, "src=") + 5, articlebody.Content, "/>") - (InStr(articlebody.Content, "src=") + 5)).Replace(Chr(34), "").TrimEnd
            Else
                art.ThumbnailImage = "~/Content/Images/JCBLogo.png"
            End If

            'create the article detail
            artBody = ArticleDetail.CreateArticleDetail(-1, -1, articlebody.Content.Replace("&nbsp;"" "))

            'save to the db
            Using insertContext As New JCB_IntranetEntities
                insertContext.AddToArticles(art)
                insertContext.AddToArticleDetails(artBody)
                insertContext.SaveChanges()
            End Using

            newArtID = art.ArticleID

        Catch ex As Exception
            ErrorLogging.AddNewErrorLogEvent(ex)
            Throw
        Finally
            If articlebody.Content IsNot Nothing Then
                articlebody.Content = Nothing
                articlebody.Dispose()
            End If
            If artBody IsNot Nothing Then artBody = Nothing
            If art IsNot Nothing Then art = Nothing
        End Try

        'If the save worked then redirect to the article
        If newArtID > 0 Then
            Response.Redirect(String.Format("~/Articles/Article.aspx?ArticleID={0}", newArtID))
        End If

    End Sub
The data saves correctly but hangs on the Response.Redirect at the bottom of the method. I have checked the Page Load in the called page and the code runs through as expected. I did check to see if it was a problem with the target page by changing the redirect to www.google.com and experienced the same behaviour.

This only seems to happen if I embed a video into the editor, if I use just text & images the save and redirect works without issue. I have also confirmed that it works in Firefox & IE7/8.

Any thoughts you have would be welcome.

Regards

Phil Murray
Rumen
Telerik team
 answered on 25 Oct 2010
2 answers
308 views
Dear all

I have a RadGrid contains 3 columns as below:
 
<telerik:GridBoundColumn DataField="ID" HeaderText="ID" 
    ReadOnly="True" UniqueName="column1">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Seller" HeaderText="Seller" 
    ReadOnly="True" UniqueName="column2">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Amount" HeaderText="Amount" 
    UniqueName="column3">
</telerik:GridBoundColumn>

2 of them are read only and user can only edit in column3.

I get the edited item as below:

But I can't get the value of the first column , the "ID" ?!!!!

protected void grdSellers_ItemCommand(object source, GridCommandEventArgs e)
{
    switch (e.CommandName)
    {
        case "Update":
            GridEditableItem editedItem = e.Item as GridEditableItem;
            TableCell cell = editedItem["column3"];  
            string itemValue = (cell.Controls[0] as TextBox).Text;
              
            //Get Id of editable item ??
    }
}


I tried the solution in this post:
http://www.telerik.com/community/forums/aspnet-ajax/grid/accessing-readonly-hidden-fields-in-edit-mode-radgrid.aspx

but it generate error about ParentItem !

Could any one help me in that issue ??

Regards
Noha
Top achievements
Rank 1
 answered on 25 Oct 2010
1 answer
183 views
Hello,

I want to change the column order in code (in Page_Load).

i write this code:
    
    GridColumn gc1 = MyGrid.Columns.FindByDataField("ID");
    GridColumn gc2 = MyGrid.Columns.FindByDataField("NAME");
    MyGrid.Columns.Remove(gc1);
    MyGrid.Columns.Remove(gc2);
    MyGrid.Columns.AddAt(0,gc2);
    MyGrid.Columns.AddAt(0,gc1);

with this code i took "ID" column and "NAME" column and put them right in the start.
When the page is loaded in the first time, everything look good, the "ID" is at the start and the "Name" is right after.
when i click on the grid or make any postback to the server i get this error:

"Sys.WebForms.PageRequestManagerServerException: Failed to load viewstate. the control tree into which viewsate being loaded must match the control tree that was used to save viewstate during the previous request. for example, when adding controls dynamically the controls added during a post back must match the type and position of the control added during the initial request

Can you please help me with changed index spot during page_load event?
I have no idea what to do with this error.


Yael.
Princy
Top achievements
Rank 2
 answered on 25 Oct 2010
1 answer
100 views
Hello,

I am unable to upload a 75 mb file using your demo.

After around 20MB is uploaded i get the message,"the server cannot find the web page"!

Please let me know what's the problem?

Thank you

Regards
Raj

Princy
Top achievements
Rank 2
 answered on 25 Oct 2010
7 answers
804 views

I have quite a complex set of classes which parses an XML file or RSS feeds.

I know that radgrid can bind to an arraylist, so I have this code:

  protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{

ArrayList arraylist = new ArrayList();


if (dict != null)
{
foreach (var v in dict)
{




arraylist.Add(new RSSFeedItem(v.Date, v.Description, v.Title, v.Title));
RadGrid1.DataSource = arraylist;


}
}
}

"dict" is a collection of articles in an RSS feed. So for every article inside, I add that article's date, link, description, etc to the array list, and then set the datasource to that arraylist.

On the last line of the code, I check the grid's state and it is containing the items (e.g. first pass in the loop, there is a count of 1, etc). Datasource has a count of 25 which contains the articles.

Also, how can I get the row count programatically?

Thanks

Princy
Top achievements
Rank 2
 answered on 25 Oct 2010
3 answers
110 views
Is it possible to use RadEditor as text editor? I want to use the toolbar capabilities for injecting content but I need the editor to produce text instead of HTML and maintain new lines etc.
Rumen
Telerik team
 answered on 25 Oct 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?