Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
91 views

Scenario: A RadGrid is populated on the client side using JavaScript calls to Web services after the page finishes loading. The grid starts out empty on the server side. The only notable problem I see is that table cell styles are not applied to new rows after increasing the page size in the NextPrevNumericAndAdvanced pager. An example table cell style is cell alignment. The original rows might have cells with align="right" attributes, but all the new rows that get added after increasing the page size have plain td tags with no attributes, making the grid look unusual. My current fix is to hide that page size control, but I would like to get this working.

 

What seems to happen is that an empty grid is created with the proper td attributes, but the empty grid does have enough blank rows to match the new larger page size.

 

For example, start with a page size of 3, a blank 4 row grid is created then populated with data, with the last row being removed. I think the extra row is for the optional footer, which the grid does not have. Change the page size to 10. After the postback, a blank 4 row grid is created, then populated with 10 rows, which properly expands the visible rows to 10, but the last six rows lack formatting attributes.

 

I’m not sure the best way to handle this issue.

Mike Chabot
Top achievements
Rank 1
 answered on 31 May 2012
2 answers
79 views
Hi, I have a grid setup with grouping enabled.  I also have clientsettings enablerowhoverstyle="true" the rest is just the basics.

On the grid I want all rows bg to be white.
If I change the following setting AlternatingItemStyle-BackColor="White" the rowhoverstyle does not work properly.
on every second row it appears as it should and on the others the hover style only covers half the height of the row.

This happens regardless of it an item is grouped or if the grid is in ungrouped mode.
I am not sure if this is a bug or my error so I will start my post here.

I have attached a screen shot for example.

If you require code I will post.

Thanks
Michael
Heath
Top achievements
Rank 1
 answered on 31 May 2012
1 answer
148 views
Hi,

We are tring to customize the key-press behaviors on a RadGrid. The example of the RadGrid and the JavaScript code  shown below. What we want is to cancel scrolling and make the next cell in edit mode when a user press the arrow down key. Is that any way to allow me to do so? Please help!

<telerik:RadGrid runat="server" ID="radgrid" ...>
  <MasterTableView TableLayout="Fixed">
       <Columns>...</Columns>
  </MasterTableView>
  
  <ClientSettings>
     <Scrolling AllowScroll="true" UseStaticHeaders="true" />
     <ClientEvents  OnKeyPress="keyPress" />
  </ClientSettings>
</telerik:RadGrid>
 
 
        oldScrollTop  = 0;
 
        function keyPress(sender, args) {
                var keyCode = args.get_keyCode();
 
                switch (keyCode) {
                    //If Down Key
                    case 40:
 
                        //set the scrolling position in propor
                        var scrollArea = document.getElementById(sender.get_element().id + "_GridData");
                         
                       //try to cancel the scrolling and it's not working
                       //sender.ClientSettings.AllowScroll = false;
                         
                       //try to set the scroll-area top position as same as the top of the first row,
                                //but scrollArea.scrollTop always be assigned to 53
                       scrollArea.scrollTop = 0;
                       break;
                }
        }

Anyway, I knew that we can use the paging stuff to avoid scrolling problem. However, we do want to have scrolling function on the Grid. 
Richard
Top achievements
Rank 1
 answered on 31 May 2012
4 answers
155 views
Hi,

I have a grid which contains a nested grid.  When the page loads I expand all the items by using <MasterTableView HierarchyDefaultExpanded="true"
When clicking the edit link on the parent grid all of the child grids vanish but the grid is still in an expanded state for all records.  The only way to get the child grids back is to click the Expand/Collapse on one row, then they all appear again.
What I would like to achieve is to be able to edit a parent record and keep all child grids visible for the other records.  Thanks for your help.
Sterlin Swan
Top achievements
Rank 1
 answered on 31 May 2012
2 answers
76 views
v2012.1.501.40
I have a RadGrid with GridDateTimeColumn columns and related filters.

