Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
131 views
hi,

i opened rad window, in this window i have controls etc'.
now, one of the control is button or hyperLink and when i push the button i want to see the result in the parent window no in the current radWindow, and i want to destroy the current window.

some one can help me, how to do this.

thanks in advance,
Udi 
Georgi Tunev
Telerik team
 answered on 06 Jul 2009
1 answer
155 views

Hi

      I am facing the problem in column rezising, i set the all of column width as fixed according to the table data. But the problem once i start to resize the column, it resizes the entire grid, so that i could not get the result as i expected.

I also set the ResizeGridOnColumnResize. But resize works on wothout giving Fixed column width.

Plz clarify me this doubt as soon as possible

Regards,
Appu
Shinu
Top achievements
Rank 2
 answered on 06 Jul 2009
1 answer
115 views
Error:

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Failed to load viewstate.  The control tree into which viewstate is 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 controls added during the initial request.



So, i really dont know how to overcome this....

If any one can help me Pls...............



-Leo.
Princy
Top achievements
Rank 2
 answered on 06 Jul 2009
3 answers
221 views
It seems like view state of the controls put in CommandItemTemplate is not maintained. Also changing any of the properties in command event handler does not have any effect on the control. Here is the grid markup

  <telerik:RadGrid ID="NotesGrid" EnableEmbeddedSkins="False" Skin="srunite" Width="100%" 
                AllowSorting="False" AllowPaging="False" AllowMultiRowSelection="False" runat="server" 
                GridLines="None" EnableViewState="true"> 
                <MasterTableView Width="100%" Summary="RadGrid table" AutoGenerateColumns="False" 
                    CommandItemDisplay="Top" TableLayout="Auto" GroupLoadMode="Client" AllowNaturalSort="false" 
                    AllowSorting="false"> 
                    <AlternatingItemStyle BackColor="#eeeeee" /> 
                    <CommandItemTemplate> 
                        <div class="gridActions"> 
                            Notes 
                            <asp:DropDownList ID="cmdFilterNoteType" runat="server" AutoPostBack="false" /> 
                            <asp:LinkButton ID="cmdShowAll" runat="server" AutoPostBack="true" CommandName="ShowAll" 
                                Text="Show All"  Visible="false"/> 
                            <asp:LinkButton ID="cmdShowLatest" runat="server" AutoPostBack="true" CommandName="ShowLatest" 
                                Text="Show Latest"  /> 
                        </div> 
                    </CommandItemTemplate> 


and here are event handlers

      protected void Page_Init(object sender, EventArgs e) 
        { 
            masterPage = (SiteMasterPages.BidModule)Master; 
            presenter.SetModel(masterPage.CurrentBid); 
 
 
            NotesGrid.ItemDataBound += new Telerik.Web.UI.GridItemEventHandler(NotesGrid_ItemDataBound); 
            NotesGrid.ItemCommand += new GridCommandEventHandler(NotesGrid_ItemCommand); 
        } 
 

First problem:
See how I am finding the  LinkButton and making it invisible, or assigning different text but when it renders nothing has changed. I can see it finding the control, I can debug and see that property has been changed, but it still renders these controls as if nothing has changed.  Why?

protected void NotesGrid_ItemCommand(object source, GridCommandEventArgs e)  
        {  
            if (e.CommandName == "ShowLatest")  
            {  
                presenter.ShowLatestNotes();  
                e.Item.FindControl("cmdShowLatest").Visible = false;  
                ((LinkButton)e.Item.FindControl("cmdShowLatest")).Text = "sdasdfdsaf";  
                e.Item.FindControl("cmdShowAll").Visible = true;  
            }  
            else if (e.CommandName == "ShowAll")  
            {  
                presenter.ShowAllNotes();  
                e.Item.FindControl("cmdShowAll").Visible = false;  
                e.Item.FindControl("cmdShowLatest").Visible = true;  
            }  
        }  

