Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
474 views
I need to change the formatting of some of the field in the row/record if one of them contains any value.
I tried this:

 if (e.Item is GridDataItem)
        {
            GridDataItem dataBoundItem = e.Item as GridDataItem;
            if ((dataBoundItem["AlternCost"].Text) != null)
            {
                dataBoundItem["AlternCost"].ForeColor = Color.Red;
                dataBoundItem["AlternCost"].Font.Bold = true;
                dataBoundItem["AlternCost"].BackColor = Color.Yellow;
                dataBoundItem["TotCost"].ForeColor = Color.Red;
                dataBoundItem["TotCost"].Font.Bold = true;
            }
        }

but I am experiencing problems because the back color applies to the entire column if the condition is true and I need it to be applied only to the "AlternCost" cell/row of the record where the condition occurs.
Please help!

Thanks
Felice
Top achievements
Rank 1
 answered on 22 Jun 2014
5 answers
565 views
I have a radgrid with 4 columns:
Quantity, Cost, SpecialCost, TotalCost
The first 3 columns are data bound, the 4td column is a Calculated column.
I need to calculate the value of the TotalCost based on Quantity*Cost, this is easy:

DataFileds: Quantity, Cost
Expression: {0}*{1}

but if the SpecialCost cell contains a value then the calculation should be done using SpecialCost*Quantity.
As far as I know, the Expression editor does not take logical functions otherwise I could simply use an if statement to check if SpecialCost contains a value and select it.

How can I achieve the above? 
Felice
Top achievements
Rank 1
 answered on 22 Jun 2014
2 answers
369 views
Hi ,

dears , I just need your help as I've a grid contain two labels they are retrieving dates " start_date " " end_date "
I already create a "diff_button", I need when I press in this button to subtract the dates and get the difference in months
and then insert the value in a cell "difference "
Mohamed El-Sayed
Top achievements
Rank 1
 answered on 21 Jun 2014
4 answers
387 views
Hi,

I have integrated the RadUploadProgress module with my web application.

Oiwng to this I had to add a new line in my web.config file as below:

<add name="RadUploadModule" type="Telerik.WebControls.RadUploadHttpHandler, RadUpload.Net2"/>

The website successfully builds.
Now when I try to run the application in the debug mode, it generates a runtime error as below:

Configuration Error 
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 
  
Parser Error Message: Could not load file or assembly 'RadUpload.Net2' or one of its dependencies. The system cannot find the file specified. (E:\Webhome\Power50\Power50UI\web.config line 97)
  
Source Error: 
  
  
Line 95:    <!--<add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" />-->
Line 96:    <add name="RadCompression" type="Telerik.Web.UI.RadCompression" />
Line 97:       <add name="RadUploadModule" type="Telerik.WebControls.RadUploadHttpHandler, RadUpload.Net2"/>
Line 98:    </httpModules>
Line 99:   
  

Please suggest how can I get this resolved.

Thanks.
Debashis


Satbir
Top achievements
Rank 1
 answered on 21 Jun 2014
1 answer
510 views
Hi,

Is there a way to prevent the user from entering more decimal places than specified in the decimal digits setting? 

There was another forum post asking something similar about the control automatically adjusting the value when the user enters something out of range.  Setting AllowOutOfRangeAutoCorrect="false" worked great to address the out of range problem.  Is there something along the lines of AllowRoundingAutoCorrect="false"?

If I set the Type="currency" and NumberFormat-DecimalDigits=2, then I would like the control to display the same sort of validation error as it does for an out of range entry.  Is that possible maybe with javascript?

And note...the default behavior for any control should NEVER be to just automatically change what the user enters to a valid value.

Thanks,
Princy
Top achievements
Rank 2
 answered on 21 Jun 2014
3 answers
1.0K+ views
Hi,

I have nested RadGrid and I want to get the value of a particular column from the selected row of matertableview( in other words clicking on the expand/collapse). Because, I need to use that for the child items query.

Below is my code-snippet:

​protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
{
            // code???
                    string customerid= dataItem.GetDataKeyValue("CustomerId");
 }

Thanks a million.
           
Princy
Top achievements
Rank 2
 answered on 21 Jun 2014
1 answer
128 views
Hi Telerik,

I'm facing an undesired duplicate recording problem with RadGrid when the user accidentally hit the insert link more than once.

The radgrid will execute the insertion twice, I've tried some solution such as Response.Redirect to the same page in the OnItemInserted event, but it will not help due to the fact that the insert command is already sent twice.

