Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
119 views
Hi,
I have treelist.it has nodes.when i click to expand the treelist it behaves i selected it.but i dont click select button i only click the + icon on treelist.this is the code which i tried.

    protected void RadTreeList1_ItemCommand(object sender, TreeListCommandEventArgs e)
    {
        if (e.CommandName == RadTreeList.SelectCommandName)
        {
            TreeListDataItem item = e.Item as TreeListDataItem;
            Guid depid = new Guid(item.GetDataKeyValue("DEPID").ToString());
            RadWindow1.VisibleOnPageLoad = true;
            RadWindow1.NavigateUrl = "department-update.aspx?depid=" + depid;
        }
    }

and this is my button

<telerik:TreeListButtonColumn ButtonType="ImageButton" CommandName="Select" ImageUrl="Contents/Icons/select.png"
                    UniqueName="Select">
Teoman
Top achievements
Rank 1
 asked on 07 Aug 2011
1 answer
92 views
Anyone have any ideas about this one?

if (dataBoundItem.ItemIndex > 1) 
                {
                    e.Item.ForeColor = Color.Red;
                    if (Decimal.Parse(dataBoundItem["pcntchg"].Text) < 0) <<How to get the value here without using column name, I can't see how.
                    {
                        dataBoundItem["pcntchg"].ForeColor = Color.Red;
                    }
                }

Thanks!
Jayesh Goyani
Top achievements
Rank 2
 answered on 07 Aug 2011
2 answers
129 views
How to select new window option for ddl when i click on hyperlink image for creating hyper link the new window popup is open there is a ddl for target inside this ddl how i select new window option by default.
zaib
Top achievements
Rank 1
 answered on 07 Aug 2011
1 answer
189 views
Hi,

I have some submenus off a main structure.  The code is below.  When I mouseover back and forth from the main menu to the submenu the overall menu height keeps changing. It shrinks when I move towards the submenu and gets back to original size when I come back to the main menu.  This is a sample HTML I put together, the issue happens when I move between "View" and "Recent" back to Searches in the main menu.  The CSS I am using is at the bottom of the HTML.

Sri


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>

</title><link id="Link1" href="css/Main.css" rel="Stylesheet" type="text/css" /><link href="/MenuControlWebApp/WebResource.axd?d=evYtvo20YR9hnsrP1j0caH19zB40cSCQTuHdEl37YrCSlO4BQ0zWC6oHgLMkSbPU0&amp;t=633710915156718750" type="text/css" rel="stylesheet" class="Telerik_stylesheet" /><link href="/MenuControlWebApp/WebResource.axd?d=evYtvo20YR9hnsrP1j0caH19zB40cSCQTuHdEl37YrCttVAaPUcdwLXgeKMP55OaCtfAPBLhQnecrSaCzbORfA2&amp;t=633710915156718750" type="text/css" rel="stylesheet" class="Telerik_stylesheet" /></head>
<body>
    <form name="form1" method="post" action="default.aspx" id="form1">
<div>
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTEwNDcxOTg2NTIPZBYCAgMPZBYCAgEPFCsAAhQrAAIPFgIeF0VuYWJsZUFqYXhTa2luUmVuZGVyaW5naGQQFgNmAgECAhYDFCsAAmRkFCsAAmRkFCsAAmQQFgRmAgECAgIDFgQUKwACZGQUKwACZBAWAmYCARYCFCsAAmRkFCsAAmRkDxYCZmYWAQV0VGVsZXJpay5XZWIuVUkuUmFkTWVudUl0ZW0sIFRlbGVyaWsuV2ViLlVJLCBWZXJzaW9uPTIwMDguMy4xMDE2LjM1LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPTEyMWZhZTc4MTY1YmEzZDQUKwACZGQUKwACZGQPFgRmZmZmFgEFdFRlbGVyaWsuV2ViLlVJLlJhZE1lbnVJdGVtLCBUZWxlcmlrLldlYi5VSSwgVmVyc2lvbj0yMDA4LjMuMTAxNi4zNSwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj0xMjFmYWU3ODE2NWJhM2Q0DxYDZmZmFgEFdFRlbGVyaWsuV2ViLlVJLlJhZE1lbnVJdGVtLCBUZWxlcmlrLldlYi5VSSwgVmVyc2lvbj0yMDA4LjMuMTAxNi4zNSwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj0xMjFmYWU3ODE2NWJhM2Q0ZGQYAQUeX19Db250cm9sc1JlcXVpcmVQb3N0QmFja0tleV9fFgEFDm5hdmlnYXRpb25NZW51qYqgI5M9vu4gKKZ0YwXpMFTG7gc=" />
</div>