In IE9 the first time the form is rendered the dateinput control is styled using class riTextBox riEnabled, and it has width of 29px and no height. It also has a line-height value of 10000px (might not matter). The box is short and tall. If I refresh the grid with any kind of postback, the same control/class shows a width of 52px, height 15px, and still has the same line-height. The box now looks fine. This does not happen in FireFox. This happens with all of the datetime columns in the grid.

See attached image for a before and after screenshot.

Any ideas?
Thanks!

TonyG
Top achievements
Rank 1
 answered on 31 May 2012
2 answers
129 views
Hi,

How do I get by server-side or client-side RadFileExplorer FileBrowserItem's attributes that I set from server-side to the list by the code below:

protected void RadFileExplorer1_ExplorerPopulated(object sender, RadFileExplorerPopulatedEventArgs e)
{
//some code .. then a for loop then
e.List[i].Attributes.Add("myKey", "myValue");
}
 
}

How do I get the value "myValue" from any of the client-side or server-side?
Thanks in advance.
Shareb
Top achievements
Rank 1
 answered on 31 May 2012
2 answers
198 views
Hi,

I have a radgrid with 5 radcomboboxes inside edoit item itemplate.In the edit mode of radgrid the selected value property of combobox working for only two combo boxes but not for other.Please anybody give4 me the solution.Here is my radgrid sourcecode

<

 

 

telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" AutoGenerateColumns="False"

 

 

 

CellSpacing="0" GridLines="None" Height="520px" OnNeedDataSource="RadGrid1_NeedDataSource"

 

 

 

OnUpdateCommand="RadGrid1_UpdateCommand" PageSize="20" Skin="WebBlue" Visible="False"

 

 

 

OnPreRender="RadGrid1_PreRender">

 

 

 

<ClientSettings>

 

 

 

<Selecting CellSelectionMode="None" />

 

 

 

<Scrolling AllowScroll="True" UseStaticHeaders="True" />

 

 

 

</ClientSettings>

 

 

 

<MasterTableView DataKeyNames="ITEM_NUMBER" Width="100%">

 

 

 

<CommandItemSettings ExportToPdfText="Export to PDF" />

 

 

 

<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="True">

 

 

 

</RowIndicatorColumn>

 

 

 

<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True">

 

 

 

</ExpandCollapseColumn>

 

 

 

<Columns>

 

 

 

<telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Edit" HeaderStyle-Width="4%"

 

 

 

HeaderText="Edit" Text="Edit" UniqueName="EditButton" Visible="true">

 

 

 

<HeaderStyle Width="4%" />

 

 

 

</telerik:GridButtonColumn>

 

 

 

<telerik:GridBoundColumn DataField="Total Items" FilterControlAltText="Filter Total_Items column"

 

 

 

HeaderStyle-Font-Bold="true" HeaderStyle-Width="6%" HeaderText="Mapped Items"

 

 

 

ReadOnly="true" SortExpression="Total_Items" UniqueName="Total_Items">

 

 

 

<HeaderStyle Font-Bold="True" Width="6%" />

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridTemplateColumn EditFormHeaderTextFormat="&lt;font color='red'&gt;*&lt;/font&gt;{0}"

 

 

 

HeaderStyle-Font-Bold="true" HeaderStyle-Width="6%" HeaderText="Ariba_Cat1" UniqueName="Ariba_Cat1">

 

 

 

<ItemTemplate>

 

 

 

<asp:Label ID="lbl_catone" runat="server" Text='<%#Eval("Ariba_Cat1") %>'></asp:Label>

 

 

 

</ItemTemplate>

 

 

 

<EditItemTemplate>

 

 

 

<telerik:RadComboBox ID="rcb_aribacatone" runat="server" DataSourceID="Ariba_Cat1"

 

 

 

DataTextField="ariba_cat1" DataValueField="ariba_cat1">

 

 

 

