Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
438 views
I'm trying to manually position my context menu, but need some method of finding it's rendered size prior to it actually being shown.

Is this possible?

I have a handle to the object with:

var contextMenu = $find("<%= RadContextMenu1.ClientID %>");

is there some property or method to get its height/width?



Yana
Telerik team
 answered on 28 Jun 2010
1 answer
78 views
Hello, I've got a RadGrid that is working perfectly, paging works fine, except that I cannot get the paging footer to display if there are not enough values in the grid.  I set the AlwaysVisible property to True, and even check it in the PreRender (it's still true), but I get no footer when the grid renders.

<PagerStyle Mode="NextPrevNumericAndAdvanced" ShowPagerText="True" AlwaysVisible="true" /> 

I am using a slightly modified version of the Sunset skin, if that matters.
Pavel
Telerik team
 answered on 28 Jun 2010
1 answer
160 views
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) // similar to RowDataBound event in GridView  
    {
        if (e.Item is GridDataItem)// gets the row collection  
        {
            GridDataItem item = (GridDataItem)e.Item;
            rgManager.SelectParameters["proID"].DefaultValue = ????

        }
    }  

what would replace this ???? part.. I am trying to get the datakeyvalue of proID ..I have tried this but it is complaining...
rgManager.MasterTableView.DataKeyValues[e.Item.ItemIndex];
Actually ItemDataBound is not even executing creating grid...Please help..
Princy
Top achievements
Rank 2
 answered on 28 Jun 2010
1 answer
154 views
I've got a bar chart that is setup using the Series Grouping option:

chart.DataManager.ValuesYColumns = new string[1] { "Utilization" };
chart.DataManager.ValuesXColumn = "intervalAsNumeric";
chart.DataManager.UseSeriesGrouping = true;
chart.DataGroupColumn = "groupName";

Everything works great, but I'd like to be able to display the "Utilization" value (Y-Value) on the bar itself. To be clear, I've got the Utilization value that displays along the Y-axis, but I need a value that shows the value of the bar itself -- either on the bar or next to/above it. So far I've been unable to coerce the chart in to showing this. I've tried various properties, none of which work.

Is there someway to display this value?

Thanks


Ves
Telerik team
 answered on 28 Jun 2010
8 answers
317 views
Hi All,

    I am using a radgird with static headers, modal popup edit mode and different userccontrols for insert and edit. Things are perfectly working in IE 8. But i am facing lot of strange issues when accessed in ie 6 and firefox 3.5 and above,

In IE 6,
  1.  The popup is not coming below the modal background and the page is unusable.

In Mozilla Firefox 3.5.2,

  1.  The popup for edit mode works fine while using only the buttons with commandnames. (1 edit commandname button and 1 cancel commandname button). But when i close the popup using the close button in the top, and try to click the edit or Add buttons of the grid the popup is not appearing again.
  2. The popup for insert mode is even worser, it appears only for the first time, validations are working, but the insert commanname button and the cancel commandname buttons are not working.

I didnt tried in safari and other browsers. Please help me since it is an important requirement to make the application to be compatible with all these browsers.

Find below the code in item_command handler.