<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['form1'];
if (!theForm) {
    theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }
}
//]]>
</script>
<script src="/MenuControlWebApp/WebResource.axd?d=dUQ6eyHfUxXT-Pc-K1pXog2&amp;t=633392531767031250" type="text/javascript"></script>


<script src="/MenuControlWebApp/ScriptResource.axd?d=nsh6bKeP1Nsf0bOYM8puBePWWY7emLcCII6PXF8Pc0s59zPX_PQ6B6prCzOMdel-kOqj9VMd-Zrnr7VgLiNjuDFI8-q7u5bYErh2TtlIeBc1&amp;t=633392535216406250" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
if (typeof(Sys) === 'undefined') throw new Error('ASP.NET Ajax client-side framework failed to load.');
//]]>
</script>

<script src="/MenuControlWebApp/ScriptResource.axd?d=nsh6bKeP1Nsf0bOYM8puBePWWY7emLcCII6PXF8Pc0s59zPX_PQ6B6prCzOMdel-gpFzsP0Ff_G5U27Cn8DclDF_8HiJpVUZBdb25OAbdRBUGyRRkY8aZtpWi2UwGB_h0&amp;t=633392535216406250" type="text/javascript"></script>
<script src="/MenuControlWebApp/ScriptResource.axd?d=eMCWEkDgllH0YualrAqfR3UQfd6g_kMAAHzKTQ4AjJal-P7V_P1VMsvIpGQt90H40&amp;t=633710915156718750" type="text/javascript"></script>
<script src="/MenuControlWebApp/ScriptResource.axd?d=eMCWEkDgllH0YualrAqfR3UQfd6g_kMAAHzKTQ4AjJbfdqqxD7Ntnz74I8D9i4q38VlzfrOI0uHWrKe1t2F2k0tm5I3oUWwisQXjoxf_vdY1&amp;t=633710915156718750" type="text/javascript"></script>
<script src="/MenuControlWebApp/ScriptResource.axd?d=eMCWEkDgllH0YualrAqfR3UQfd6g_kMAAHzKTQ4AjJaB5yiTLMhrjAt_4QmWoAfEj98R7LIVj3VEaiGlJLfTFvPdX8b2a4mLjsFvZXZSRls1&amp;t=633710915156718750" type="text/javascript"></script>
<script src="/MenuControlWebApp/ScriptResource.axd?d=eMCWEkDgllH0YualrAqfR3UQfd6g_kMAAHzKTQ4AjJbofaRFIQlinboDZIs6pIMBill9hWYNSGIL6oiwnoh3wkiFIZQMZv5AQz5_b4OfKpE1&amp;t=633710915156718750" type="text/javascript"></script>
<script src="/MenuControlWebApp/ScriptResource.axd?d=eMCWEkDgllH0YualrAqfR9j7JvyL0AOnQkbGUTjx9JWuJNTdOhr33qYLUeSu7lyX2vPjk1d8sAnmZh4DPhLQlg2&amp;t=633710915156718750" type="text/javascript"></script>
    <div>
        <div id="navigationMenu" class="RadMenu RadMenu_Default main_navigation_menu">
	<!-- 2008.3.1016.35 --><ul class="rmHorizontal rmRootGroup">
		<li class="rmItem rmFirst"><a href="#" class="rmLink "><span class="rmText">Home</span></a></li><li class="rmItem"><a href="#" class="rmLink "><span class="rmText">Preview</span></a></li><li class="rmItem rmLast"><a href="#" class="rmLink wArrow"><span class="rmText">View</span></a><div class="rmSlide">
			<ul class="rmVertical rmGroup rmLevel1">
				<li class="rmItem rmFirst"><a href="#" class="rmLink "><span class="rmText">Folders</span></a></li><li class="rmItem"><a href="#" class="rmLink subMenuArrow"><span class="rmText">Searches</span></a><div class="rmSlide">
					<ul class="rmVertical rmGroup rmLevel2">
						<li class="rmItem rmFirst"><a href="#" class="rmLink "><span class="rmText">View</span></a></li><li class="rmItem rmLast"><a href="#" class="rmLink subMenuArrow"><span class="rmText">Recent</span></a></li>
					</ul>
				</div></li><li class="rmItem"><a href="#" class="rmLink "><span class="rmText">Bookmarks</span></a></li><li class="rmItem rmLast"><a href="#" class="rmLink "><span class="rmText">Print</span></a></li>
			</ul>
		</div></li>
	</ul><input id="navigationMenu_ClientState" name="navigationMenu_ClientState" type="hidden" />
