Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
234 views
Hi,
I have the following code in my asp page. I would like to click on Select button and get the logoid which is in a hidden field. but it won't work when i click on the button.
             <telerik:RadListView ID="dvlogo1" runat="server" DataSourceID="dslogo"
            ItemPlaceholderID="PlaceHolder1" AllowPaging="true" OnItemCommand="dvlogo1_ItemCommand" >
            <LayoutTemplate>
                <div class="sushibar">
                    <asp:Panel ID="SushiPanel" runat="server">
                        <div class="sushi">
                            <asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>
                        </div>
                        <telerik:RadDataPager ID="RadDataPager1" runat="server" PageSize="10" Skin="Black">
                            <Fields>
                                <telerik:RadDataPagerButtonField FieldType="Numeric" />
                            </Fields>
                        </telerik:RadDataPager>
                    </asp:Panel>
                </div>
            </LayoutTemplate>
            <ItemTemplate>
                <div class="category">
                    <p><asp:HiddenField runat="server" ID="hidlogoid" Value='<%# Eval("logoid") %>' />
                                                
                        <%#Eval("Title") %>
                    </p>
                    <asp:Image runat="server" ID="imglogo2" Height="70px" Width="70px" ImageUrl='<%# Eval("logopath") %>' />
                     <p>
                        <asp:Button runat="server" ID="cmdselectlogo2" Text="Select" Font-Size="10px" CommandName="select" CommandArgument='<%# Eval("logopath") %>' />
                     </p>

                </div>
            </ItemTemplate>
            <SelectedItemTemplate>
                <div class="selected">
                    <p><asp:HiddenField runat="server" ID="hidlogoid1" Value='<%# Eval("logoid") %>' />
                                                
                        <%#Eval("Title") %>
                    </p>
                     <asp:Image runat="server" ID="imglogo2" Height="70px" Width="70px" ImageUrl='<%# Eval("logopath") %>' />
                     <p>
                        <asp:Button runat="server" ID="cmdselectlogo2" Text="Select" Font-Size="10px" CommandName="select" CommandArgument='<%# Eval("logopath") %>' />
                     </p>
                </div>
            </SelectedItemTemplate>
        </telerik:RadListView>

C# Code
         protected void dvlogo1_ItemCommand(object source, RadListViewCommandEventArgs e)
        {
            if (e.CommandName == RadListView.SelectCommandName)
            {
                RadListViewDataItem item = e.ListViewItem as RadListViewDataItem;
                string myValue = item.GetDataKeyValue("logoid").ToString();
            }
            //switch (e.CommandName)
            //{
            //    case "selectlogo":
            //        Session["logo"] = e.CommandArgument;
            //       // hid = (this.dvlogo1.FindControl("hidlogoid") as HiddenField).Value;
            //        Session["logoid"] = (this.dvlogo1.FindControl("hidlogoid") as HiddenField).Value;

            //        break;
            //}
        }

I appreciate your help very much.

thanks,
kamal



Rosen
Telerik team
 answered on 13 May 2010
2 answers
146 views
Hello,

Please i need your help guys in building a grid using 3 datasources:
Query 1: Will return the categoryName,categoryOrderNumber,CategoryName from TABLE1
Query 2: Will return the SALES totalweight,totalPrice,TotalpriceUSD for the Categories from TABLE2
Query 3: Will return the PURCHASES totalweight,totalPrice,TotalpriceUSD for the Categories from TABLE3

Catergory SalesTotalWeight SalesTotalPrice SalesTotalPriceUSD PurchaseTotalWeight SalesTotalPrice SalesTotalPriceUSD
Category1             x                             x                         x                                        x                             x                           x
Category2             x                             x                         x                                        x                             x                           x
Category3             x                             x                         x                                        x                             x                           x


Thanks in advance,
Andy Green
Top achievements
Rank 1
 answered on 13 May 2010
1 answer
188 views
Hi,

I have just upgraded the Telerik used by our corporate web applications which have many grids
from RadControls for ASPNET AJAX Q3 2008
to RadControls for ASP.NET AJAX Q1 2010

Under RadControls for ASPNET AJAX Q3 2008 the Grey Skin is used and one of the grids looks as follows:

Under RadControls for ASP.NET AJAX Q1 2010 the Default Skin is used (because Grey Skin no longer exists) and the same grid looks as follows:

The vertical lines seem to have disappeared from the grid under RadControls for ASP.NET AJAX Q1 2010.

Can you please tell me how to display the missing vertical lines on the grid?

Regards,
Herman Gouw

Dimo
Telerik team
 answered on 13 May 2010
3 answers
82 views
Hi,

I tried to use the Dynamic feature of RadGrid, it works but somehow the Grouping Caption didn't show properly. I'm using IE8.

Please refer to the attached screenshot.

Any idea?

Thanks.
Dimo
Telerik team
 answered on 13 May 2010
1 answer
103 views
I'm using a RadDoc which contains titlebar commands that trigger clientside javascript.  This javascript uses jquery to increase and decrease the font sizes of the objects the RadDoc contains.  The following sample increases the font size of the "a" and "span" elements.