protected void grid1_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)  
        {  
            if (e.CommandName == RadGrid.EditCommandName)  
            {  
                //Edit mode  
                e.Item.OwnerTableView.EditFormSettings.UserControlName = "ModifyControl.ascx";  
 
                e.Item.OwnerTableView.EditFormSettings.PopUpSettings.Height = System.Web.UI.WebControls.Unit.Pixel(400);  
                e.Item.OwnerTableView.EditFormSettings.PopUpSettings.Width = System.Web.UI.WebControls.Unit.Pixel(400);  
                e.Item.OwnerTableView.EditFormSettings.PopUpSettings.ScrollBars = System.Web.UI.WebControls.ScrollBars.Vertical;  
                e.Item.OwnerTableView.EditFormSettings.PopUpSettings.Modal = true;  
            }  
            else if (e.CommandName == RadGrid.InitInsertCommandName)  
            {  
                //Insert mode  
                e.Item.OwnerTableView.EditFormSettings.UserControlName = "AddControl.ascx";  
 
                e.Item.OwnerTableView.EditFormSettings.PopUpSettings.Height = System.Web.UI.WebControls.Unit.Pixel(400);  
                e.Item.OwnerTableView.EditFormSettings.PopUpSettings.Width = System.Web.UI.WebControls.Unit.Pixel(400);  
                e.Item.OwnerTableView.EditFormSettings.PopUpSettings.ScrollBars = System.Web.UI.WebControls.ScrollBars.Vertical;  
                e.Item.OwnerTableView.EditFormSettings.PopUpSettings.Modal = true;  
            }  
        }  
 

Find below the code of grid.

<telerik:RadGrid ID="grid1" runat="server" AllowFilteringByColumn="True"    
                AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" GridLines="None"    
                OnNeedDataSource="grid1_NeedDataSource" Skin="Office2007" OnItemCommand="grid1_ItemCommand"    
                OnInsertCommand="grid1_InsertCommand" EnableLinqExpressions="False"    
                OnDeleteCommand="grid1_DeleteCommand" OnUpdateCommand="grid1_UpdateCommand" PagerStyle-AlwaysVisible="true">     
                <MasterTableView CommandItemDisplay="Top" EditMode="PopUp">     
                    <RowIndicatorColumn>    
                        <HeaderStyle Width="20px"></HeaderStyle>    
                    </RowIndicatorColumn>    
                    <ExpandCollapseColumn>    
                        <HeaderStyle Width="20px"></HeaderStyle>    
                    </ExpandCollapseColumn>    
                    <Columns>    
                        <telerik:GridEditCommandColumn ButtonType="ImageButton" HeaderText="Edit" UniqueName="colEdit">     
                            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="10%" />    
                            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />    
                        </telerik:GridEditCommandColumn>    
                        <telerik:GridBoundColumn DataField="field1" HeaderText="Field1" UniqueName="col1">     
                            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />    
                        </telerik:GridBoundColumn>    
                        <telerik:GridBoundColumn HeaderText="Field2" UniqueName="col2" DataField="Field2">     
                            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />    
                        </telerik:GridBoundColumn>    
                        <telerik:GridBoundColumn DataField="Field3" HeaderText="Field3" UniqueName="col3"    
                            Visible="False">     
                        </telerik:GridBoundColumn>    
                        <telerik:GridButtonColumn ButtonType="ImageButton" HeaderText="Remove" ImageUrl="~/Images/cancel.gif"    
                            UniqueName="colDelete" CommandName="Delete">     
                            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="12%" />    
                            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />    
                        </telerik:GridButtonColumn>    
                    </Columns>    
                    <EditFormSettings CaptionFormatString="Edit" InsertCaption="Add"    
                        EditFormType="WebUserControl">     
                        <EditColumn UniqueName="EditCommandColumn" ButtonType="ImageButton" ItemStyle-HorizontalAlign="Right">     
                            <ItemStyle HorizontalAlign="Right" />    
                        </EditColumn>    
                    </EditFormSettings>    
                </MasterTableView>    
                <ClientSettings>    
                    <ClientEvents OnPopUpShowing="PopUpCentered" />    
                    <Scrolling AllowScroll="True" UseStaticHeaders="True" />    
                </ClientSettings>    
            </telerik:RadGrid>   
 


Find below the script i have used to center the popup screen,

