Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
159 views
I am trying to hide a column based on a value in the querystring and it continues to show: I have tried it 2 different ways and cannot figure out what I am doing wrong....

We are passing the country and if it is Canada we want to show the other column and if it is US we want to show the state drop downlist.



asp.net:
<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="dsLocation" GridLines="None"
             AllowAutomaticUpdates="True" AllowAutomaticInserts="True"  ShowStatusBar="True"
            AllowSorting="True" OnDataBound="RadGrid1_DataBound" Skin="Default"
            OnItemCommand="RadGrid1_ItemCommand">

            <PagerStyle Mode="NextPrevAndNumeric" />
            <MasterTableView DataKeyNames="testid" DataSourceID="dsLocation" AutoGenerateColumns="false"
                CommandItemDisplay="Top" AllowMultiColumnSorting="True">
                <CommandItemSettings AddNewRecordText="Add new record" />
 
                <ExpandCollapseColumn Visible="True">
                </ExpandCollapseColumn>
                <Columns>
                <telerik:GridEditCommandColumn ButtonType="ImageButton">
                        <HeaderStyle Width="20px" />
                        <ItemStyle CssClass="MyImageButton" />
                    </telerik:GridEditCommandColumn>    

                    <telerik:GridTemplateColumn HeaderText="State" SortExpression="StateID" UniqueName="TemplateColumn2" Display="True"
                        EditFormColumnIndex="0">
                        <EditItemTemplate>
                            <br />
                            <asp:dropdownlist DataField="StateID" id="ddlStateID" runat="server" DataSourceID="dsStates" DataTextField="StateCode" DataValueField="StateID" AppendDataBoundItems="true"
                            SelectedValue='<%# Bind("StateID") %>' AutoPostBack="True" >
                            <asp:ListItem Selected="True" Text="Please select a state" Value=""/>
                            </asp:dropdownlist>
                        </EditItemTemplate>
                    </telerik:GridTemplateColumn>                      
                    
                                
                    <telerik:GridBoundColumn DataField="Other" HeaderText="Other"
                        SortExpression="Other" UniqueName="Other"  Display="true">
                    </telerik:GridBoundColumn>
                    
                </Columns>
               <EditFormSettings>
                    <EditColumn ButtonType="ImageButton" />
                </EditFormSettings>
            </MasterTableView>
        </telerik:RadGrid>


code:
    protected void Page_Load(object sender, EventArgs e)
    {

        if (!IsPostBack)
        {
            if (Request.QueryString["Canada"] == "Y")
            {
                RadGrid1.MasterTableView.GetColumn("Other").Visible = true;
                RadGrid1.MasterTableView.GetColumn("TemplateColumn2").Visible = false;
                RadGrid1.MasterTableView.Rebind();


            }
            else
            {
                RadGrid1.MasterTableView.GetColumn("Other").Visible = false;
                RadGrid1.MasterTableView.GetColumn("TemplateColumn2").Visible = true;
                RadGrid1.MasterTableView.Rebind();
            }
        }



    }

    protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)
    {
        foreach (GridColumn col in RadGrid1.Columns)
        {
            if (col.ColumnType == "GridBoundColumn" && col.UniqueName == "Other")
            {
                if (e.CommandName == RadGrid.EditCommandName)
                {
                    (col as GridTemplateColumn).ReadOnly = true;
                    col.Visible = false;
                }
                else
                {
                    (col as GridTemplateColumn).ReadOnly = false;
                    col.Visible = true;
                }
            }
        }
    }




Any insight would be greatly appreciated....
Julie
Eyup
Telerik team
 answered on 25 Jun 2012
3 answers
97 views
Hi,

I am using RadCombo Box in a sharepoint 2010 site page.
The combo box is populated from code behind (Only once when the page loads).
While opening the combo dropdown, it stops for a second and then shows all the items.
I have tried to solve it through CSS changes but not able to solve it completly.

Any help will be appreciated.....:)
Kalina
Telerik team
 answered on 25 Jun 2012
2 answers
92 views
Hai,
     I have included edit command box in my grid. However i dont want the edit link in certain rows. How can I implement this. Can anybody help me
thank you in advance
Savyo
Casey
Top achievements
Rank 1
 answered on 25 Jun 2012
1 answer
155 views
Hi,
     How can I change expand/collapse icons of radtreeview. Anybody got a solution? pls help.
thanks
RT
Princy
Top achievements
Rank 2
 answered on 25 Jun 2012
1 answer
81 views
Hello,
I am working with Rad Rotator Image gallery. And i set RotatorType="ButtonsOver". This was working fine earlier.  This is not working now. I am unable to find the problem. But when i checked source file i found a message that

"Could Not find assembly  "Telerik.Web.UI" version=2011.2.915.40, Culture:Neutral, Token:121fae78165ba3d4 or one of its dependencies "

I removed Telerik dll and added again. Even though same problem.