I came across a post in the forum mentioning the same issue here, but the admin seems to have misunderstood the question, much appreciated if this time someone can give a better instruction on the problem.

If one double-click can't mimic the problem, click on the insert link nonstop with certain frequency until the page is refreshed, you'll see multiple same record are inserted into the radgrid.

Hope I'm clear here.

Best regards.
Princy
Top achievements
Rank 2
 answered on 21 Jun 2014
0 answers
190 views
I am having an issue in the Kendo HTML 5 Scheduler.  I am setting the Scheduler to Etc/UTC, which as I understand it, should display the event at the time it comes in.  However, it appears to be adjusting the event to the browser timezone.

I edited the demo site to recreate this problem.  Here is the code: http://trykendoui.telerik.com/URux/3

If you run this, the event shows up at your local time, even though it's set to epoch 1403229600000 which is 2:00am UTC.  I'm in Mountain Time, so it shows up at 8:00pm the previous day (-6 hours UTC) in the schedule.

Now look at http://trykendoui.telerik.com/URux

The following lines have changed:
      StartTimezone: null, to StartTimezone: "Etc/UTC",
and
      EndTimezone: null, to EndTimezone: "Etc/UTC",

The event shows up correctly, however, now try and drag it to a new date.  It saves to the local browser time again.

Am I doing something wrong here?
Scott
Top achievements
Rank 1
 asked on 20 Jun 2014
4 answers
288 views
I used a previous example of how to use CSS to format the RadMenu and it has worked for the most part.  I am having trouble with two different items. The first is it appears that I have a separator and I can't figure out how to get rid of it - I tried in the css to make border 0 and width 0 but that did not seem to help.  The bigger issue is how to get the background down to the second level.  The css works great for the root and 1st level but I cannot figure out how to get the second level menu to have the same background.  Finally, is there a way to get the right arrows that show a sub menu to be a different color (or change the image)?

The image of what I'm getting is an attachment.

Here is the css I'm using:

 

div.RadMenu_Default ul.rmRootGroup

 

{

 

background:#344A7C url(App_Themes/Default/images/menu_bg.jpg) top left repeat-x;

 

 

border: 0;

 

}

 

div.RadMenu_Default .rmHorizontal .rmSeparator

 

{

 

width:0px;

 

 

border:0px;

 

}

 

div.RadMenu_Default .rmRootGroup .rmLink

 

{

 

font-weight: bold;

 

 

line-height:30px;

 

 

font-size: 12pt;

 

 

color: #fff;

 

}

 

div.RadMenu_Default .rmItem .rmLink:hover,

 

 

div.RadMenu_Default .rmItem .rmFocused,

 

 

div.RadMenu_Default .rmItem .rmSelected,

 

 

div.RadMenu_Default .rmItem .rmExpanded {

 

 

background:#344A7C url(App_Themes/Default/images/menu_bg.jpg) top left repeat-x;

 

 

border: 0;

 

 

color: yellow;

 

}

 

/*for subitems */

 

 

div.RadMenu_Default ul.rmGroup

 

{

 

background:#344A7C url(App_Themes/Default/images/menu_hover.jpg) top left repeat-x;

 

}

 

div.RadMenu_Default .rmGroup .rmLink

 

{

 

font-weight:normal;

 

 

line-height:24px;

 

 

font-size: 10pt;

 

 

color: red;

 

}

 

div.RadMenu_Default .rmGroup .rmItem .rmLink:hover,

 

 

div.RadMenu_Default .rmGroup .rmItem .rmFocused,

 

 

div.RadMenu_Default .rmGroup .rmItem .rmSelected,

 

 

div.RadMenu_Default .rmGroup .rmItem .rmExpanded {

 

 

background:#344A7C url(App_Themes/Default/images/menu_bg.jpg) top left repeat-x;

 

 

border: 0;

 

 

color: yellow;

 

}



any help you can provide will be greatly appreciated.

Thanks,

Steve
Boyan Dimitrov
Telerik team
 answered on 20 Jun 2014
2 answers
119 views
Hello,

I have noticed the following behaviour with UI for ASP.NET AJAX controls.
If you put a RadGrid on the default page and surf to the url: http://localhost:1234/ the events like sorting do not get fired. Well, you see a postback, but the sorting is not done. If you surf to the page explicitly (http://localhost:1234/default.aspx) it functions as expected. 
Same goes for i.e. RadMenu OnItemClick event. This does not get fired, unless you specifically go to the page. 

Is this a known issue and can one by-pass this, other than surfing to that specific page?
Frank Witte
Top achievements
Rank 1
 answered on 20 Jun 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?