<script type="text/javascript">     
        function PopUpCentered(sender, eventArgs) {     
            var popUp = eventArgs.get_popUp();     
            var popUppopUpWidth = popUp.style.width.substr(0, popUp.style.width.indexOf("px"));     
            var popUppopUpHeight = popUp.style.height.substr(0, popUp.style.height.indexOf("px"));     
            var windowHeight = (typeof window.innerHeight != 'undefined' ? window.innerHeight : document.body.offsetHeight);     
            var windowWidth = (typeof window.innerWidth != 'undefined' ? window.innerWidth : document.body.offsetWidth); ;     
            //alert(windowHeight + "##" + windowWidth);     
            //if (popUppopUpHeight == "") popUppopUpHeight = 300; // if the height isn't set on the popup, default to 300px         
            popUp.style.position = "fixed";     
            popUp.style.left = (Math.floor((windowWidth - popUppopUpWidth) / 2)).toString() + "px";     
            popUp.style.top = (Math.floor((windowHeight - popUppopUpHeight) / 2)).toString() + "px";     
        }     
    </script>   
 


I am not sure which is causing this problem. Please help.

Regards,
Saravanan K
Pavel
Telerik team
 answered on 28 Jun 2010
2 answers
97 views
Hi,
I am stress testing my grid and have picked up a strange issue. I am binding to a Dataset using the 'NeedDataSource' event that uses the ViewState object. With 10000 records all seems to be fine but with 50000 records I cannot apply filters or even navigate to pages other than page 1?? As soon as I click to navigate to another page or apply a filter I get "Internet Explorer cannot display the webpage". I am running in release config from the VS2010 IDE using the VS webserver & all is local including the database.
Is this a bug or am I doing something wrong in the grid seup?
Al
Top achievements
Rank 1
Iron
Iron
Iron
 answered on 28 Jun 2010
1 answer
103 views
I need to set two properties of a ComboBox from javascript on the client side -

AllowCustomText, and
ShowDropdownOnClick

I can't find the methods / properties to do this - is it possible?

Thanks
John
Shinu
Top achievements
Rank 2
 answered on 28 Jun 2010
1 answer
428 views
Hi Guys, i need your help to resolve this plzzzzz helpppp mmmeeeee

In the Below code trying find RadDatePicker(ID:studentJoiningDate)  on client Side. I  am unable to find out the control
Plzzzzzzz help me guyz...........
Thanks,
Jon

<

 

div>

 

 

 

 

<telerik:RadGrid

 

 

ID="RadGrid1"

 

 

runat="server"

 

 

AllowSorting="True"

 

 

AutoGenerateColumns="False"

 

 

AllowFilteringByColumn="True"

 

 

ShowFooter="True"

 

 

ShowGroupPanel="false"

 

 

Width="960px"

 

 

BorderColor="#999999"

 

 

BorderWidth="1px"

 

 

GridLines="None"

 

 

AllowPaging="true"

 

 

PageSize="20"

 

 

Height="800px"

 

 

onneeddatasource="RadGrid1_NeedDataSource"

 

 

onitemdatabound="RadGrid1_ItemDataBound"

 

 

onitemcommand="RadGrid1_ItemCommand"

 

 

Skin="Outlook"

 

 

>

 

 

<FooterStyle BorderStyle="None" />

 

 

<MasterTableView EditMode="PopUp" ShowGroupFooter="true" DataKeyNames="Student_id" HierarchyDefaultExpanded="true"

 

 

CommandItemDisplay="TopAndBottom" >

 

 

<NoRecordsTemplate>

 

 

<div style="padding: 10px; font-weight: bold; font-size: 14px; color: #ff0000; text-align: center">There are no Students available</div>

 

 

</NoRecordsTemplate>

 

 

<Columns>

 

 

<telerik:GridEditCommandColumn>

 

 

<HeaderStyle Width="50px" />

 

 

</telerik:GridEditCommandColumn>

 

 

<telerik:GridBoundColumn

 

 

DataField="Student_id"

 

 

HeaderText="Student ID"

 

 

UniqueName="Student_id"

 

 

SortExpression="Student_id"

 

 

AutoPostBackOnFilter="true"

 

 

CurrentFilterFunction="StartsWith"

 

 

