Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
98 views

I have Grouping set to True but do not know how to add a field to it during design time or in the page load event.

MSQ
Top achievements
Rank 1
 answered on 29 Jan 2020
10 answers
2.7K+ views
I am using a <FilterTemplate> in a <telerik:GridTemplateColumn> for which I have this DropDownList:

<

 

asp:DropDownList ID="ddlEntityTypeFilter" runat="server" AutoPostBack="true"

 

 

 

OnSelectedIndexChanged="ddlEntityTypeFilter_SelectedIndexChanged">

 

 

 

I have succeeded in getting the postback to work correctly so that the RadGrid is updated after a telRadGrid.Rebind().
And everything seems to work EXCEPT the DropDownList does NOT persist the SelectedIndex. I can retain the SelectedIndex in a session variable, but I have not been able to reset the SelectedIndex so that it shows the correct index that was selected for the postback.

Which DropDownList event, and/or RadGrid event, and/or Page event should I be using? Any code to show how to do this would be most appreciated. Thanks.

Alan
Top achievements
Rank 1
 answered on 29 Jan 2020
5 answers
351 views

Hello,

We recently moved to Azure, and in our staging environments, we have had repeated 502 errors when attempting to export to excel from a radgrid.

Restarting the app allows export to be used again for some time. 

I've read some forums that seemed to have similar issues, but not exactly. Was wondering if there was a common fix for this issue that i missed somewhere.

 

Thanks for your help!

Attila Antal
Telerik team
 answered on 29 Jan 2020
9 answers
667 views
Hi,

I have a RadNumericTextBox with an empty message "VEHICLE NUMBER". Upon insertion of vehicle number and other fields user can click on the Update button which causes a post back. The first time the page loads the update button doesn't validate input fields like the vehicle number and causes a post back which is the intended functionality.

However, when I type some number and delete it at the same time the Update button validates the  Vehicle Number RadNumericTextBox.
If I remove the empty message or put a numeric value to the empty massage then the update button works as usual.

It seems that the RadNumericTextBox conflicts with its own EmptyMessage which is not necessarily be a number.

How to avoid this?

Thanks

 
Qing
Top achievements
Rank 1
 answered on 29 Jan 2020
3 answers
371 views
I have tried to change the ForeColor and BackColor of a RACB token, but the styling doesn't appear when i add the tokens. Is it not possible to change the colors from code-behind?

Here is my code:

          
foreach (string chemical in chemicalsArrayList)
{
    AutoCompleteBoxEntry entry = new AutoCompleteBoxEntry();
    chemicalBC = BCFactory.ChemicalBC;
    DataSet dsClassifications = chemicalBC.GetClassificationByChemicalName(chemical);
    entry.Text = chemical;
    if (dsClassifications.Tables[0].Rows.Count != 0)
    {
        entry.ToolTip = dsClassifications.Tables[0].Rows[0][0].ToString();
        entry.ForeColor = System.Drawing.ColorTranslator.FromHtml("#" + dsClassifications.Tables[0].Rows[0]["Color"].ToString());
    }
    else
    {
        entry.ToolTip = "";
    }
 
    racbChemicals.Entries.Add(entry);
}
Peter Milchev
Telerik team
 answered on 28 Jan 2020
1 answer
184 views
Is there a way to select and upload multiple files at once from smartphone, ex. Android?
Vessy
Telerik team
 answered on 27 Jan 2020
10 answers
4.0K+ views
Hi All,

I am new using Telerik controls
in my page i am using Radgrid controls and edit the radgrid "InPlace" mode.
I had one template column and three GridBoundcolumn.
In code behind how can i get the column value using vb.net

My aspx page is below

<telerik:RadGrid ID ="rgSkills" runat ="server" DataSourceID ="sdsEmployee"  AutoGenerateColumns="False" EnableAjax="true" OnInsertCommand ="rgSkills_InsertCommand"

OnUpdateCommand ="rgSkills_UpdateCommand" OnNeedDataSource ="rgSkills_NeedDataSource"

EnableValidation ="True" GridLines="None">

<MasterTableView  GridLines ="None" DataSourceID ="sdsEmployee" DataKeyNames ="emp_skill_set_id"

