Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
86 views

I have this code in my C# code behind page:

protected void gvEmailRedirectMaint_UpdateCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
        {
            GridEditableItem editItem = (GridEditableItem)e.Item;
            string ID = (editItem["ID"].Controls[0] as TextBox).Text;
            string RedirectEmailAddress = (editItem["RedirectEmailAddress"].Controls[0] as TextBox).Text;
            string ModifiedBy = userID;

            if ((e.Item is GridEditableItem) && (e.Item.IsInEditMode))
            {
                GridEditableItem edititem = (GridEditableItem)e.Item;
                Regex regex = new Regex(@"^[A-Za-z0-9](([_\.\-]?[a-zA-Z0-9]+)*)@([A-Za-z0-9]+)(([\.\-]?[a-zA-Z0-9]+)*)\.([A-Za-z]{2,})$");

                TextBox txtbx = (TextBox)edititem["RedirectEmailAddress"].Controls[0];
                txtbx.Width = Unit.Pixel(300);

                Label l1 = new Label();
                l1.Width = Unit.Pixel(300);

                Match match = regex.Match(txtbx.Text);

                if (match.Success)
                {
                    l1.Text = "";
                }
                else
                {
                    l1.Text = "Please enter a valid email address";
                }
            }

 

When the user clicks the Update icon, I want to display a message if the email address is not in the proper format.  I want the error message to display directly to the right of the email address textbox.  But I can't get this to work.  Can anyone help?  

Bob
Top achievements
Rank 1
 asked on 18 Aug 2017
2 answers
630 views

Hello,

Is there a way to add a confirmation popup via a script of the standard grid delete button on the far right of the row.  I tried to call a javascript function from the OnDeleteCommand of the grid which creates a confirmation and continue on to the event if true.  I couldn't get this to work however it didn't seem to like calling javascript from the control event.  Any help appreciated.

Thanks

Chris
Top achievements
Rank 1
 answered on 18 Aug 2017
1 answer
131 views

Hey, Do you guys have an example of using two listbox controls, with the second listbox is filtered by multi selected items from the first Listbox control?

 

An example:

I have two listbox controls, both using checkboxes with a check all button.  ListboxCountry contains a list of counties.  ListboxCity contains a list of cities.  If I were to check off a country from ListboxCountry then only cities in that country will appear in ListboxCity.  If I check off three counties from ListboxCountry then cities from those three countries will appear in ListboxCity.  No checked countries then no cities.

 

I'm using v2017.2.711.40

Eyup
Telerik team
 answered on 18 Aug 2017
1 answer
116 views

Hi,

I would like to call a JavaScript function whenever an item is checked/unchecked in the excel-like filter list.

Please assist with an example of how this could be achieved.

Thank you,

Jas

Eyup
Telerik team
 answered on 18 Aug 2017
0 answers
116 views
123.png Picture of the data in the google browser to enter the Chinese characters have a reminder function
Another picture in the Chinese characters under the fire did not remind how to solve the Firefox did not remind the screening function
wang
Top achievements
Rank 1
 asked on 18 Aug 2017
0 answers
162 views

Following Kendo grid filter as suggested in below link 

http://docs.telerik.com/kendo-ui/controls/data-management/grid/how-to/filtering/grid-filter-as-you-type.html

Question: When i type the character in the cell, the change event is getting triggered which is good. However the cursor position is always setting to the end of the text. for example, if user types in the middle of the word, immediately cursor is set to the end after trigger change event is fired. 

Is there a way to retain the cursor position as the user type in? 

 

Senthil
Top achievements
Rank 1
 asked on 17 Aug 2017
0 answers
113 views

I have a menu that i wish to change the datasource via javascript. Is this exposed?

Say i have 4 different XMLDatasources that could be used as the datasourceid on a menu depending on a button click. I need to change the radmenu DataSourceID to the different XML datasources in Javascript. Is this possible?

 

 

 

SDI
Top achievements
Rank 1
 asked on 17 Aug 2017
0 answers
149 views

I had a simple question that I can't seem to find the answer to. On my RadGrid I am using a pager and I want the First/Last/Next/Previous buttons to disable dynamically depending on if they are on the first page or last page. I don't want to disappear, but just get disabled. I have attempted this chunk of code down below:

 

 if (e.Item is GridPagerItem)
            {
                GridPagerItem pagerItem = (GridPagerItem)e.Item;
                if (pagerItem.Paging.IsFirstPage)
                {
                    pagerItem.CssClass = "RadFirstPage";
                    ((Button)pagerItem.FindControl("ctl03")).Enabled = false;
                }
                else if (pagerItem.Paging.IsLastPage)
                    pagerItem.CssClass = "RadLastPage";
            }

 

but the button still is able to be clicked on and hovered over. I want it to be completely disabled and without any hover action. Any ideas/suggestions/solutions/alcohol?

Charles
Top achievements
Rank 1
 asked on 17 Aug 2017
0 answers
76 views
I am trying to get an ID field from a radGrid row that I have a checkbox on.  what I want to do is when the user clicks the checkbox is to update a related field in my database to indicate that the item is included or not included.  I am having problems accessing the ID field that I need to.  I tried putting the code in the ClickChanged event for the checkbox but it is not pulling the ID field up.  How is the best way to do this?  Any help would be appreciated.
Donald
Top achievements
Rank 1
 asked on 17 Aug 2017
2 answers
117 views

Hello,

I am trying to register my AsyncUpload's HttpHandler that is nested within a <location> tag and it does not appear to be recognized.  The appropriate <handlers> and <httpHandlers> have been registered and work properly if we remove the <location> tag in question, but when we go to put it into production with the tag present and we receive errors.  Is there a fix or work around for this?

 

<location path="." inheritInChildApplications="false">

<system.web>

<httpHandlers>

</system.web>

<system.webServer>

<handlers>

</system.webServer>

</location>

Vessy
Telerik team
 answered on 17 Aug 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?