Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
288 views
I am trying to retrieve the values of dynamically created controls in a Radgrid.  I have read dozens of posts similar to this, but cannot seem to sort it out.

Here is the scenario:

  1. I have a Radgrid on my page with static GridTemplateColumns setup
  2. In one column I have a blank ItemTemplate
  3. OnItemDatabound (which happens as an AJAX callback) I insert a dynamic control, and potentially set it's value (e.g. textbox, datepicker, combobox).  This control type is based on the data - so I cannot do this in OnItemCreated
  4. Everything looks right when the screen comes back - I have a grid with custom controls in each row, and the proper values all set
  5. Then you do some other things on the screen - and eventually click SAVE
  6. On Save I loop through the Radgrid items, find the controls by ID and retrieve their values - to then save off

It is the last part that has me stumped.

At first I was getting a null reference to the controls - and found that my dynamic controls where not in the GridItem container where I had created them.

After a bit of reading, I added code that loops through and re-initializes the controls in the grid.  To do this I Rebind the Radgrid right before looping through the Radgrid items, setting a flag that has the code in ItemDatabound only create the Controls with the proper ID and then .Adds() them to the GridDataItem - skipping the parts that set the default values of the controls

At this point I can now get the control with .FindControl(myID) - but the .text or .selectedvalue, etc is null.  

Is this kind of scenario supported with the RadGrid and AjaxManager?
Jayesh Goyani
Top achievements
Rank 2
 answered on 05 Apr 2013
3 answers
159 views
Hi all

I have a problem.
In my Grid i have the following Code for the part whit the pageable:

.Pageable(paging =>
           paging
               .PageSize(500)
               .Style(GridPagerStyles.Status)
               .Position(GridPagerPosition.Bottom)
       )

Now, when I have more than 500 Items, I can't go to this, then I don't allowed to click to another page in the part of .Style(...).
What can I do, to ask the Grid how many Items that I have, and when it's more than the 500, I allowed the paging?
But only in this situation. 
If I have less then thes 500 I would not to enable and see the Paging. Then I will only see the number of Items...

Thanks
Marco 
Eyup
Telerik team
 answered on 05 Apr 2013
5 answers
835 views
Hi

I am using RadUpload to upload an excel spreadsheet file to a web server.
I then want to map the columns to a database table and import the content to a database,
in code behind. (preferably VB)

I feel there must be some existing code or a third party component to do that, but I have
not been able to find anything.  Can anyone give me some pointers?

OK I can write the code, but this must exist somewhere already.

Thanks

Clive
Kate
Telerik team
 answered on 05 Apr 2013
5 answers
136 views
Hi,

I have a short form that the end user fills it. When he hits the 'submit button' it saves the fields into a database table and it returns it's identity seed.
Now I added the RadAsyncUpload control, and need to associate the seed of the form with the uploaded file.
The problem is that the RadAsyncUpload.FileUploaded event runs before the 'submit button' event.

What is the workaround for this case?

    Protected Sub RadAsyncUpload1_FileUploaded(sender As Object, e As Telerik.Web.UI.FileUploadedEventArgs) Handles RadAsyncUpload1.FileUploaded

        Dim targetFolder As String = RadAsyncUpload1.TargetFolder

        Dim newName As String = hdnPesquisaID.Value & System.Guid.NewGuid.ToString 

        e.File.SaveAs(Path.Combine(Server.MapPath(targetFolder), newName + e.File.GetExtension()))

    End Sub

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click

        hdnPesquisaID.Value = "returns identity seed from database"

    End Sub
Jorge
Top achievements
Rank 1
 answered on 05 Apr 2013
2 answers
143 views
I spend all morning updating resources in my app and debugging. And after I finally got my project to successfully rebuild, I have a very dynamic RadGrid that has two problems.

Now keep in mind the code has not changed and it has always worked fine. I don't know if these issues are related or not.  I can provide code, but I didn't make any changes. I did run the Telerik Upgrade Wizard, but I don't think it would have changed lines of code in my apps. 

1. I dynamically set images and Hyperlinks in a Hyperlink column.  After the updated my images are not showing. And my assigned URL/Links are not updating.

2. When a filter is changed, the results are not being updated.  The page refreshes the records load but the filter criteria is not behaving. I put a postback button in to try to catch the problem and I can't figure it out. Eventually if I postback the filter is passed and loaded.  

Is there anything anyone can recommend to check or try?  I'm about to do a system restore and revert back to my old 2012 version, I'm kinda freaking out because I have a lot of work that is not functioning now and I need to do an update on the production code.

Thanks
Jason  
Maria Ilieva
Telerik team
 answered on 05 Apr 2013
2 answers
188 views
hi, i am student. i have downloaded telerik radcontrols (trial version-30 days) to develop my project web application in asp.net. but my web application will take 2 and half month to get completed. so after trial version expires can i use it again? what should i do to extend validity of product?
Rachana
Top achievements
Rank 1
 answered on 05 Apr 2013
2 answers
146 views
Hi,

Inside my grid CommandItemTemplate i am using radtextbox.

In my radtextbox OnBlur even i am checking whether my textbox value is null or not if null i am assign the hidden field value as null using jquery but checking null value is not working. below is my code can anyone he me on this.


 function validateprodno(sender, args) {
            var grid = $find("<%=grdInbound.ClientID %>");
            var txt = $telerik.findControl(grid.get_element(), "txtOrdNumGrid");
            if (txt.get_value() == "") {
                document.getElementById("<%= hidd_prodcode.ClientID %>").value = "";       
            }
        }


Regards,
Nithya
Nithya Rani
Top achievements
Rank 1
 answered on 05 Apr 2013
2 answers
189 views
Hi Telerik,

Please help me how to add (different) image with all the X-axis labels in RAD HTML5 chart.

Thanks in Advance!
-Alex
Alex
Top achievements
Rank 1
 answered on 05 Apr 2013
1 answer
263 views
Hi,

My shopping cart check out page contains a RadCombobox with few items and there is a RadTextBox with a label given declaratively. For one particular item selected from the RadCombobox, I want to change the textbox label to another Text. How can I do this in JavaScript?

Karl
Princy
Top achievements
Rank 2
 answered on 05 Apr 2013
1 answer
100 views
Hi,

There is a RadMenu on top of my page. Based on the selected menu, I want to populate another RadMenu. Please help.

Thanks in advance
Joseph.
Princy
Top achievements
Rank 2
 answered on 05 Apr 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?