</div>
    
    <script type="text/javascript">
//<![CDATA[
Sys.WebForms.PageRequestManager._initialize('ScriptManager', document.getElementById('form1'));
Sys.WebForms.PageRequestManager.getInstance()._updateControls([], [], [], 90);
//]]>
</script>
 
    </div>
    

<script type="text/javascript">
//<![CDATA[
Sys.Application.add_init(function() {
    $create(Telerik.Web.UI.RadMenu, {"_skin":"Default","clientStateFieldID":"navigationMenu_ClientState","collapseAnimation":"{\"type\":12,\"duration\":200}","itemData":[{},{},{"items":[{},{"items":[{},{"cssClass":"subMenuArrow"}],"cssClass":"subMenuArrow"},{},{}],"focusedCssClass":"wArrowExpanded","cssClass":"wArrow"}]}, null, null, $get("navigationMenu"));
});
Sys.Application.initialize();
//]]>
</script>
</form>
</body>
</html>


CSS


.main_navigation_menu
{
    border:none;
}

.main_navigation_menu .rmRootGroup
{
    padding-left: 0;
    margin-left: 0;
    background-color: #1a144c;
    color: #ffffff;
}

.main_navigation_menu .rmHorizontal .rmVertical .rmLink
{
    width:150px;
    height:25px;
    border-bottom:1px solid #e1e1e1;
    border-top:1px solid #ffffff;
    background-color:#f7f7f7;
    background-image:none;
    padding: 0;
    border-left:none;
    border-right:none;
}

.main_navigation_menu .rmHorizontal .rmVertical .dtl_sub_menu_arrow
{    
    width:150px;
    height:25px;
    font-size:10px;
    font-weight:normal;
    color:#525151;
    text-decoration:none;
    border-bottom:1px solid #e1e1e1;
    border-top:1px solid #ffffff;
    background-color:#f7f7f7;
    background-image:url(../images/naviSubArrow_arrow.gif);
    background-repeat:no-repeat;
    background-position:130px 1px;
    padding:0px;
    border-left:none;
    border-right:none;
}

.main_navigation_menu .rmHorizontal .rmVertical .dtl_sub_menu_arrow:hover
{    
    background-color:#ededed;
    width:150px;
    height:25px;
    font-size:10px;
    font-weight:normal;
    color:#525151;
    text-decoration:none;
    border-bottom:1px solid #e1e1e1;
    border-top:1px solid #ffffff;
    background-color:#f7f7f7;
    background-image:url(../images/naviSubArrow_arrow.gif);
    background-repeat:no-repeat;
    background-position:130px 1px;
    padding:0px;
    border-left:none;
    border-right:none;
}

.main_navigation_menu .rmHorizontal .rmVertical .rmLink .rmText
{
    font-size:10px;
    font-weight:normal;
    color:#525151;
    text-decoration:none;
}

.main_navigation_menu .rmHorizontal .rmLink
{
    background-image: url(../images/top_navi_menu_off.gif);
    background-repeat:repeat-x;
    background-position: 50% top;
    cursor: pointer;
    height:34px;
    float: left;
}

