Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
192 views
Hi,

I want to create a grid which sets all the records in Edit mode when the page is loaded. I use "In=place" edit mode. I do it following the codes (the same way as instructed from page http://www.telerik.com/help/aspnet/grid/grddefaulteditmodeforgriditemsoninitialload.html or page http://www.telerik.com/help/aspnet-ajax/grdputallitemsineditmodenoadditionalrebind.html)

protected void Page_Load(object sender, EventArgs e)
   {
        
for (int i = 0; i < RadGrid1.PageSize; i++)
       {
           RadGrid1.EditIndexes.Add(i);
       }
   }


OR

private void RadGrid1_PreRender(object sender, System.EventArgs e)
{
if (!IsPostBack)
{
 
foreach(GridItem item in RadGrid1.MasterTableView.Items)
 {
  
if (item is GridEditableItem)
  {
   GridEditableItem editableItem= item
as GridDataItem;
   editableItem.Edit = true;
  }
 }
 RadGrid1.Rebind();
}


The grid works fine om the first page load, but both of the above approaches fail when any postback happens (i.e. when users change to the next page).

So how could I handle the postback event so that all records, for example of the next page, are still in Edit mode after postback?

Regards,

Quan


Princy
Top achievements
Rank 2
 answered on 21 Feb 2011
5 answers
122 views

I have a RadScheduler populated via an SqlDataSource

The SELECT statement on the data source is this.

SqlDataSource1.SelectCommand = "SELECT * FROM [Activity] WHERE act_Rep_ID = " + ScheduleUserID.ToString();

Simple stuff.

Now in the AppointmentDateBound event I am trying to set a different color to the appointment, based on a certain value that should be in the appointment thanks to the SELECT * query in the SqlDataSource.

In this example you can see my test code where I just test the 'Subject'.

protected void RadScheduler1_AppointmentDataBound(object sender, Telerik.Web.UI.SchedulerEventArgs e)
     {
         Appointment a = e.Appointment;
    
         if (a.Subject == "Phone Call")
         {
             a.BackColor = System.Drawing.Color.Yellow;
             a.BorderColor = System.Drawing.Color.Red;
             a.BorderStyle = BorderStyle.Dotted;
             a.BorderWidth = Unit.Pixel(2);
         }
     }


The value I need however is a value that is in the Activity table, but is not listed as a property of the appointment object.

In fact, the appointment object only holds a fraction of the values from each Activity table row.

How do I get to all the other values that this SqlDataSource would be holding ?
Brad
Top achievements
Rank 1
 answered on 21 Feb 2011
1 answer
35 views
I'd like to have a grid of images, say 4x4. And then drag'n'drop to sort the images. Could I use Telerik controls to achieve this functionality.
Julian Roberts
Top achievements
Rank 1
 answered on 20 Feb 2011
6 answers
242 views
Hi All

I want to get the scheduler to scroll to the current time when the page is loaded,
I have found this article but it doesn't seem to function?

Any ideas would be most appreciated.

Many Thanks

Regards

Darren
Cush
Top achievements
Rank 1
 answered on 20 Feb 2011
4 answers
100 views
Hi Team,

         I'm not family with Radcontrol. I'm trying and using it. Currently i have face with this problem. We can be run js function from codebehind. But when i call rad window function, it cannot be fire.

Here is my sample code, i refer from rad window sample code.
JS
function openWin(url,winid)
        {
            var _contparameter='';
            switch(winid)
            {
                case "_radWinItem":
                    _contparameter=document.getElementById('<%=this._itms.ClientID%>').value;
                    break;
                case "_radWinCustomer":
                    _contparameter='';
                    break;
                default:   
            }
            var oWnd = radopen(url+_contparameter, winid);
       }

CS
protected void TextBox1_TextChanged(object sender, EventArgs e)
    {
        ClientScript.RegisterStartupScript(GetType(), "Javascript", "javascript: openWin('item.aspx','_radWin'); ", true);
    }


Kindly, pls help to me. i need urgent.
One more thing, when i call above function 1st time i saw js error in IE. And then 2nd i don't see js error. What wrong it?

Best Regards,
ALEX
Top achievements
Rank 1
 answered on 20 Feb 2011
2 answers
88 views
I have been trying to get the standard RadGrid filtering to work properly but havent been able to.  I'm wondering if it might have to do with the fact that the RadGrid is using data from an XmlDataSource.  I do noticed that if I changed the datasource to a SqlDataSource instance, then the filter works just fine.    

Any help or comment is greatly appreciated.

Shash
Top achievements
Rank 1
 answered on 20 Feb 2011
1 answer
194 views
Hi,
i have the following issues when the user enters the wrong text into a RadTextbox. i've implemented the code below which i found here on this forum to detect if a proper email was entered...while it works at first...the problem is when the wrong/invalid email is entered the error shows up but will not go away.

example: if i were to enter help@df or some other invalid form... the error pops up (which is great)...however if i then fix the issue like help@df.com, the error still shows so its like its remembering part of what i entered and still showing the error.

if i were to enter a complete new address like please@please.com then the error is removed.

so as you can see if the user puts in the wrong email or misses something they will be warned, but the warning will remain even after they fix the issue.

how do  i refresh the validation process for this Textbox or fix this issue.
1. can i clear the validation process with a javascript?
2. maybe different method?


 <telerik:RadTextBox ID="RadTextBox1" runat="server" Width="330px" Skin="Vista" TextMode="MultiLine"
  CssClass="emailcombobox" Font-Names="Arial" Font-Size="10pt" ForeColor="#3366CC"
  ClientEvents-OnBlur="blur" AutoPostBack="true">
   </telerik:RadTextBox>

    <asp:RegularExpressionValidator ID="emailValidator" runat="server" Display="Dynamic"
     SetFocusOnError="True" ErrorMessage="This field may contain only valid e-mail address characters."
    ValidationExpression="^[\w\.\-]+@[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]{1,})*(\.[a-zA-Z]{2,3}){1,2}$"
    ControlToValidate="RadTextBox1">
    </asp:RegularExpressionValidator>
Vasssek
Top achievements
Rank 1
 answered on 19 Feb 2011
4 answers
160 views
Does anyone know how a multiline RadTextBox can be set to start at the top?  I currently have very large text columns that get binded to a radtextbox multiline with scrolling, however when the page is loaded the textbox is already scrolled all the way to the bottom.  I want it to just load the textbox, but keep the scroll position at the top.  A standard asp:textbox does this by default.

Any ideas?
Shawn
Top achievements
Rank 1
 answered on 19 Feb 2011
2 answers
132 views
hi

this is srikanth,

in my hosted environment progress area is not working where as in local machine it is working fine.regarding this and hanging the application telerik forum members are opened a ticket ( 314703).the example sent by that ticket is working fine in local and hosted machine.

problem is,in my application local is working fine where as same files and same web.config file in the hosted server not working.
we are using the rad progress area for checking the file size at client side. but there is no response for the ticket.


local and hosted  system config

window 2003 server,browser IE6.

please reply me


thanks and Regards
Srikanth.N
gaurav
Top achievements
Rank 1
 answered on 19 Feb 2011
1 answer
75 views
We have a number of ComboBoxes in our project where EnableLoadOnDemand = True.

When I set the SelectedValue of a ComboBox from the code behind, the ComboBox Text does not update after asynchronous postback.  If I then click the ComboBox, the right value is highlighted, but unless the ComboBox has focus and is expanded, it does not display the correct text.

I've been able to work around this by doing something like:

With RadComboBox1

.SelectedValue = 1

.Text =.SelectedItem.Text

End With

When I disable LoadOnDemand, everything works as expected.

Is this a bug, or am I missing something about how LoadOnDemand functions?

Thanks for any help/input.

Kalina
Telerik team
 answered on 18 Feb 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?