</telerik:RadComboBox>

 

 

 

</EditItemTemplate>

 

 

 

<HeaderStyle Font-Bold="True" />

 

 

 

<ItemStyle HorizontalAlign="Left" />

 

 

 

</telerik:GridTemplateColumn>

 

 

 

<telerik:GridTemplateColumn EditFormHeaderTextFormat="&lt;font color='red'&gt;*&lt;/font&gt;{0}"

 

 

 

HeaderStyle-Font-Bold="true" HeaderStyle-Width="6%" HeaderText="Ariba_Cat2" UniqueName="Ariba_Cat2">

 

 

 

<ItemTemplate>

 

 

 

<asp:Label ID="lbl_cattwo" runat="server" Text='<%#Eval("Ariba_Cat2") %>'></asp:Label>

 

 

 

</ItemTemplate>

 

 

 

<EditItemTemplate>

 

 

 

<telerik:RadComboBox ID="rcb_aribacattwo" runat="server" DataSourceID="aribacat2"

 

 

 

DataTextField="ariba_cat2" DataValueField="ariba_cat2" >

 

 

 

</telerik:RadComboBox>

 

 

 

</EditItemTemplate>

 

 

 

<HeaderStyle Font-Bold="True" />

 

 

 

<ItemStyle HorizontalAlign="Left" />

 

 

 

</telerik:GridTemplateColumn>

 

 

 

<telerik:GridTemplateColumn EditFormHeaderTextFormat="&lt;font color='red'&gt;*&lt;/font&gt;{0}"

 

 

 

HeaderStyle-Font-Bold="true" HeaderStyle-Width="6%" HeaderText="Ariba_Cat3" UniqueName="Ariba_Cat3">

 

 

 

<ItemTemplate>

 

 

 

<asp:Label ID="lbl_catthree" runat="server" Text='<%#Eval("Ariba_Cat3") %>'></asp:Label>

 

 

 

</ItemTemplate>

 

 

 

<EditItemTemplate>

 

 

 

<telerik:RadComboBox ID="rcb_aribacatthree" runat="server" DataSourceID="SubCategory"

 

 

 

DataTextField="ariba_cat3" DataValueField="ariba_cat3" >

 

 

 

</telerik:RadComboBox>

 

 

 

</EditItemTemplate>

 

 

 

<HeaderStyle Font-Bold="True" />

 

 

 

<ItemStyle HorizontalAlign="Left" />

 

 

 

</telerik:GridTemplateColumn>

 

 

 

<telerik:GridTemplateColumn EditFormHeaderTextFormat="&lt;font color='red'&gt;*&lt;/font&gt;{0}"

 

 

 

HeaderStyle-Font-Bold="true" HeaderStyle-Width="6%" HeaderText="Ariba_Cat4" UniqueName="Ariba_Cat4">

 

 

 

<EditItemTemplate>

 

 

 

<telerik:RadComboBox ID="rcb_aribacatfour" runat="server" DataSourceID="ds_aribafour"

 

 

 

DataTextField="ariba_cat4" DataValueField="ariba_cat4" SelectedValue='<%# Bind("Ariba_Cat4") %>'>

 

 

 

</telerik:RadComboBox>

 

 

 

</EditItemTemplate>

 

 

 

<ItemTemplate>

 

 

 

<asp:Label ID="lbl_catfour" runat="server" Text='<%#Eval("Ariba_Cat4") %>'></asp:Label>

 

 

 

</ItemTemplate>

 

 

 

<HeaderStyle Font-Bold="True" />

 

 

 

<ItemStyle HorizontalAlign="Left" />

 

 

 

</telerik:GridTemplateColumn>

 

 

 

<telerik:GridTemplateColumn EditFormHeaderTextFormat="&lt;font color='red'&gt;*&lt;/font&gt;{0}"

 

 

 

