Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
293 views
Hello,

Here is what I am trying to achieve. I have a grid which consists of Template columns and I use entity framework to make updates.
The gird will always have one row and the row is in editable mode at all times. Along with the grid I have couple of other controls and another grid on the same page. And I am using an external Save button to save my changes.

Now I dont want to save the Grid Data if the row data was not changed at all. I have tried using
ExtractValuesFromItem
and SavedOldValues. Both of them return nulls. Also I am using Bind and NeedDataSource as suggested in various posts. 
I am left with following options :
1) Change the entity framework resultset to a Dataset and add that dataset as a public property and use
Dim changedRows As DataRow() = ordersTable.Select("OrderID = " + editedItem.OwnerTableView.DataKeyValues(editedItem.ItemIndex)("OrderID").ToString()

2) Add the OntextChanged event and then do some javascript.


Questions:
Q1 What is the best way of detecting changes and are there any other alternatives?
Q2 Is ther anything that I am missing in my current method of ExtractValuesFrom Item?

Please help. I have gone through numerous threads and downloaded many samples. They work but does not fit into my requirement.

Thanks
Pooja
Top achievements
Rank 1
 answered on 14 Feb 2013
1 answer
89 views
I am building upon your demo at:

http://demos.telerik.com/aspnet-ajax/ribbonbar/examples/overview/defaultcs.aspx

What I am trying to do is build a simulation to Microsoft Word 2010.  As I am adding more buttons to the existing groups, the buttons want to continue to span horizontally, but not wrap to the second or third lines.  How can I get these buttons to be placed or wrapped to move to the next lines instead of one single horizontal line of buttons?

See attached image example.

Thank you in advance for you help.
MasterChiefMasterChef
Top achievements
Rank 2
 answered on 14 Feb 2013
3 answers
1.1K+ views
I have a radbutton that calls a local javascript function to perform a jquery animation to an object on the screen. I've set the button to not post back (button.set_autoPostBack(false), but the jquery animation is causing a postback to the server. Whenever I remove the jquery portion the postback doesn't occur. I'm new to jquery, but I figured I could call this slide animation without doing a postback.

The Code:

<script type="text/javascript">
        //<![CDATA[
        function doThis(button, args)
{

            button.set_autoPostBack(false);
            $telerik.$("#testing").slideUp(1000, "slideUp", function () { null; });                
        }
        //]]>
</script> 


 <div id="" class="page_center home_banner_info_block">
     <telerik:RadButton ID="RadButton1" ButtonType="StandardButton" ClientIDMode="Static" runat="server"  Text="RadButton" AutoPostBack="false" OnClientClicked="doThis" >
     </telerik:RadButton>

            <div id="testing" class="white-box" style="width:460px; height:400px; float: left;" >
            <div class="wrap">
            testing
            </div>
            </div>
 </div>
 </div>



    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager> 
Slav
Telerik team
 answered on 14 Feb 2013
9 answers
939 views
Hi,
Good evening all,
Below  the java script method is defined that is called on the rad button onClientClicked event.

  function rbReturnToData_Clicked(button, args)
   {                        
   if (window.confirm("You have pending filter changes.  Apply them?"))
          {                        
           button.set_autoPostBack(true);
           }               
     else
        {                             
        button.set_autoPostBack(true);                       
        }
    }

my question is that is there any way to send extra parameter to the server
with 
button.set_autoPostBack(true);. and how it cab be accessed at server side.

 
 

Slav
Telerik team
 answered on 14 Feb 2013
5 answers
726 views
Hi.

I have a radbutton that is hooked up with the OnClientClicking event to a Javascript function. Inside this function, I'm calling radConfirm, and passing it a callback function. Within this callback function, I am evaluating the response, and then calling the .click() method in order to restart the process.

I'm expecting the .click() method to re-call the OnClientClicking event (which has logic to handle the fact that it's being called again and, if necessary suppress the radconfirm). However, it doesn't appear like this is happening.

Am I doing something wrong?

<telerik:RadButton runat="server" ID="btnTest" OnClientClicking="clicking" />
var LastClickedItem = null;
var clickCalledfromConfirm = false;
 
function clicking(sender, args)
{
    if (!clickCalledfromConfirm)
    {
        args.set_cancel(true);
        LastClickedItem = sender;
        radconfirm("Are you sure you want to do this?", confirmCallBack);
    }
    else
    {
        args.set_cancel(false);
    }
}
 
function confirmCallBack(args)
{
    if (args)
    {
        clickCalledFromConfirm = true;
        LastClickedItem.click();
    }
}

Thanks
Fergal
Slav
Telerik team
 answered on 14 Feb 2013
2 answers
305 views
Hello !

I am trying to 'detect' if change is made to my page, containing telerik and asp.net controls.RadTextboxes behave as expected Code beneath the one for DropDownList does not work. I tried to have just a simple alert but though radComboBox does not seem to be playing fair ...

I am using traditional ASP.NET master/content page scenario. And the content page loads up as a radTab of a master page.

