Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
86 views
hi , 

i am not being able to set proper width of the child dropdown items in the menu . also getting an extra vertical line , something like a separator .
Following is the css used  -

.RadMenu_Css4,
.RadMenu_Css4.rmGroup li
{
 background-image: url(../Images/Menutab_normal.png);
    font-family: Arial;
    font-size: 11px;
    text-decoration: none;
    color:White;
    Width: 145px;
    Height: 20px;
    text-align:left;
    text-indent:8px;
    font-weight:normal;
}

ASPX code
-------------

 <telerik:RadMenu ID="RadMenu1" runat="server" Width="100%" EnableShadows="true"  EnableEmbeddedSkins="false"
                         OnClientItemClicking="fnMenuClick" OnClientMouseOver="fnSubMenuDisplay" Skin="Css4">
                                                 
                    <Items>
                   
                        <telerik:RadMenuItem Text="My WhiteBoard" Width="14%">  
                        </telerik:RadMenuItem>
                       
                        <telerik:RadMenuItem Text="Job Activity" Width="14%">
                            <Items>
                                <telerik:RadMenuItem Text="Job Management">
                                 <GroupSettings Width="120px" />
                                </telerik:RadMenuItem>
                                <telerik:RadMenuItem Text="Tool Collar Order">
                                </telerik:RadMenuItem>
                                <telerik:RadMenuItem Text="Shipping Monitor">
                                </telerik:RadMenuItem>
                                <telerik:RadMenuItem Text="Bit Run Activity">
                                </telerik:RadMenuItem>
                                <telerik:RadMenuItem Text="Daily Activity Report">
                                </telerik:RadMenuItem>
                                <telerik:RadMenuItem Text="Rig Packet Log">
                                </telerik:RadMenuItem>
                                <telerik:RadMenuItem Text="Status Board">
                                </telerik:RadMenuItem>
                            </Items>
                        </telerik:RadMenuItem>

</Items>
                   </telerik:RadMenu>


secondly , need to know how can i use an arrow in the dropdown menu .

Regards,
Anu
Kate
Telerik team
 answered on 22 Sep 2011
3 answers
316 views
I am trying to configure RadAjaxManager to update some RadDockZones in the page while not updating an IFrame.

When I configure RadAjaxManager like below, everything works fine and the RadDockZones do not cause the IFrame to update.
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="pnlDockZoneLeft">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="pnlDockZoneContent" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="pnlDockZoneContent">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="pnlDockZoneLeft" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

If I attempt to add another AjaxSetting to update the IFrame when the filter panel is updated, like so:
<telerik:AjaxSetting AjaxControlID="filterPane">
    <UpdatedControls>
        <telerik:AjaxUpdatedControl ControlID="pnlIFrame" />
    </UpdatedControls>
</telerik:AjaxSetting>

Any update to any of the Ajaxified controls causes the IFrame to update and lose its settings. Here is part of the response body from the post-back when I click on one of the RadDocks:
504|updatePanel|pnlDockZoneContentPanel|<div id="pnlDockZoneContent">
     
                                    <div id="dockZoneContent" class="RadDockZone RadDockZone_Outlook rdVertical" style="border-width:0px;min-width:10px;min-height:10px;display:none;">
        <!-- 2011.2.712.35 --><div class="RadDock RadDock_Default rdPlaceHolder" id="dockZoneContent_D" style="display:none;">
            <!-- -->
        </div><input id="dockZoneContent_ClientState" name="dockZoneContent_ClientState" type="hidden" />
    </div>
                                 
</div>|362|updatePanel|pnlIFramePanel|<div id="pnlIFrame" class="content" style="width:100%;">
     
                                    <iframe id="IFrame1" name="IFrame1" frameborder="0" marginwidth="0" scrolling="no" style="margin: 0; height: 525px" width="100%" height="100%" src="Profile.aspx?Redirect=True">
                                    </iframe>
                                 
</div>

Is there any way to set RadAjaxManager to only update panels that are in the UpdatedControls list and leave the ones that are ajaxified but not in the UpdatedControls list?
Iana Tsolova
Telerik team
 answered on 22 Sep 2011
2 answers
217 views

I have a RadWindow that opens up containing another page from the site.

This page has a form on it with several standard asp.net / HTML input controls and a RadDatePicker.

On postback I validate the inputs. Several of the inputs get checked but only one of them is giving me an issue. The RadDatePicker.

For this example lets assume that a dropdown list does not have a selection, and the datepicker has an invalid date entered.

In either of these cases I construct and Alert() message that is shown to the user and some jQuery that will apply a special css style to show the inputs that have a problem.

The jQuery gets assembled during the validation like this.

 
// in the case that a contact has not been selected from the Contacts dropdown list
sJQuery += " $('#drpProspectContact').addClass('forminputerror'); ";
 
// In the case that the RadDatePicker date does not have a valid value in it.
sJQuery += " $('#dpForecastCloseDate_dateInput_text').addClass('forminputerror'); ";

