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


what is the proper way to dynamically set the headetext field? i tried these

 

 

 

<Columns> <telerik:GridBoundColumn DataField="Question" HeaderText='<%#Eval("SubjectArea") %>' SortExpression="Question" UniqueName="ContactName">   
 </telerik:GridBoundColumn>   
 </Columns> 
 
<Columns>   
<telerik:GridBoundColumn DataField="Question" HeaderText='<%#Bind("SubjectArea") %>' SortExpression="Question" 
 
UniqueName="ContactName">   
 </telerik:GridBoundColumn> </Columns>   
 
 

 

 

 

Pipat
Top achievements
Rank 1
 answered on 30 Jun 2017
4 answers
163 views

Hello !

Here is my situation:
I dynamically generate RadGrid from code behind (number of RadGrid, and their ID, is unknown before the page load, it depends of a database).
I have a unique PlaceHolder "Grids" (to insert my RadGrids),  RadAjaxManager and RadAjaxLoadingPanel.
I create their ItemCommand and ajaxify each RadGrid basically as follow:

var grid = new RadGrid();
//...
grid.MasterTableView.CommandItemTemplate = new GridCommandItemTemplate();
Grids.Controls.Add(grid);
RadAjaxManager1.AjaxSettings.AddAjaxSetting(grid, grid, RadAjaxLoadingPanel1);

 

Now I'm trying to add a RadAsyncUpload. The purpose is that the user upload a file, which will be read server-side, insert some data in the database, and will rebind the grid displaying the newly added rows. Each grid can have its own upload button, therefore I think placing it in the GridCommandItemTemplate makes sense and is user friendly. I've added the RadAsyncUpload and so far so good.

However. When my postback is triggered, it's not ajaxified. My whole page is reload. I was expecting my RadAsyncUpload to behave like the other RadButtons of the GridCommandItemTemplate but it's not.

I have tried to ajaxify it during the Item_created event of my RadGrid but I get an error about the collection being modified.

Does someone have a solution ?

Guilhem
Top achievements
Rank 1
 answered on 30 Jun 2017
1 answer
197 views

I have a RadGrid with some GridTemplateColumns. I have an ItemTemplate and EditItemTemplate. In the ItemTemplate I have an <asp:CheckBox>. On page load everything is fine (pic1), but when I add a new row client-side (no postback) using the following javascript function the new row does not show the CheckBox in the ItemTemplate. The column (look at "Analytical Method Required") looks blank (pic2). The EditItemTemplate appears to work...if I click the column on that row the checkbox appears and I can set it (pic3). Then when focus leaves the column the text "true" is displayed instead of the ItemTemplate's checkbox (pic4). 

I have tried debugging in the javascript and can't seem to get a reference to the ItemTemplate's checkbox control (using row.findElement())...it returns null.

Anyone know how I can get the ItemTemplate's checkbox to be present when I add a new row client-side? Thanks.

JS:

function AddNewRowInGrid(sender, args) {      
var grid = $find("<%= grdActivityType.ClientID %>");      
var masterTable = grid.get_masterTableView();      
grid.get_batchEditingManager().addNewRecord(masterTable);     }

TemplateColumn:

<telerik:GridTemplateColumn DataField="AnalyticalMethodRequired" UniqueName="AnalyticalMethodRequired" HeaderText="Analytical Method Required"           HeaderStyle-Width="10%" SortExpression="IGNORE_CASE actyp_anl_mth_req_yn"           ItemStyle-VerticalAlign="Top" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">          
<ItemTemplate>            
<asp:CheckBox ID="chkAnalyticalMethodRequiredItemTemplate" runat="server" Checked='<%# Eval("AnalyticalMethodRequired") %>' onclick='checkBoxClicked(this, event);' />          
</ItemTemplate>          
<EditItemTemplate>            
<asp:CheckBox ID="chkAnalyticalMethodRequiredEditItemTemplate" runat="server" Checked='<%# Bind("AnalyticalMethodRequired") %>' />          
</EditItemTemplate>        
</telerik:GridTemplateColumn>

 

Peter Milchev
Telerik team
 answered on 29 Jun 2017
3 answers
103 views

I have an ASPX page with a Master Page.

When I turn visibility on to a RadPane during initial page load it causes scrolling to occur (Scrolling="Both") it causes the dreaded unhandled exception at line 2545 of Telerik.Web.UI.WebResource.axd?

 

If I set the visibility via AJAX and postback it renders fine.

Any help would be appreciated.  Thanks

 

Vessy
Telerik team
 answered on 29 Jun 2017
0 answers
60 views

 

Hello Support,

We have Telerik grid in our application 

We  are facing the problem of sorting for date field column It sort only for date and month field not for year field

we have set the autogenerated column is true and all columns are dynamically generated that are bound to grid

Please help us to resolve the problem

 

Thank you 

Sandip

 

sandip
Top achievements
Rank 1
 asked on 29 Jun 2017
3 answers
187 views

I have a filter dropdown as you can see in the attachment and my filter options are quite wide and they either drop to two lines or add a scrollbar which is not what I want.

I have tried adding FilterControlWidth="300px" to the GridBoundColumn in the definition of the RadGrid but it is being ignored.

What is the correct way of expanding the width of the filter dropdown?

Marin Bratanov
Telerik team
 answered on 29 Jun 2017
1 answer
163 views
SVG

Hi,

 

In the ImageGallery the thumbnails for SVG files are shown OK.

When I use DisplayAreaMode="ToolTip" the SVG is not shown in the Tooltip.

Is this by design?

 

Marc

Rumen
Telerik team
 answered on 29 Jun 2017
5 answers
174 views
 
I have installed the Trial Version of Telerik ASP.NET Ajax and my installation files are under ProgramFiles folder.  
I am not able to find the SchedulerData.mdb in the Programfiles/telerik/readcontrolsforaspnetajax/livedemos/app_data  
Does it come only with the full version of this product? 
Edward
Top achievements
Rank 1
Veteran
Iron
Iron
 answered on 29 Jun 2017
0 answers
119 views

I am not able to use a Web Service or Page Method (using Model View Presenter framework), so I am trying to implement a AutoCompleteBox with Server-Side Binding.

My data is coming back in a class that I want to bind a contact Name and ID to AutoCompleteBox and I am trying to figure out how to do it without much luck. So basically I have:

var contacts = Presenter.GetContactData(searchText);

 

I was hoping i could do something like this but having no luck:

 

        protected void Page_Load(object sender, EventArgs e)
        {
            Presenter.OnLoad();

                acbInsured.DataTextField = "FullName";
                acbInsured.DataValueField = "ClientKey";
                acbInsured.DataSource = Presenter.Presenter.GetContactData(acbInsured.Text).ToArray();
                acbInsured.DataBind();           
        }

 

Is there I way to bind to just an IEnumerable<SomeClass>?

 

Sean
Top achievements
Rank 1
 asked on 28 Jun 2017
7 answers
699 views
Hi, I need to read the temporary filename that RadAsyncUpload has used.

I have tried the following:

protected void AttachmentAsyncUpload_OnFileUploaded(object sender, FileUploadedEventArgs e)
        {
            string targetFolder = ((RadAsyncUpload)sender).TargetFolder;
            Response.Write(Server.MapPath(targetFolder + "/" + e.File.FileName));
        }

but this is not returning the filename on the disk - I need the full temp file name for example: 1372860982657testdoc.jpg and not just testdoc.jpg

My understanding is that the files are not cleared by default for 4 hours and I need to be able to read the file contents after several postbacks so need to know the temp filenames.

Thanks
Tony
Hamada
Top achievements
Rank 1
 answered on 28 Jun 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?