RadTextBox ( Works ! )
    ControlExtension.All(this.Controls).OfType<RadTextBox>().ToList().ForEach(radTb => radTb.Attributes.Add("onchange", "noticeChange(" + radTb.ClientID + ");"));
ControlExtension.All(this.Controls).OfType<RadTextBox>().ToList().ForEach(radTb => radTb.Attributes.Add("onkeydown", "noticeChange(" + radTb.ClientID + ");"))

DropDownList
( Works ! )
    ControlExtension.All(this.Controls).OfType<DropDownList>().ToList().ForEach(dd => dd.Attributes.Add("onChange", "noticeChange(" + dd.ClientID + ");"));
ControlExtension.All(this.Controls).OfType<DropDownList>().ToList().ForEach(dd => dd.Attributes.Add("onselectedindexchanged", "noticeChange(" + dd.ClientID + ");"));

RadComboBox ( Doesn't )
    ControlExtension.All(this.Controls).OfType<RadComboBox>().ToList().ForEach(radDd => radDd.Attributes.Add("onclientselectedindexchanging", "noticeChange(" + radDd.ClientID + ");"));
ControlExtension.All(this.Controls).OfType<RadComboBox>().ToList().ForEach(radDd => radDd.Attributes.Add("OnClientSelectedIndexChanged", "noticeChange(" + radDd.ClientID + ");"));
ControlExtension.All(this.Controls).OfType<RadComboBox>().ToList().ForEach(radDd => radDd.Attributes.Add("onclienttextchange", "noticeChange(" + radDd.ClientID + ");"));


Thanks,
-Aarsh

Added

I tried following, just in the case if you're wanting to suggest. It did not worked. The above approach at least added an attirb when I observed in F12 of IE9 but this guy do not seem to be working.

Additionally, it behaves as if it has a JavaScript error

(my radTab do not fill out in the screen upon JavaScript error, if I use the code posted underneath, this happened, so ... )

ControlExtension.All(this.Controls).OfType<RadComboBox>().ToList().ForEach(radDd => radDd.OnClientSelectedIndexChanged = "noticeChange(" + radDd.ClientID + ")");
ControlExtension.All(this.Controls).OfType<RadComboBox>().ToList().ForEach(radDd => radDd.OnClientTextChange = "noticeChange(" + radDd.ClientID + ");");
Hristo Valyavicharski
Telerik team
 answered on 14 Feb 2013
4 answers
138 views
I've been working through the "MyCustomFilteringColumn" overrides code example, and I've got everything working except I can't seem to get the filter to work, unless I hard code the column name in my query. I'm working with a Data Template Object, and populating the filter dropdown list with Linq query results. But I can't figure out how to evaluate the UniqueName of the passing object (this.UniqueName) as a parameter of my Data Object

Here's what I have in my code:
private void list_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
        {
            ((RadComboBox)o).DataTextField = this.DataField;
            ((RadComboBox)o).DataValueField = this.DataField;
 
            var employees = from emp in EmployeeBL.GetAllEmployees()
                            where emp.FullName.ToLower().Contains(e.Text.ToLower())
                            select emp;
            ((RadComboBox)o).DataSource = employees;
 
            ((RadComboBox)o).DataBind();
        }

I've hardcoded "FullName" which is a property of EmployeeDTO (GetAllEmployees() returns a List<EmployeDTO>), but what I'd like to do is have this.UniqueName evaluate to "FullName" or whatever column is requesting the list.

Thanks,
Gabe
Gabe
Top achievements
Rank 1
 answered on 14 Feb 2013
3 answers
65 views
hello,

when i open this link:
http://demos.telerik.com/aspnet-ajax/splitter/examples/righttoleft/defaultcs.aspx
in explorer 9 it shows the title on the RadSlidingPane
but when i open it on chrome it doesn't show the title.
is there something i can do to fix it?
are you planning on fixing it in the near time future?

Thank you
Vessy
Telerik team
 answered on 14 Feb 2013
3 answers
177 views
Hi there:

Currently using Telerik richtext edit (RadEditor) and upgrade .net web application to support IE8.
We have disabled html paste function on the RadEditor,only allow paste as plain text.
However when user use IE8 browser paste button on the browser menu, it still paste as html format.
The issue doesn't happen on IE6.

Thanks

jim
Rumen
Telerik team
 answered on 14 Feb 2013
5 answers
144 views
One of our customers has reported a problem with the editor that is also reproducible on the Telerik demo page:

http://demos.telerik.com/aspnet-ajax/editor/examples/default/defaultcs.aspx

If you switch to HTML view on the demo page, you'll see this markup for the "RadEditor" logo image:

<img style="margin-top: 25px; float: left; margin-right: 15px;" alt="product logo" src="../../Img/editor.jpg" />

Now switch back to Design view and drag & drop the image to another spot in the editor.

Switch back to HTML view and you'll see the src attribute on the img tag has been changed:

<img style="margin-top: 25px; float: left; margin-right: 15px;" alt="product logo" src="http://demos.telerik.com/aspnet-ajax/editor/Img/editor.jpg" />

Can you provide a fix or other solution to this problem? 

Thanks,
Trevor.
Rumen
Telerik team
 answered on 14 Feb 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?