HeaderStyle-Font-Bold="true" HeaderStyle-Width="6%" HeaderText="Ariba_Cat5" UniqueName="Ariba_Cat5">

 

 

 

<EditItemTemplate>

 

 

 

<telerik:RadComboBox ID="rcb_aribacatfive" runat="server" DataSourceID="ds_catfive"

 

 

 

DataTextField="ariba_cat5" DataValueField="ariba_cat5" SelectedValue='<%# Bind("Ariba_Cat5") %>'>

 

 

 

</telerik:RadComboBox>

 

 

 

</EditItemTemplate>

 

 

 

<ItemTemplate>

 

 

 

<asp:Label ID="lbl_catfive" runat="server" Text='<%#Eval("Ariba_Cat5") %>'></asp:Label>

 

 

 

</ItemTemplate>

 

 

 

<HeaderStyle Font-Bold="True" />

 

 

 

<ItemStyle HorizontalAlign="Left" />

 

 

 

</telerik:GridTemplateColumn>

 

 

 

</Columns>

 

 

 

<EditFormSettings>

 

 

 

<EditColumn FilterControlAltText="Filter EditCommandColumn column">

 

 

 

</EditColumn>

 

 

 

</EditFormSettings>

 

 

 

</MasterTableView>

 

 

 

<FilterMenu EnableImageSprites="False">

 

 

 

</FilterMenu>

 

 

 

</telerik:RadGrid>

 

 while clicking on edit button getting below error.

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Selection out of range
Parameter name: value
Suneetha
Top achievements
Rank 1
 answered on 31 May 2012
2 answers
164 views
I'm using the RadListbox to edit a list of data client side, but need to retrieve the list on postback on the server.

From the server side I populate the list using the Items property. The list display well client side and using javascript I can reorder the list, add item and remove item.

Since the list is modified client side, i need to retrieve the modified list on the server. But I haven't found a way to do this. The Items property of the RadListBox is alway empty after the postback. How can I achieve this with the RadListBox? Is this something possible or should I add my own hidden control to keep track of everything?

thank you
Simon
Top achievements
Rank 1
 answered on 31 May 2012
3 answers
68 views
Hi Telerik forum people.   Maybe you have some ideas I can try.

I have a TabStrip with 7 tabs.  One of the tabs has a Text property value of "Documents."  I'm trying to get the page that contains this TabStrip to load with the Documents tab showing.  So far, I've been able to get the Documents tab label at the top of the TabStrip to show up, but I can't get the form inside that tab to show up.  Instead, I get the form from a different tab (the first tab, actually) to show up.

I'm basically using this code to get the Documents tab to show up:

RadTab documentsRadTab = mainTmTabStrip.TabStrip.Tabs.FindTabByText("Documents");
documentsRadTab.Selected = true;
mainTmTabStrip.TabStrip.SelectedIndex = documentsRadTab.Index;

I've looked all over the API and at forum posts and elsewhere on-line, and... I feel as though at this point I'm a little spun-around, dizzy from trying to find the solution.  Can you provide some ideas that I could try out?  Thanks very much for your time and ideas.

-GP
Greg
Top achievements
Rank 1
 answered on 31 May 2012
4 answers
95 views
Hi,
I am using RadScheduler to create an new appointment(i am using latest version of Telerik.Web.UI.dll  version 2012.1.501.40).
When  i bind  the ResourceType from C# code behind             
ResourceType rt = new ResourceType("UserCalender");          
rt.ForeignKeyField = "UserTypeId";
rt.KeyField = "UserTypeId";
rt.TextField = "UserTypeName";         
rt.DataSource = GetUserTypes();
RadScheduler1.ResourceTypes.Add(rt);

 i am getting 1 extra option "-" in my comboBox
Like
   "-"
   "Development"
   "Testing"

I do not want that Extra  "-" in my combobox. So How to i remove that one and how do i select default option in combobox?
Venkata
Top achievements
Rank 1
 answered on 31 May 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?