Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
1.0K+ views
Hi all, I am having trouble with the visible property of an  GridTemplateColumn.

I have an AutoGenerated EditType edit screen because of the dynamic nature of the requirement. I have added a necessary dropdown onto this edit area by adding an GridTemplateColumn to the <Columns> area of the radgrid.

I need this GridTemplateColumn to only be visible under certain circumstances but I have no luck. Setting the visible property = "false" in the tag itself does not work. Nor does setting the .Display, .ReadOnly or .Visible properties in the code behind. I have tried hooking into the column in both ItemDataBound and PreRender events. I have tried finding the column from the MasterTable and other methods as well.

Every time I find the column correctly (verified by debugging the UniqueName) but the column is always visible.

I tried adding a label inside the GridTemplateColumn and set EditFormHeaderTextFormat to an empty string but the column space is reserved and thus my label is indented.

A solution to either would solve this issue. Need some help please!

Thanks :)

EDIT - My column is of type EditItemTemplate so that it shows on the Edit Form. If I change it to ItemTemplate I am able to make the column Visible = false
Brad
Top achievements
Rank 1
 answered on 04 May 2011
1 answer
114 views
Hi ,
I was tring to select TreeListDataItem dynamically using the following code.

foreach (TreeListDataItem item in RadTreeList1.Items)
                {
                    if (value != null && value.Count > 0)
                    {
                        foreach (Facility facility in value.Facility)
                        {
                            if (item["Key"].Text == facility.Key)
                            {
                                item.Selected = true;
                                break;
                            }
                        }
                    }
                }

However what I found that the only the parent items can be selected.
I am not able to select any of the child or sub child items.
Please advice what the best way to select any child items if they need to be selected.

Thanks in advance.

Veli
Telerik team
 answered on 04 May 2011
3 answers
38 views
Hi.

I save 3 images in the folder and images name in the database. Like this i added 3 records. Here is my code

  foreach (UploadedFile f in RadUpload1.UploadedFiles)
            {
                string strfolder;
                dataquery dq = new dataquery();
                string strsql;
                strfolder = Server.MapPath("../noon");
                f.SaveAs(strfolder + "\\" + f.GetName(), true);
                strsql = "insert into images(imid,imagname) values('1','" + f.GetName() + "')";
                dq.ExecuteQuery(strsql);
            }
Now i want to update my record and images. but i do't know how to show images in the Radupload control or then i what to write code for update.

Please can you see my above code and help me to write update code and select record images in the Radupload. I am not using Radgrid.

Thank you so much for help.

 

 

 

 

 

 

 

Peter Filipov
Telerik team
 answered on 04 May 2011
3 answers
133 views
I added an image button to the title bar in code behind, everything works well but when hovering over the button I get the drag cursor and I can not click the image Button. This happen only in IE8 , in chrome it works perfectly ( I am able to click the image button).

Any ideas?      
Pero
Telerik team
 answered on 04 May 2011
1 answer
129 views
Failed to Load Viewstate Problem
Whenever, I try to upload with the RadAsyncUpload control I get the following error.

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.


Is there something I need to do to avoid this problem?
Peter Filipov
Telerik team
 answered on 04 May 2011
1 answer
346 views
I like this feature that limits the filtering options in the RadGrid based on the column's data type.

Is there a way to override which options are available for a particular data type?  (I'm manually implementing the web service data source for the grid, and I'm have not implemented all of them yet.)
Iana Tsolova
Telerik team
 answered on 04 May 2011
3 answers
1.3K+ views
I want to remove cell padding space in the telerik grid coloumn
Galin
Telerik team
 answered on 04 May 2011
1 answer
242 views
Hi Guys, 

I have a problem Im hoping you can help me with.  

I have a RadGrid, with a RadFilter on it.  The RadFilter button is an ItemCommand on the RadGrid.  I have since put another ItemCommand on to call a RadWindow to display my insert record aspx page.  

However I cant seem to get the ItemCommand to link to the Call Function

Here is the ASPX Code
<CommandItemTemplate>
                    <telerik:RadToolBar runat="server" ID="RadToolBar1" OnButtonClick="RadToolBar1_ButtonClick Skin="WebBlue">
                        <Items>
                            <telerik:RadToolBarButton Text="Apply filter" CommandName="FilterRadGrid"
                            ImageUrl="~/Images/Refresh.gif"/>
                            <telerik:RadToolBarButton Text="Add new" CommandName="xInsert"
                            ImageUrl="~/Images/AddRecord.gif" />                 
                             
                        </Items>
                    </telerik:RadToolBar>
                     
                </CommandItemTemplate>