.RadMenu_Default .rmHorizontal .rmItem {
        PADDING-BOTTOM: 1px
}

.main_navigation_menu .rmHorizontal .rmLink .rmText
{
    color: #ffffff;
    font-weight:bold;
    font-size:11px;
    text-decoration: none;    
    padding-top: 11px;
}

.main_navigation_menu .rmHorizontal .wArrow {
    padding: 0px 15px 0px 0px;
    background-image: url(../Images/top_navi_menuarrow_off.gif);
    background-repeat:repeat-x;
    background-position:right;
}

.dtl_main_navigation_menu .rmGroup .rmText
{
    padding: 0 40px 0 0;
}

.main_navigation_menu .rmHorizontal .rmVertical .rmLink:hover
{
    background-color:#ededed;
    border:none;
}

.main_navigation_menu .rmHorizontal .rmLink:hover,
.main_navigation_menu .rmHorizontal .rmExpanded,
.main_navigation_menu .rmHorizontal .rmFocused
{
    background-image: url(../images/top_navi_menu_on.gif);
    border:none;
}

.main_navigation_menu .rmHorizontal .wArrow:hover
{
    background-image: url(../images/top_navi_menuarrow_on.gif);
}

.main_navigation_menu .rmHorizontal .wArrowExpanded
{
    background-image: url(../images/top_navi_menuarrow_on.gif);
}

.main_navigation_menu .rmGroup .rmItem,
.main_navigation_menu .rmGroup .rmLink
{
    /*background: transparent;*/
}

Pieter
Top achievements
Rank 1
 answered on 06 Aug 2011
7 answers
306 views
Hi there, i'm wondering if this is possible, what i'd like to be able to implement is a radcombobox where it finds the closest match to whatever you type.

For example i've got a radcombobox with markfirstmatch enabled and allowcustomtext to false (because i want to limit them to the items within the combobox). 

Take this for example; a combobox populated with countries. 

United Kingdom 
United Arab Emirates. 

I start typing 'Uni' and it jumps to any items starting with 'Uni' which is great. However, what if i want to type 'Kingdom' ? Or 'Arab' , or any part of the text. 

I'd like it filter the items in the combobox based on this. 

Another example would be me typing in 'land' and having it find 'England', and any other items containing that text.

Many thanks for your support Telerik.

Alan

Alan T
Top achievements
Rank 1
 answered on 06 Aug 2011
4 answers
231 views
I have a nested grid view in radAjaxPanel. In parent grid, there is one division, in which I am adding linkbuttons runtime on _ItemDatabound. I need to open picture files on click of the link button click.
Like, div in <itemTemplate>

<div id="divAddAttachment" runat="server">  </div>

And on server side, on _ItemDatabound event, I am adding link button and assigning click event of that.
lnkOtherattachment.Text = "link1" ;
 lnkOtherattachment.CommandArgument = userid;
 lnkOtherattachment.CommandName = strFilePath + ext;
 lnkOtherattachment.ID ="lnk" + Guid.NewGuid().ToString();
 lnkOtherattachment.Command += new CommandEventHandler(attach_Click);
 divAttachments.Controls.Add(lnkOtherattachment);


The whole grid is inside RadAjaxPanel. So, as i need to open image on click of the linkbutton,

function OnRequestStart(target, arguments) {             
     if (arguments.get_eventTarget().indexOf("lnk") > -1) {                
         arguments.set_enableAjax(false);
     }
 }


But it never calls the "attach_Click" event on click of the link button.
This works perfect outside the radGrid.
What's wrong with this code?
Jayesh Goyani
Top achievements
Rank 2
 answered on 06 Aug 2011
5 answers
444 views

I am using Telerik RadControls. I have radGrid in which i have upload control for inserting images. But error is thrown when I try to upload any file.