Note: forminputerror puts a red line around the border and colors the background of the inputs.

The jQuery above has been tested with Firebug and works on both of the inputs in question.

At the end of the validation method I do this.

if (IsProspectError)
                {
                    String ErrorScript = "alert('" + sErrors + "'); " + sJQuery;
                    ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "", ErrorScript, true);
                    return false;
                }
                else
                {
                    return true;
 
                }

When the page is refreshed, an Alert box appears and I can see in the background that both of the inputs in question have the error style applied.

However, as soon as I hit the OK button on the alert box, the DatePicker reverts to a version with no error style applied. This happens before my eyes as the Red border etc is reverted back to the default state of the DatePicker

I have attached two images. One before the OK button is hit, and one after.

It's like the RadDatePicker is loaded after the rest of the page loads, or something, but that does not make sense either as the control is there to have a style applied while the alert box is showing. And the alert box is only there after postback.
How can closing the alert box remove a style from the RadDatePicker?

Finally I have tried RegisterStartupScript() and RegisterClientScriptBlock(). Made no difference.


Iana Tsolova
Telerik team
 answered on 22 Sep 2011
1 answer
239 views
Hi,

I used the following example:

http://www.telerik.com/comhttp://www.telerik.com/community/forums/aspnet-ajax/grid/using-dynamicobject-as-a-datasource-or-expandoobject.aspx#1615190

which works fine but I have problems grouping.
When I try to group by one of the columns I get the following Server exception:
at Telerik.Web.UI.GridDataSetHelper.CreateGroupByTable(DataTable SourceTable, GridTableView view)
at Telerik.Web.UI.GridDataSetHelper.CalcGroupByTables(GridTableView gridTableView, DataTable SourceTable, String RowFilter, Int32 FirstIndex, Int32 LastIndex, Boolean applyPaging, Boolean isCustomPaging)
at Telerik.Web.UI.GridEnumerableFromDataView.PerformTransformation()
at Telerik.Web.UI.GridEnumerableFromDataView.TransformEnumerable()
at Telerik.Web.UI.GridTableView.GetEnumerator(Boolean useDataSource, GridEnumerableBase resolvedDataSource, ArrayList dataKeysArray)
at Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource)
at Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource)
at System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data)
at System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data)
at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)
at System.Web.UI.WebControls.DataBoundControl.PerformSelect()
at Telerik.Web.UI.GridTableView.PerformSelect()
at System.Web.UI.WebControls.BaseDataBoundControl.DataBind()
at Telerik.Web.UI.GridTableView.DataBind()
at Telerik.Web.UI.GridTableView.BindAllInHierarchyLevel()
at Telerik.Web.UI.RadGrid.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


or on Client side:
Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Field FirstName not found in the source table. Please check the expression syntax.

<telerik:RadGrid ID="RadGrid2" runat="server" PageSize="10" AllowSorting="True" AllowMultiRowSelection="True"
		AllowPaging="True" AllowCustomPaging="false" ShowGroupPanel="True" AutoGenerateColumns="false"
		GridLines="none">
		<PagerStyle Mode="NextPrevNumericAndAdvanced"></PagerStyle>
		<ClientSettings ReorderColumnsOnClient="True" AllowDragToGroup="True" AllowColumnsReorder="True">
			<Selecting AllowRowSelect="True"></Selecting>
			<Resizing AllowRowResize="false" AllowColumnResize="True" EnableRealTimeResize="True"
				ResizeGridOnColumnResize="False"></Resizing>
		</ClientSettings>
		<GroupingSettings ShowUnGroupButton="true" />
		<MasterTableView Width="100%">
			<Columns>
				<telerik:GridTemplateColumn HeaderText="First name" DataField="LastName" SortExpression="LastName"
					GroupByExpression="FirstName group by FirstName">
					<ItemTemplate>
						<%# (Container.DataItem as dynamic).FirstName%>
					</ItemTemplate>
					<EditItemTemplate>
						<asp:TextBox runat="server" ID="FirstNameTextbox" Text=<%# (Container.DataItem as dynamic).FirstName%> "> </asp:TextBox>
					</EditItemTemplate>
				</telerik:GridTemplateColumn>
				<telerik:GridTemplateColumn HeaderText="Last name" DataField="LastName" SortExpression="LastName"
					GroupByExpression="LastName group by LastName">
					<ItemTemplate>
						<%# (Container.DataItem as dynamic).LastName%>
					</ItemTemplate>
					<EditItemTemplate>
						<asp:TextBox runat="server" ID="LastNameTextbox" Text=<%# (Container.DataItem as dynamic).LastName%> "> </asp:TextBox>
					</EditItemTemplate>
				</telerik:GridTemplateColumn>
			</Columns>
		</MasterTableView>
	</telerik:RadGrid>
Radoslav
Telerik team
 answered on 22 Sep 2011
1 answer
86 views
I am working with a grid like in your demo at http://demos.telerik.com/aspnet-ajax/grid/examples/programming/commanditem/defaultcs.aspx.  The main difference is that mine is showing the MasterTableView on the top and bottom of the grid using <PagerStyle Mode="NextPrevNumericAndAdvanced" Position="TopAndBottom" AlwaysVisible="True" />.

