Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
117 views
Is there a way for me to validate the filename for any special characters and cancel the upload if it contains any special characters?
Ivan Danchev
Telerik team
 answered on 24 Sep 2015
1 answer
188 views

 

I have an external button that needs to call my UpdateCommand event, but I am not sure how to do it.  Here is what I have so far:

protected void RadGrid2_UpdateCommand(object sender, GridCommandEventArgs e)
{
     String connectionString = System.Configuration.ConfigurationManager.ConnectionStrings["KBConnectionString"].ConnectionString;
     try
     {
          string answerid = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["AnswerID"].ToString();
 
          using (SqlConnection conn = new SqlConnection(connectionString))
          {
               conn.Open();
               SqlCommand cmd = new SqlCommand("UPDATE Answers SET Answer_Name = @prmAnswer_Name, Answer = @prmAnswer, TimeAdded = CURRENT_TIMESTAMP WHERE AnswerID = " + answerid, conn);
               cmd.Parameters.Add(new SqlParameter("@prmAnswer_Name", RadTextBox1.Text));
               cmd.Parameters.Add(new SqlParameter("@prmAnswer", RadEditor.Text));
               cmd.ExecuteNonQuery();
               conn.Close();
          }
     }
     catch (Exception)
     {
          RadScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('There was a problem finding the ID, please contact support.')", true);
     }
}
Button click:

protected void RadButton2_Click(object sender, EventArgs e)
{           
     //CommandEventArgs cea = new CommandEventArgs(RadTextBox1.Text, RadEditor.Text);
     //GridCommandEventArgs args = new GridCommandEventArgs(null, "Edit", cea);
     //RadGrid2_UpdateCommand(sender, args);
}
 How do I call the UpdateCommand event from the external button click?

Konstantin Dikov
Telerik team
 answered on 24 Sep 2015
2 answers
83 views

Hello,

there are nice and proper examples for adding an extra input field for each upload of a file in the onClientFileUploaded event.
Like here: http://demos.telerik.com/aspnet-ajax/asyncupload/examples/additionalfields/defaultcs.aspx

But how do i add a second ?

Tried this but failed with a jQuery error :(

function onClientFileUploaded(radAsyncUpload, args) {
            var $row = $(args.get_row());
            var inputName = radAsyncUpload.getAdditionalFieldID("TextBox");
            var inputID = inputName;
            var input = createInput(inputID, inputName);
            var label = createLabel(inputID);
                
            $row.append("<br/>");
            $row.append(label);
            $row.append(input);

            var $row2 = $(args.get_row());
            var inputName2 = radAsyncUpload.getAdditionalFieldID("SelectBox");
            var inputID2 = inputName2;
            var input2 = createDocTypeInput(inputID2, inputName2);
            $row2.append("<br/>");
            $row2.append(label)
            $row2.append(input2);
        }

Any help is highly appreciated.

 

Ivan Danchev
Telerik team
 answered on 24 Sep 2015
1 answer
200 views

Hi,

Is it possible

- to have a radbutton, then on server click, I will be able to save the RadDiagram's json data and persist in a table.column varchar(max)

- on server page load, import a json data (from a table.column) to a RadDiagram control

 

I saw the examples of json upload/save, but these are client side, I need to persist the user modified diagram to a table.

I saw the examples on how to server data bind a RadDiagram, but I can't see how to save user's modified diagram to begin with.

 

Thanks,

Henry

Hans
Top achievements
Rank 1
 answered on 24 Sep 2015
1 answer
511 views

Hi,

I have Telerik UI for ASP.NET 2015 Q2. The combo box expands upwards on most of my pages and I would like them all to expand downwards. I know I can set EnableScreenBoundaryDetection to false and achieve this, but is there a way I can do this without having to add the property to all the combobox's ? any help would be appreciated. Preferable something I can add to the master page to make it expand downward.

 

Thank you

Murali.

Viktor Tachev
Telerik team
 answered on 24 Sep 2015
1 answer
62 views
Dear Admin,
I am going to add some more fields in Appointment of 'RadScheduler' (means i am making CustomAppointment ) I have got help from the link ( http://www.telerik.com/blogs/adding-custom-fields-to-radscheduler-for-winforms-appointments  ) but Step 3 I am stuck and when i copy and past this call it is going red line under IEvent and error message is (The Type of namespace name 'IEvent' could not be found (are you missing a using directive or an assembly reference.)

Can you please help how to resolve it.
Thanks.

Plamen
Telerik team
 answered on 24 Sep 2015
1 answer
77 views

Dear Admin,

 I am going to add some more fields in CustomAppointment of 'RadScheduler' I have got help from the link ( http://www.telerik.com/blogs/adding-custom-fields-to-radscheduler-for-winforms-appointments  ) but Step 3 I am stuck and when i copy and past this call it is going red line under IEvent and error message is (The Type of namespace name 'IEvent' could not be found (are you missing a using directive or an assembly reference.)

 

Can you please help how to resolve it.

thanks.

Plamen
Telerik team
 answered on 24 Sep 2015
1 answer
97 views

So all the examples that Telerik provides for binding Scheduler to WebApi have the aspx page in the root of the application, and the Web Api route with the end point where the path starts with "api", which since it does not contain a / at the beginning makes the requests to the api relative to whatever is calling it. That works fine until you no longer have the scheduler control on a page in the root of the web application. If the scheduler is on a page a /mysubfolder/page.aspx, then the scheduler is going to try to access the Web Api via /mysubfolder/api/..., which doesn't match the Web Api route.

So okay, we just update the Path to the WebServiceSettings to make it absolute (Path="/api/scheduler"). Well this doesn't work because there's explicit logic in the RenderingManager js that checks if the path starts with "api", and only applies the Web Api js logic if that is the case. Since the path has a / at the beginning, the js does not apply the Web Api logic. Manually setting the _isWebApi property to true doesn't appear to be enough to get it working.

Are there any full Web Api binding examples you can provide that show how to bind the Scheduler when it isn't in the root directory of the site?

Plamen
Telerik team
 answered on 24 Sep 2015
2 answers
427 views

hi

I have more than 20 times a day I received this error

any body can help me?

System.Web.HttpException (0x80004005): The file '/Telerik.RadUploadProgressHandler.ashx' does not exist.

at System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean ensureIsUpToDate)
at System.Web.UI.SimpleHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)
at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
at http://elix.ir:80/Telerik.RadUploadProgressHandler.ashx?AsyncProgress=true&RadUrid=510fe1ef-2edf-4e70-be7c-40fe89b586a00&_=1245777284400
Sunil
Top achievements
Rank 1
 answered on 24 Sep 2015
12 answers
1.0K+ views
hi,
     I want to disable / remove context menu items on treeview item right click


Scenario:

I have a treeview of the following structure:

Root --> Item1.1
         -->Item1.2--->Item1.2.1
         -->Item1.3-->Item1.3.1

My Context Menu with Items A,B,C,D,E

On Root node right click i have to get only Context menu Item A only other items have to be disbaled / removed from the context menu.

Similarly on Item 1.1 right click i have to get Item B,C in the context menu.


Quick help in this regard will be helpful.

Thanks,

Vinod.      
Dimitar
Telerik team
 answered on 24 Sep 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?