My Code looks like bellow

div id="thumnails">
                                <div id="navleft">
                                    <img src="Images/imageNavLeft.png" alt="Left" id="img_left" />
                                </div>
                                <div id="thumbnails">
                                    <telerik:RadRotator ID="ImageRotator" runat="server" RotatorType="ButtonsOver" Width="480"
                                        Height="80px" ItemHeight="90" ItemWidth="80" FrameDuration="2" OnItemClick="ShowImage"
                                        ScrollDirection="Left,Right" Style="float: left; padding-top: 10px">
                                        <ItemTemplate>
                                            <div class="itemTemplate">
                                                <input type="checkbox" id="chk" runat="server" visible="false" />
                                                <asp:Image ID="visibleimage" runat="server" ImageUrl='<%#Eval("Image")%>' Visible="false" />
                                                <asp:Image ID="PropertyImage" runat="server" ImageUrl='<%#Eval("Image")%>' Height="70px"
                                                    Width="70px" class="RotatorImage" />
                                            </div>
                                        </ItemTemplate>
                                        <ControlButtons LeftButtonID="img_left" RightButtonID="img_right" />
                                    </telerik:RadRotator>
                                </div>
                                <div id="navright">
                                    <img src="Images/imageNavRight.png" alt="Right" id="img_right" />
                                </div>

can anyone please help me to sort out this.

Thanking you,

N.Vishnu Vardhan Reddy | .Net Developer

Intelex Systems Private Limited |  6TH FLOOR | AKASH GANGA CHAMBERS | SRI NAGAR COLONY | BANJARA HILLS | HYDERABAD 500038

Tel +91 (0) 6464 4061 | Fax: +44 121 250 3531

vishnuvardhanreddy.naatla@intelexsystems.com | www.Intelexsystems.com





Kevin
Top achievements
Rank 2
 answered on 25 Jun 2012
1 answer
172 views
Here's what I've done...

1) Created a RadMenu and add items to it. It displays OK.

2) Set the EnableEmbeddedSkins property to False:
<telerik:RadMenu ID="RadMenu_1" runat="server" EnableEmbeddedSkins="False">

3) Created a directory in my project. I called it CustomMenu.

4) Copied the Menu.css and Menu directory from the skin to customize. In this case I copied from this directory:
C:\Program Files (x86)\Telerik\RadControls for ASP.NET AJAX Q1 2012 SP1\Skins\Transparent

I have 9 files in my Menu sub-directory, plus the css file.

5) Included the skin files in my project.

6) Renamed the CSS file to "Menu.Custom.css"

7) Opened the css file and changed all occurrences of "_transparent" to "_custom"

8) Dragged the CSS file from the Solution Explorer onto my MasterPage inside the <head></head> tags
  <link href="../CustomMenu/Menu.Custom.css" rel="stylesheet" type="text/css" />

9) Changed the Skin property of the RadMenu control to "Custom"
<telerik:RadMenu
        ID="RadMenu_2" runat="server" Skin="Custom">

When I run the application, here's what I get:

Telerik.Web.UI.RadMenu with ID='RadMenu_0' was unable to find an embedded skin with the name 'Custom'. Please, make sure that the skin name is spelled correctly and that you have added a reference to the Telerik.Web.UI.Skins.dll assembly in your project. If you want to use a custom skin, set EnableEmbeddedSkins=false.


What else do I need to do???


Thanks!
John
Kevin
Top achievements
Rank 2
 answered on 25 Jun 2012
1 answer
262 views
select ImageURL from [User] where UserName=@UserName and Password=@Password

ImageURL   this is in string format having url of the image ...

in page_load event how to take image from that url and shown into my web page??

i got the url from database  after that i dont know how to do take image from url and display???


please help me friend... u no need to do database just take image from that url and display in ur web page using asp.net image control friend...

please provide ur codings
James Campbell
Top achievements
Rank 1
 answered on 25 Jun 2012
2 answers
53 views
Hi

Please have a look into the following link i need solution.

http://www.telerik.com/community/forums/aspnet-ajax/grid/change-visibility-of-grideditcommandcolumn-image-on-row-mouseover.aspx#2150822

any update on this one?
Andrey
Telerik team
 answered on 25 Jun 2012
1 answer
105 views

HI,


     This is Rathan .Am using the Datetime picker control, i want to  assign the data from variable  to datepicker control using javascript function like below.
  var expdate= t_day+"/"+t_month+"/"+t_year ;
Here i want  to bind the above variable data to date pickercontrol in javascript function.
so please let me know .


Thank you .
Kevin
Top achievements
Rank 2
 answered on 25 Jun 2012
1 answer
74 views
Hi,

I have 2 similar comboboxes A & B with checkboxes. When I check one item in A then it should also be checked in B.

Can you please help me

Thanks & regards,
Aneesh Daniel
Princy
Top achievements
Rank 2
 answered on 25 Jun 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?