Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
226 views
Hi,
I have an issue very similar to the one discussed in  RadSlider inside initially hidden elements (e.g. RadToolTip) except what I have is a RadGrid on a RadMultiPage where the PagerStyle is set to "Slider". 

What happens is that when the page is loaded and I click on the History tab, the slider comes up looking like the attached sliderissuea.png.  If I click on another tab then return to the History tab, the slider comes up looking as it ought to (see sliderissueb.png).

As an experiment, I tried loading the page directly to the History tab and it renders correctly in that scenario.  Is there a fix for the PagerStyle Slider within a RadGrid that is similar to the one described for the RadSlider in the above link?

Thanks,
Dan
Marin
Telerik team
 answered on 23 May 2011
4 answers
318 views
I'm using a dropdownlist inside a radwindow.
If I set the Enable View state of Window manager to 'false', I'm unable to capture the selected item value of the dropdownlist on server side and if I set it to 'true' I'm able to capture the selected item value but the radwindow keeps on opening on each postback.
sirisha
Top achievements
Rank 1
 answered on 23 May 2011
4 answers
393 views
Hi!  I'm running into an issue when adding a JavaScript method to the 'OnClientClicked' of a RadButton.  I receive a JavaScript error "this._postbacksettings is null" and the button click event handler in the code behind never fires.

There is no validation on the aspx page, and the button is contained within a RadPane.  The button has even been Ajaxed to see if that would resolve the error, but did not make a difference.

Essentially I'm trying to disable the button and change it's text once a user clicks on it so they cannot click more than once while the 'click' event handler for the button in the code behind is completing.

Here is the JavaScript code and the aspx for the button:
function DisableSubmitBtn() {
                btnSubmit = $find('<% =btnItemSubmit.ClientId %>');
                btnSubmit.set_text("Submitting");
                btnSubmit.set_enabled(false);
}
 
 
<telerik:RadButton ID="btnItemSubmit" runat="server" Skin="Sunset" Text="Submit"
        Width="98%" OnClientClicked="DisableSubmitBtn">
        <Icon PrimaryIconCssClass="rbOk" PrimaryIconLeft="4" PrimaryIconTop="4" />
</telerik:RadButton>

I have similar logic working on another page without any problem.  Though on the other page there is validation and in the Javascript I have an 'If' clause that checks if the page is valid before disabling the button and changing it's text.

Could someone help me understand why this is happening, and what I may need to do to fix the JavaScript error?

Thanks!
Pero
Telerik team
 answered on 23 May 2011
2 answers
264 views
Hi,
 i  am displaying data in a rad grid,
i want to provide export option for only 4 columns of grid  out of 6.
can any one help me in this please.............

Thank you,
phani
phani
Top achievements
Rank 1
 answered on 23 May 2011
2 answers
84 views
I have a RADGrid with update capability-the INSERT and UPDATE done through a user control.  I have a pair of checkboxes on the main form which affect the processing.  How do I pass the values of these checkboxes into the user control (or access them from the user control code behind)?
Elliott
Top achievements
Rank 2
 answered on 23 May 2011
2 answers
104 views
Hello Everyone,
                        I used Radupload in my webpage.and insert multiple docs in database..but when i refresh this page insert previous data automatically....if anyone has solution give it..

Thanks..