I want to do something like change the visible state of a button in the MasterTableView.  Think of changing the "First Page" button to "Visible=false" if you are on the first page.  I can find and change the control at the top just fine, but I can not seem to change the state of the controls in the footer.  Even if I recurse through the RadGrid Controls, I find the top panel twice, but never the bottom one.  If I search for the <div> id name, I can not seem to find it.

Oh, yes the other constraint is that for what I am trying to do, I need to change it from the "RadGridX_SelectedIndexChanged so I can not just put it into the databind for the control.

How do I access the footer controls?
Princy
Top achievements
Rank 2
 answered on 22 Sep 2011
0 answers
150 views
Hi

I use a radgrid on a search page to list search results in a paged manner. If a result-set returns more that 1 page of data and a user navigates to the last page all subsequent attempts to search result in no data displayed on the grid. This is despite that fact that on the quick-watch window the data is clearly there. The behaviour is the same regardless of whether simple or advanced data-binding is used. I have also tried to disable Viewstate and ViewstateMode to resolve this issue to no avail. Please see the grid client code below.

<telerik:RadGrid id="gvSearchDetails" runat="server" autogeneratecolumns="false" 
                        allowfilteringbycolumn="true" allowpaging="true" allowsorting="true"  ViewStateMode="Disabled"
                        allowmultirowselection="false" PageSize="10" onneeddatasource="gvSearchDetails_NeedDataSource" onitemdatabound="gvSearchDetails_ItemDataBound" EnableViewState="False">
                    <MasterTableView DataKeyNames="ReferenceNumber">
                        <Columns>
                            <telerik:GridTemplateColumn DataField="ReferenceNumber" headertext="Ref #" headerstyle-font-bold="true" UniqueName="clSensAnnouncementReference">
                                <ItemTemplate>
                                    <asp:LinkButton id="lnkReferenceNumber" runat="server" readonly="false" guid='<%# Eval("AnnouncementID") %>' text='<%# Eval("ReferenceNumber") %>' OnClick="lnkReferenceNumber_Click"></asp:LinkButton>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridBoundColumn UniqueName="clIssuer" DataField="Issuer" HeaderText="Issuer"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn UniqueName="clIssuerRole" DataField="IssuerRole" HeaderText="Issuer Role"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn UniqueName="clExchange" DataField="ExchangeName" HeaderText="Exchange"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn UniqueName="clSubmitter" DataField="SubmitterCompany" HeaderText="Submitter"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn UniqueName="clSubmissionDate" DataField="SubmissionDate" HeaderText="Submission Date"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn UniqueName="clDisseminationDate" DataField="DisseminationDate" HeaderText="Dissemintation Date"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn UniqueName="clFlashHeadline" DataField="FlashHeadlineText" HeaderText="Flash Headline"></telerik:GridBoundColumn>
                        </Columns>
                    </MasterTableView>
                </telerik:RadGrid>
Masande Dyasi
Top achievements
Rank 1
 asked on 22 Sep 2011
1 answer
171 views
Has anybody been able to extract images from the new office 2010 themes as in the example below.

Many thanks
James
// Works
<img src='<%= Page.ClientScript.GetWebResourceUrl(grid.GetType(), "Telerik.Web.UI.Skins.Black.Grid.AddRecord.gif") %>' />
 
// Doesn't work
<img src='<%= Page.ClientScript.GetWebResourceUrl(grid.GetType(), "Telerik.Web.UI.Skins.Office2010Black.Grid.AddRecord.gif") %>' />


Iana Tsolova
Telerik team
 answered on 22 Sep 2011
3 answers
85 views
Hello,

I have two drag and drop grids and i would like to export all the shipped orders to an excel file. How could i make this?

Thank you very much.

Daniel
Telerik team
 answered on 22 Sep 2011
2 answers
179 views
Hi.
using ASP.NET MVC here, and using the Telerik Grid control.
I ran into a problem where, the initial databinding is fine from the server end, which contains a timespan object. it shows the value just fine.

However, when you press the refresh button on the Grid, the data just disappears even though, the AJAX select call IS being called.

I then ran into this thread:

http://www.telerik.com/community/forums/preview-thread/aspnet-ajax/grid/timespan-object-with-mvc-grid.aspx

So I implemented the Client Template and that works. The problem now is that when you hit the refresh button - I see the icon just indicating its doing work but there is no work being done at all! No errors either.

so what can I do here to display the TimeSpan object correctly on client side, with these issues even when you hit the refresh button?



Ahmed Ilyas
Top achievements
Rank 1
 answered on 22 Sep 2011
1 answer
130 views
Hi all :)


how can I get the first index or specified index of a rad list box ?


for example:


I want to put the value of a the first or second index as a text in a textbox


how can I do that ?


thank you all :)
Shinu
Top achievements
Rank 2
 answered on 22 Sep 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?