EditMode="Inplace" AutoGenerateColumns ="False" CommandItemDisplay ="Top" runat ="server"

allowcustompaging="False" allownaturalsort="False" AllowAutomaticUpdates ="false">

<Columns>

<telerik:GridTemplateColumn  DataField="Skill Description" HeaderText="Skills" >

<ItemTemplate>

<asp:LinkButton id="Skills" runat="server" text='<%# Eval("Skill Description") %>'

CommandName ="Update" />

</ItemTemplate>

</telerik:GridTemplateColumn>

<telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName ="EditCommandColumn"

EditText ="Edit" />

<telerik:GridBoundColumn   UniqueName="Skill Description" DataField="Skill Description"

HeaderText="Skill Set Rating" ItemStyle-Font-Size ="Smaller" >

</telerik:GridBoundColumn>

<telerik:GridBoundColumn   UniqueName="Comment" DataField="Comment" HeaderText="Comment"

ItemStyle-Font-Size ="Smaller" >

</telerik:GridBoundColumn>

'

'

'

'


In code behind is

proteced sub rgSkills_UpdateCommand(source As Object, e As GridCommandEventArgs)
{
 'here how to get the boundcolumn value

}
end sub


thanks

psk


Rumen
Telerik team
 answered on 27 Jan 2020
3 answers
201 views

Hi,

   I have set up some code that fires when the "save changes" link it clicked during a batchedit session. The only goal I have here is to set the border color to red if the number entered does not fall into a certain range. I've left the test for the range out of the code below because it isn't important. 

  I have looked through countless telerik posts and finally came upon a line of code to set the bordercolor of the cell to red that doesn't blow up and tell me that some part of the line of code has a property or method that doesn't exist in the idcell object (see below); the line of code does execute with no error:

idCell.style.backgroundColor == "red";

However the cell border does not turn red;

I am confident that the code I'm using does access the cell because this line does work:

  var id = batchManager.getCellValue(idCell);

So basically I can't figure out how to turn the border color to red. Here is a boiled down version of the code to give you an idea of what code I'm using. Any help would be appreciated:

if (args.get_commandName() == "BatchEdit") {
                var masterTable = sender.get_masterTableView();
                var batchManager = sender.get_batchEditingManager();
                var dataItems = masterTable.get_dataItems();
                var idCell = dataItems[i].get_cell("LINE")
                var id = batchManager.getCellValue(idCell);
                var regexpString = "^\\d+\\.\\d{0,decimal}$";
                var fieldValid = regexp.test(id);
                if (fieldValid)
                    batchManager.changeCellValue(idCell, id);
                idCell.style.backgroundColor == "red"; //THIS DOES NOT TURN TO BORDER TO RED
}

 

Vessy
Telerik team
 answered on 27 Jan 2020
0 answers
105 views

Over the last few weeks we've started to get reports from multiple users that have a radwindow sizing issue on Apple Mobile devices. When the window launches it launches off the screen and the scroll doesn't work. We've isolated it to instances where the button that launches the radwindow is below radtabs or a block of text. It is as if the device can no longer find the window size/location. The same radwindows worked fine before the most recent Apple IOS update. We can replicate the issue on updated Apple iPhones and can replicate that the issue doesn't happen on Apple iPhones without the update. 

 

Is there something we can do to overcome the issue?

Jeff
Top achievements
Rank 1
 asked on 25 Jan 2020
1 answer
458 views

I have a GridBoundColumn in my RadGrid that displays a true or false value. In the database, this is stored as a 1 or a 0. During the ItemDataBound event, I check the incoming value for this column and override it to either be the string "TRUE" or the string "FALSE". However, the RadGrid is still identifying the column's datatype as an integer so the filter menu doesn't have certain filtering options like "Contains". I tried to manually set the DataType to "System.String" on both the column itself and during the ItemDataBound event and, while this provides me the filter menu I want, the functions inside don't work (clicking "contains", for example, does nothing at all). 

 

Is there anyway for me to force the filter options to match the values after DataBound?

 

Thanks!

Eyup
Telerik team
 answered on 24 Jan 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?