Here is my VB Code
Protected Sub RadGrid1_ItemCommand(ByVal source As Object, ByVal e As GridCommandEventArgs)
        If e.CommandName = "FilterRadGrid" Then
            RadFilter1.FireApplyCommand()
        Else
            If e.CommandName = "xInsert" Then
                Dim newWindow As New Telerik.Web.UI.RadWindow()
                newWindow.ID = "InsertWindow"
                newWindow.NavigateUrl = "~/XDW/EditPalletQty.aspx"
                newWindow.VisibleOnPageLoad = True
                RadWindowManager1.Windows.Add(newWindow)
 
 
            End If
 
        End If
    End Sub

The filter works great however I cant seem to get the RadGrid to fire.  I have also tried calling the client side javascript from the VB code however that didnt fire either.

Any help is appriciated.

Cheers
Joel
Iana Tsolova
Telerik team
 answered on 04 May 2011
1 answer
113 views
Hi,
i am using radfilter for my crystalreport. Now i am not using fieldeditor & listview (it is set display : none becz no need for me) in it , all expression i am adding with sqldatasorce.

(like below)
<%@ Register Assembly="CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"
    Namespace="CrystalDecisions.Web" TagPrefix="CR" %>
<%@ Register Assembly="Telerik.Web.UI, Version=2010.2.929.35, Culture=neutral, PublicKeyToken="5689dfr78165798545"
    Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>



<telerik:RadFilter ID="RadFilter3" runat="server"  
            FilterContainerID="RadListView2"  ExpressionPreviewPosition="Bottom"    onapplyexpressions="RadFilter3_ApplyExpressions" 
        CssClass="RadComboBox_Default" onitemcommand="RadFilter3_ItemCommand"    >

 <telerik:RadListView ID="RadListView2" DataSourceID="ChargeSelection" Width="100%"
                    PageSize="6" AllowPaging="True" runat="server">
                    
                      <ItemTemplate >
                        <div class="rlvA" style="height: 120px; width: 270px; margin-top: 5px; margin-left: 2px;
                            margin-bottom: 20px; padding-left: 10px; border-style: none; display:none; ">
                            <fieldset style="height: 100%">
                                <table>
                                    <tr>
                                        <td>
                                            <strong>OrderID:</strong>
                                            <asp:Label ID="OrderIDLabel" runat="server" />
                                            <br />
                                            <strong>Order date:</strong>
                                            <asp:Label ID="OrderDateLabel" runat="server" />
                                            <br />
                                            <strong>Ship city:</strong>
                                            <asp:Label ID="ShipCityLabel" runat="server" />
                                            <br />
                                            <strong>Ship country:</strong>
                                            <asp:Label ID="ShipCountryLabel" runat="server" />
                                            <br />
                                            <strong>Ship name:</strong>
                                            <asp:Label ID="ShipNameLabel" runat="server" />
                                            <br />
                                        </td>
                                        <td>
                                            <img src="Img/ordertracking.gif" alt="" />
                                        </td>
                                    </tr>
                                </table>
                            </fieldset>
                        </div>
                    </ItemTemplate>
                   
                </telerik:RadListView>

<asp:SqlDataSource ID="ChargeSelection" ConnectionString="<%$ ConnectionStrings:PMNotesString %>"
    ProviderName="System.Data.SqlClient" SelectCommand="SELECT CPTCode,ChargeId,Date1,Account# FROM View_1"
    runat="server" ></asp:SqlDataSource>

 (see attach file)
Now when i select on add expression like  " Date1 - equals to - 3/21/2011 12:00 AM"  from radfilter.  In this expression you can see that date will be selected using calendar pop up & there is also time view pop up. So my problem is that i want to disable time view pop up becz no need for me &  also change date formate using calender pop up like  YYYY-MM-dd  (2011-03-21)  . Is it possible with RadFilter??? . If it is than please let me know how it could be possible??

Thank you
Ronak
Iana Tsolova
Telerik team
 answered on 04 May 2011
2 answers
95 views
Hi!

I have a strange behaviour in my web site. I load your radEditor via jquery/wcf (markup as below).

            <telerik:RadEditor ID="bindHtml" runat="server" 
                Height="400px" 
                EnableViewState="false" 
                AllowScripts="true"
                ClientIdMode="Static"
                RegisterWithScriptManager="false" />

In Chrome and IE this works fine. in FireFox I can´t change i design mode. Html mode works but not design. Any thoughts? /David
Dobromir
Telerik team
 answered on 04 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?