Second problem:
I have to rebind the dropdownlist that resides in commanditemtemplate on each postback as it does not maintain the viewstate. Why not?
  protected void NotesGrid_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e) 
        { 
            if (e.Item.ItemType == GridItemType.CommandItem) 
            { 
                if (!Page.IsPostBack) 
                { 
 
                    DropDownList filter = e.Item.FindControl("cmdFilterNoteType") as DropDownList; 
                    if (filter != null) 
                    { 
                        filter.DataSource = _notes.Select(x => x.Key); 
                        filter.DataBind(); 
 
                        filter.Items.Insert(0, new ListItem("All")); 
                    } 
                } 
            } 
            else if (e.Item.ItemType == GridItemType.GroupHeader) 
            { 
                GridTableCell cell = e.Item.Controls[0] as GridTableCell; 
                cell.Attributes.Add("noteType", ((System.Data.DataRowView)e.Item.DataItem).Row.ItemArray[0].ToString()); 
            } 
        } 




Shinu
Top achievements
Rank 2
 answered on 06 Jul 2009
3 answers
625 views
Hi, I have a hierarchical Grid with ShowGroupPanel set to true.  Our specs require that when the users group by a column, both the grouping and the hierarchy for each row inside that group should be collapsed.  I can accomplish the grouping part by setting the GroupsDefaultExpanded property to false, but when users expand each grouping, each underlying row will have its details expanded by default.   HierarchyDefaultExpanded = False only seems to work when no grouping is taking place.   Is there any way I can accomplish this without posting back to the server, either by setting a property to a specific value or through client-side code?   Thank you.
Princy
Top achievements
Rank 2
 answered on 06 Jul 2009
1 answer
69 views
Is there a Telerik control, assembly, or tool within my Premium Collection for .NET that can help in creating Calendar Files (e.g., *.cal, *.ics, *.vcs) for ASP.NET?

Thanks!
paolo
Top achievements
Rank 1
 answered on 06 Jul 2009
1 answer
123 views
Hi,

I have a download button a grid to allow the download of a file and I can't make it work.
I have the download on other page that works nice but in the grid I can't use it because it doesn't accept the code I used on the other page.
The code to the download is the following:

Descarregar contedo

<a href="anexos/<%# Eval("NomeAnexo")%>" class="descarregarConteudo" title="Descarregar contedo"><img src="imagens/page_white_put.png" class="descarregarConteudo" /> </a>

 



And I'm using the following HTML code to the download button:

<

 

telerik:GridButtonColumn ButtonType="ImageButton" ImageUrl="~/imagens/page_white_put.png" ItemStyle-HorizontalAlign="Center" HeaderText="Descarregar" HeaderStyle-HorizontalAlign="Center" text="Descarregar contedo"></telerik:GridButtonColumn>

Does anyone knows how can I solve this problem?
Thanks!

 

Princy
Top achievements
Rank 2
 answered on 06 Jul 2009
1 answer
110 views
 How can i create gridDropDownColumn and its related sqldatasource at runtime?

Thanks

Gilberto
Princy
Top achievements
Rank 2
 answered on 06 Jul 2009
1 answer
411 views
Attempting to use the code:
item["fieldname"] inside of an OnItemDataBound handler for my RadGrid results in the exception:
'Telerik.Web.UI.GridNotSupportedException'
    base {Telerik.Web.UI.GridException}: {"Item in insert mode does implement indexer only when the edit form is autogenerated"}'

Is there some other way to get to the data values in the OnItemDataBound, or some reasonable way to make this exception go away?  My RadGrid is backed by a List of custom objects, which are mapped via telerik:GridBoundColumn.  Autogenerating isn't an option, I need to use a form template for my client.

I tried searching the forums, but didn't find anything that explained this error.
David
Top achievements
Rank 1
 answered on 06 Jul 2009
5 answers
370 views
How do I set the default value to checked when inplace editing a GridCheckboxColumn?  Is this possible or would I have to use a template column with a checkbox set to checked?  Also are there any examples of using a dropdownlistcolumn?
Jonathan
Top achievements
Rank 1
 answered on 05 Jul 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?