Object must implement IConvertible.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidCastException: Object must implement IConvertible.

Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[InvalidCastException: Object must implement IConvertible.] System.Convert.ChangeType(Object value, TypeCode typeCode, IFormatProvider provider) +2877013 System.Web.UI.WebControls.Parameter.GetValue(Object value, String defaultValue, TypeCode type, Boolean convertEmptyStringToNull, Boolean ignoreNullableTypeChanges) +141 System.Web.UI.WebControls.Parameter.GetValue(Object value, Boolean ignoreNullableTypeChanges) +63 System.Web.UI.WebControls.SqlDataSourceView.AddParameters(DbCommand command, ParameterCollection reference, IDictionary parameters, IDictionary exclusionList, String oldValuesParameterFormatString) +524 System.Web.UI.WebControls.SqlDataSourceView.ExecuteUpdate(IDictionary keys, IDictionary values, IDictionary oldValues) +141 System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback) +92 Telerik.Web.UI.GridTableView.PerformUpdate(GridEditableItem editedItem, Boolean suppressRebind) +224 Telerik.Web.UI.GridCommandEventArgs.ExecuteCommand(Object source) +985 Telerik.Web.UI.RadGrid.OnBubbleEvent(Object source, EventArgs e) +134 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37 Telerik.Web.UI.GridEditFormItem.OnBubbleEvent(Object source, EventArgs e) +216 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37 System.Web.UI.WebControls.ImageButton.OnCommand(CommandEventArgs e) +111 System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +176 System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565


I am actually trying to use this example with my databases and all.

http://demos.telerik.com/aspnet-ajax/controls/examples/integration/raduploadinajaxifiedgrid/defaultvb.aspx?product=grid&RadUrid=2ecccfe5-76bd-4310-b0a3-c5c84afc1beb



Aamir
Top achievements
Rank 1
 answered on 06 Aug 2011
1 answer
67 views
Hi everyone,

We are using a grid column and it's displayed correctly in the grid.
We have implemented an export function (using RadGrid1.MasterTableView.ExportToCSV();).
The resulting file is a CSV or excel without any value under the rating column.

Are there any known issue with the export of a rating column?

Thank you

Regis
Jayesh Goyani
Top achievements
Rank 2
 answered on 06 Aug 2011
3 answers
395 views
Hi All:

Like others, I am experiencing the following error in my orders selection grid. 
The state information is invalid for this page and might be corrupted.
   at System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError)
   at System.Web.UI.ViewStateException.ThrowViewStateError(Exception inner, String persistedState)
   at System.Web.UI.HiddenFieldPageStatePersister.Load()
   at System.Web.UI.Page.LoadPageStateFromPersistenceMedium()
   at System.Web.UI.Page.LoadAllState()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Inner Exception Trace:   Invalid viewstate.
    Client IP: 127.0.0.1
    Port:
    Referer: http://localhost:52506/WebUI/OrderSelection.aspx
    Path: /WebUI/OrderSelection.aspx
    User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; MS-RTC EA 2; MALC)
    ViewState: /wEPDwULL...
 
Inner Exception Trace:   Invalid length for a Base-64 char array.
   at System.Convert.FromBase64String(String s)
   at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString)
   at System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(String serializedState)
   at System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState)
   at System.Web.UI.HiddenFieldPageStatePersister.Load()

The grid allows filtering and contains 2 RadDatePickers.  If I change a value in the picker and press enter, I get the above error.  If I tab out of the field then no error.

I have tried EnableLinqExpressions="False", but no luck.

Phil
Phil
Top achievements
Rank 2
 answered on 06 Aug 2011
5 answers
506 views

Hi Guys

I am using the Chart control to display some dashboard summary data. The page area I have is not that large, so I need to maximise its use!

Issue: I want to remove the title and legend and stretch out the chart size and utilise the title and legend area!

Now I have removed the Chart title (set visible to false) and tried a number of settings on the Legend - (set visible to false, changed the legend position etc), although when I remove the title and legend, the space on the top for the title and on the right side for the legend is not utilised for chart I am displaying. I have also tried increasing the width and height of the chart, but again this increases the total canvas size and we are still left with the blank space on the top and right. I either need to be able to reduce the size of the canvas the chart sits on, or increase the chart size utilising the blank space on the right and top of the chart.

Can this be done?

I have attached an image of my graph for reference, and coloured blue the area I need to utilise.

Ashim
Top achievements
Rank 1
 answered on 05 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?