ShowFilterIcon="false">

 

 

<HeaderStyle Width="100px"/>

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn

 

 

HeaderText="Name"

 

 

UniqueName="Name"

 

 

DataField="name"

 

 

SortExpression="Name"

 

 

AutoPostBackOnFilter="true"

 

 

CurrentFilterFunction="StartsWith"

 

 

ShowFilterIcon="false">

 

 

<HeaderStyle Width="200px"/>

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn

 

 

HeaderText="Size"

 

 

DataField="size"

 

 

UniqueName="size"

 

 

SortExpression="size"

 

 

AutoPostBackOnFilter="true"

 

 

CurrentFilterFunction="StartsWith"

 

 

ShowFilterIcon="false">

 

 

<HeaderStyle Width="100px"/>

 

 

</telerik:GridBoundColumn>

 

 

</Columns>

 

 

<EditFormSettings

 

 

EditFormType="Template"

 

 

InsertCaption="Add new Item"

 

 

CaptionFormatString="Edit Student_id:{0}"

 

 

CaptionDataField="Student_id"

 

 

FormStyle-Height="700px"

 

 

FormStyle-Width="700px"

 

 

PopUpSettings-Modal="true"

 

 

>

 

<

 

EditColumn UniqueName="EditCommandColumn1"></EditColumn>

 

<

 

FormStyle Height="700px" Width="700px"></FormStyle>

 

 

<FormTemplate>

 

 

 

<table id="Table2" cellspacing="1" cellpadding="1" width="400" border="0">

 

 

<tr>

 

 

<td>

 

 

</td>

 

 

<td>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td>

 

Student ID:

 

</td>

 

 

<td>

 

 

<asp:Label ID="StudentIDLabel" Text='<%# Bind("Student_id") %>' runat="server" Width="200px">

 

 

</asp:Label>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td>

 

Name:

 

</td>

 

 

<td>

 

 

<asp:TextBox ID="StudentNameTextBox" runat="server" Text='<%#Bind("name") %>' Width="200px">

 

 

</asp:TextBox>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td>Size:</td>

 

 

<td>

 

 

<asp:TextBox ID="StudentSizeTB" runat="server" Text='<%#Bind("size") %>' Width="200px">

 

 

</asp:TextBox>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td>Joining Date:</td>

 

 

<td>

 

 

<telerik:RadDatePicker ID="studentJoiningDate" runat="server" Width="200px">

 

 

</telerik:RadDatePicker>

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

<table style="width: 100%">

 

 

<tr>

 

 

<td align="right" colspan="2">

 

 

<asp:Button ID="Button3" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'

 

 

runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>

 

 

</asp:Button>&nbsp;

 

 

<asp:Button ID="Button4" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel">

 

 

</asp:Button>

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

</FormTemplate>

 

 

<PopUpSettings Modal="True"></PopUpSettings>

 

 

</EditFormSettings>

 

 

</MasterTableView>

 

 

 

<ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True">

 

 

<Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" FrozenColumnsCount="1" />

 

 

<ClientEvents/>

 

 

</ClientSettings>

 

 

<FilterMenu BorderStyle="None"></FilterMenu>

 

 

</telerik:RadGrid>

 

 

 

</div>

 

Princy
Top achievements
Rank 2
 answered on 28 Jun 2010
1 answer
137 views
I have  a RadMenu Outlook skin I want to modify. So far I have done two things

1. Set  EnableEmbeddedSkins="False"  on the RedMenu

2. I registered the  css file (skins/Outlook/Menu.Outlook.css) in the main master page.

Still the customizations dont show up. I guess there is something else to do but I think I followed the steps in the tutorial.

Thkx
Shinu
Top achievements
Rank 2
 answered on 28 Jun 2010
5 answers
165 views
How do you add an item to the rotator client side?
There is a get_items method, but I can't figure out how to add a new item to it.


maha
Top achievements
Rank 1
 answered on 28 Jun 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?