My Code is Here...
  <telerik:RadScriptManager id="ScriptManager1" runat="server" />
        
          
            
            <telerik:RadProgressManager id="Radprogressmanager1" runat="server" />
            
            <div style="position: relative;">
                <table>
                 <tr>
                        <td id="controlContainer">
                            <telerik:RadUpload
                                ID="RadUpload1"
                                runat="server"
                                InitialFileInputsCount="1"
                                MaxFileInputsCount="5"
                                AllowedFileExtensions=".jpg,.jpeg"  ControlObjectsVisibility="None" />
                                
                            <telerik:RadProgressArea id="progressArea1" runat="server"/>
                            <asp:Button id="buttonSubmit" runat="server" CssClass="RadUploadSubmit" OnClick="buttonSubmit_Click" Text="Submit" style="MARGIN-TOP: 6px" />
                        </td>
                        <td>
                            <div class="smallModule">
                                <div class="rc1"><div class="rc2"><div class="rc3" style="width:240px">
                                    <div class="title" style="color: green">Uploaded valid files (*.jpg, *.jpeg):</div>
                                    
                                    <asp:Label ID="labelNoResults" runat="server" Visible="True">No uploaded files</asp:Label>
                                    
                                    <asp:Repeater ID="repeaterValidResults" runat="server" Visible="False">
                                        <ItemTemplate>
                                            <%#DataBinder.Eval(Container.DataItem, "FileName")%>
                                            (<%#DataBinder.Eval(Container.DataItem, "ContentLength").ToString() + " bytes"%>)<br /><br />
                                        </ItemTemplate>
                                    </asp:Repeater>
                                    
                                    
                                    <div class="title" style="color: red; padding-top: 40px;">Invalid files:</div>
                                    
                                    <asp:Label id="labelNoInvalidResults" runat="server" Visible="True">No invalid files</asp:Label>
                                    
                                    <asp:repeater id="repeaterInvalidResults" runat="server" visible="False">
                                        <itemtemplate>
                                            File: <%#DataBinder.Eval(Container.DataItem, "FileName") %>
                                            (<%#DataBinder.Eval(Container.DataItem, "ContentLength").ToString() + " bytes"%>)
                                            <br />
                                            Mime-type: <%#DataBinder.Eval(Container.DataItem, "ContentType").ToString()%>
                                        </itemtemplate>
                                    </asp:repeater>
                                </div></div></div>
                            </div>
                        </td>
                    </tr>
                 </table>
            </div>


and .cs file coding

 protected void buttonSubmit_Click(object sender, System.EventArgs e)
    {
        
            BindValidResults();
      
            BindInvalidResults();

            //Remove this line if you do not want to delete the files
            //in the location where they have been saved
            DeleteFiles();
            //RadUpload1.UploadedFiles.Clear();
            //int j = RadUpload1.UploadedFiles.Count;
          
       
    }

    private void BindValidResults()
    {
        if (RadUpload1.UploadedFiles.Count > 0)
        {
            //foreach (UploadedFile validFile in RadUpload1.UploadedFiles)
            //{
            //    string targetFolder = Server.MapPath("~/images/");
            //    validFile.SaveAs(Path.Combine(targetFolder, validFile.GetName()), true);
            //}
            for (int i = 0; i < RadUpload1.UploadedFiles.Count; i++)
            {
                FileName = RadUpload1.UploadedFiles[i].FileName.ToString();
                pa = "~/images/" + FileName;
                string fad = Server.MapPath("images/" + RadUpload1.UploadedFiles[i].FileName.ToString());
                RadUpload1.UploadedFiles[i].SaveAs(fad);
                // string va = "~/" + ;

                string str = "insert into generaldocuments(Doc,date) values('" + pa + "','" + System.DateTime.Today.Date.ToShortDateString() + "')";
                int j = obj.FireQuery(str);

            }
            labelNoResults.Visible = false;
            repeaterValidResults.Visible = true;
            repeaterValidResults.DataSource = RadUpload1.UploadedFiles;
            repeaterValidResults.DataBind();
        }
        else
        {
            labelNoResults.Visible = true;
            repeaterValidResults.Visible = false;
        }
    }

    private void BindInvalidResults()
    {
        if (RadUpload1.InvalidFiles.Count > 0)
        {
            labelNoInvalidResults.Visible = false;
            repeaterInvalidResults.Visible = true;
            repeaterInvalidResults.DataSource = RadUpload1.InvalidFiles;
            repeaterInvalidResults.DataBind();
        }
        else
        {
            labelNoInvalidResults.Visible = true;
            repeaterInvalidResults.Visible = false;
        }
    }

    /// <summary>
    /// For the purpose of this demo we delete the files collection in the targetfolder
    /// to prevent it from growing infinitely
    /// </summary>
    private void DeleteFiles()
    {
        string targetFolder = Server.MapPath("~/images/");

        DirectoryInfo targetDir = new DirectoryInfo(targetFolder);

        try
        {
            foreach (FileInfo file in targetDir.GetFiles())
            {
                if ((file.Attributes & FileAttributes.ReadOnly) == 0) file.Delete();
            }
        }
        catch (IOException)
        {
        }
    }
dhara
Top achievements
Rank 1
 answered on 23 May 2011
5 answers
110 views
hI

im adding data to rad combo using the below Script  client script

Group.trackchanges();
for(var myproduct=selDivision.nextNode();myproduct;myproduct=selDivision.nextNode()){

 

var

 

comboItem1= new Telerik.Web.UI.RadComboBoxItem();

 

if

 

(selOldUnit==myproduct.attributes(0).value){

 

 

comboItem1.set_value(myproduct.attributes(0).value);

 

comboItem1.set_text(myproduct.text);

 

Group.get_items().add(comboItem1);

 

comboItem.select();

 

}
Group.commitchages();

the same code for ASP Drop down is add data fastly.. please help me fixing this

how to set integral height true is Sourec Code

Thanks
Harin


Dimitar Terziev
Telerik team
 answered on 23 May 2011
5 answers
165 views
hi,

My Browser is IE8. I am using comboBox like that;

<telerik:RadComboBox ID="rcbEquipmenList" runat="server" Width="300px" Height="150px"
                EmptyMessage="Malzeme Seçiniz" EnableLoadOnDemand="True" ShowMoreResultsBox="true"
                EnableVirtualScrolling="true" OnItemsRequested="rcbEquipmenList_ItemsRequested">
            </telerik:RadComboBox>

When I convert my scriptmanager EnableHistory propert TRUE, then OnItemsRequested not fired. On chrome and mozilla it is working very well. but on IE8  not work. if I close EnableHistory false then it is working.. 

Conditions;

first click combobox. you will see, the data is coming. then click button and postback , add history property. After that click again combobox, the data not come.. 

<form id="form1" runat="server">
<div>
    <asp:ScriptManager runat="server" ID="ddd" EnableHistory="true" AsyncPostBackTimeout="30">
    </asp:ScriptManager>
 
    <telerik:RadAjaxPanel ID="pmnl" runat="server">
        <telerik:RadComboBox ID="rcbEquipmenList" runat="server" Width="300px" Height="150px"
            EmptyMessage="Malzeme Seçiniz" EnableLoadOnDemand="True" ShowMoreResultsBox="true"
            EnableVirtualScrolling="true" OnItemsRequested="rcbEquipmenList_ItemsRequested">
        </telerik:RadComboBox>
 
        <asp:Button id="dd" runat="server" onclick="dd_Click" ></asp:Button>
    </telerik:RadAjaxPanel>
</div>
</form>

private const int ItemsPerRequest = 20;
   protected void rcbEquipmenList_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
   {
       //Random r = new Random(1000);
       //string s = r.Next().ToString();
       //ddd.AddHistoryPoint(s, "dd");
       List<string> lst = new List<string>();
       lst.Add("111");
       lst.Add("2222");
       lst.Add("333");
       lst.Add("444");
       lst.Add("555");
       lst.Add("66");
       lst.Add("77");
       lst.Add("88");
       lst.Add("9999");
       lst.Add("100");
       lst.Add("111");
       lst.Add("122");
       lst.Add("1333"); lst.Add("2222");
       lst.Add("333");
       lst.Add("444");
       lst.Add("555");
       lst.Add("66");
       lst.Add("77");
       lst.Add("88");
       lst.Add("9999");
       lst.Add("100");
       lst.Add("111");
       lst.Add("122");
       lst.Add("1333"); lst.Add("2222");
       lst.Add("333");
       lst.Add("444");
       lst.Add("555");
       lst.Add("66");
       lst.Add("77");
       lst.Add("88");
       lst.Add("9999");
       lst.Add("100");
       lst.Add("111");
       lst.Add("122");
       lst.Add("1333");
 
       int itemOffset = e.NumberOfItems;
       int endOffset = Math.Min(itemOffset + ItemsPerRequest, lst.Count);
       e.EndOfItems = endOffset == lst.Count;
 
       for (int i = itemOffset; i < endOffset; i++)
       {
           rcbEquipmenList.Items.Add(new RadComboBoxItem(lst[i], lst[i]));
       }
   }
   protected void dd_Click(object sender, EventArgs e)
   {
       Random r = new Random(1000);
       string s = r.Next().ToString();
       ddd.AddHistoryPoint(s, "dd");
   }
Simon
Telerik team
 answered on 23 May 2011
3 answers
106 views
I have two questions regarding the grid.  One is a problem and the other is a "how to" or "can I".

(1) I have a grid which is used to page through search results (refer to attached graphic radgridquestion1.png).  The first page of the grid displays just fine, but when I click on the grids 'next' button, the page is displayed with nothing but blank space where the grid was on the first page (refer to attached graphic radgridquestion2.png).  The following code is the definition of the grid in the .aspx file.

<telerik:RadGrid ID="RadGrid1" runat="server" EnableEmbeddedSkins="true" Skin="Sitefinity" ShowHeader="false" AllowPaging="True" PageSize="5" Height="700px" >
    <PagerStyle Mode="NextPrevAndNumeric" />
    <MasterTableView TableLayout="Fixed">
        <ItemTemplate>
            <table>
                <tr>
                    <td>
                        <asp:Image ID="Image1" Style="float: left;" Width="150px" Height="100px" ImageUrl='<%# Eval("PicturePath")%>'
                            BorderWidth="1px" runat="server" AlternateText="Stock Image" />
                    </td>
                    <td>
                           
                    </td>
                    <td>
                        <div>
                            <ul>
                                <li>
                                    <%# Eval("ListingStreetAddress")%>
                                </li>
                                <li>
                                    <label>Beds:</label><%# Eval("Bedrooms")%>
                                </li>
                                <li>
                                    <label>Baths:</label><%# Eval("Bathrooms")%>
                                </li>
                                <li>
                                    <label>Price:</label><%# Eval("ListingPrice")%>
                                </li>
                            </ul>
                        </div>
                    </td>
                </tr>
            </table>
        </ItemTemplate>
    </MasterTableView>
    <ClientSettings AllowDragToGroup="false">
        <Scrolling AllowScroll="true" UseStaticHeaders="false" />
    </ClientSettings>
</telerik:RadGrid>

Obviously, I don't understand why the second page won't display.  Any ideas or assistance would be greatly appreciated!

(2) A "how to" question:  In the first attached graphic, you can see search criteria in the left-most column, the grid containing results in the middle column, and the right-most column is blank.  I will be putting a small Google map in this space and want it to only contain "push pins" for the properties displayed in the current page of the grid.  Is there a way I can do this?  How and in what grid event would I be able to put the code to add the "push pins" each time a new grid page is displayed?  In what event would I place the code to "clear the map" to ready it for the next n number pins?  Feel free to ask questions if I did not explain myself adequately.

Thanks in advance for your help.  I know the attached page still looks a little rough, but it's still a work in progress!

Thanks again!

Lynn
Daniel
Telerik team
 answered on 23 May 2011
2 answers
125 views
 Radfilter.rootgroup.expression.clear()   this work at server side.

is there any way to clear rootgroupexpression at client side by java script.

Thanks
Bharat Veer
bharat veer
Top achievements
Rank 1
 answered on 23 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?