function IncreaseFontSize(dock, args) {
    var _contentId = new String(dock.get_handle().id);
    _contentId = _contentId.substr(0, _contentId.length - 1) + "C";
    var currFontSize = $("#" + _contentId).css('fontSize');
    var _currentFontSize = parseFloat(currFontSize, 10);
    _currentFontSize *= 1.15;
    $("#" + _contentId).css('fontSize', _currentFontSize + "px");
    $("#" + _contentId + " a").css('fontSize', _currentFontSize + "px");
    $("#" + _contentId + " span").css('fontSize', _currentFontSize + "px");
    etc...
}

This works great, however when I trigger an ajax call that updates the RadDoc, the objects reset back to their original font size.  Even clicking on a RadGrid column header trigger the font reset. Any ideas how I can retain all font size changes?  Is there an event I could tap into once the ajax call completes? If so, maybe I could use this event to change the fonts to the desired size.  Thanks in advance for your help.











Dimo
Telerik team
 answered on 13 May 2010
3 answers
123 views
I use RadWindow in two pages on my site.  Both are using the embedded black skin.

On one page, the window displays perfectly.

On another page, the window appears, but no style information is sent to the browser, so the window content displays with no formatting whatsoever.

Both pages are on the same site.  The code on each page is identical.

Any suggestions? 

Thanks
Georgi Tunev
Telerik team
 answered on 13 May 2010
1 answer
148 views
Hi there  i need help on binding enum to a radgrid.

I have enum below:
<div>&nbsp;<i>public enum UserType</i></div><div><i>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;{</i></div><div><i>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Default = 1, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</i></div><div><i>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Parameters = 2,</i></div><div><i>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Students = 3,</i></div><div><i>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Marks = 4,</i></div><div><i>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}</i></div> 
and my radgrid defined as follows:
 
<div><i>&lt;telerik:RadGrid id="userGrid" runat="server" AllowFilteringByColumn="false" Width="100%" &nbsp;</i></div><div><i>&nbsp;&nbsp; &nbsp; AutoGenerateColumns="false" PageSize="30" AllowPaging="true"&gt;</i></div><div><i>&nbsp;&nbsp; &nbsp;&lt;MasterTableView&gt;</i></div><div><i>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;Columns&gt;</i></div><div><i>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;telerik:GridTemplateColumn AllowFiltering="false" Resizable="true" UniqueName="value" HeaderText="Pages"&gt;</i></div><div><i>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;ItemTemplate&gt;</i></div><div><i>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;asp:Label ID="asplabelValue" runat="server" ForeColor="Black" Text='&lt;% #Bind("enumValue") %&gt;' Font-Size="Medium"&gt;&lt;/asp:Label&gt;</i></div><div><i>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/ItemTemplate&gt;</i></div><div><i>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/telerik:GridTemplateColumn&gt;</i></div><div><i>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;telerik:GridTemplateColumn AllowFiltering="false" Resizable="true" UniqueName="pages" HeaderText="Pages"&gt;</i></div><div><i>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;ItemTemplate&gt;</i></div><div><i>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;asp:Label ID="aspPgesLabel" runat="server" ForeColor="Black" Font-Size="Medium" Text='&lt;% #Bind("enumText") %&gt;'&gt;&lt;/asp:Label&gt;</i></div><div><i>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/ItemTemplate&gt;</i></div><div><i>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/telerik:GridTemplateColumn&gt;</i></div><div><i>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/Columns&gt;</i></div><div><i>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/MasterTableView&gt;</i></div><div><i>&nbsp;&nbsp; &nbsp;&lt;/telerik:RadGrid&gt;</i></div
I need to set the datasource of the grid to the enum, and bind the enum name (text) and enum value as shown int he radgrid definition.

Please, someone help me with code snippets that can achieve this.

thanks.


Yavor
Telerik team
 answered on 13 May 2010
2 answers
234 views
hi,
      I have a requirement of multi column sorting like -  Default Sorting on Columns ,first "Priority", followed by "TargetDate" and then the "Status" on Load of Grid . Right now I am able to apply Sorting on Single column like -

GridSortExpression

 

expression = new GridSortExpression();

 

expression.FieldName =

"Status";

 

expression.SetSortOrder(

"Descending");

 

 

this.RadGrid1.MasterTableView.SortExpressions.AddSortExpression(expression);

 


But How to apply it on Multiple no of columns.Please any body suggest me regarding this.

Regards,
Dheeraj
Dheeraj
Top achievements
Rank 1
 answered on 13 May 2010
1 answer
169 views
 <ItemTemplate>
<telerik:RadTimePicker ClientEvents-OnDateSelected="OnDateSelected"  ID="txt_InD1" runat="server" Width="86"  SelectedDate='<%# Eval("InDay1") %>'    ></telerik:RadTimePicker>
</ItemTemplate>

When I run the project, I get an error on the line above saying "Specific cast is not valid" .  Some values coming from the db are empty strings and I am guessing thats causing this issue.  How can I fix empty strings and null values.  my db field is a char(5) and I am only storing the time values such as 3:31, or 4:30 or 12:58 etc.

Shinu
Top achievements
Rank 2
 answered on 13 May 2010
4 answers
85 views
Hi Admin.
The same Ex: http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandmenu/defaultcs.aspx
But i want to use RadMenu with RadMenuItems  the same Ex: http://demos.telerik.com/aspnet-ajax/menu/examples/functionality/templates/defaultcs.aspx
not use RadContextMenu. Can you help me?.
Thanks!

peter huynh
Top achievements
Rank 1
 answered on 13 May 2010
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?