Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
85 views
Hi

Currently Telerik grid supports Filtering based on conditions(Equal,not equal etc).
If i have 2 columns in a grid and if i apply conditions on both the columns.
The result condition would be like  ( Column 1 condition ) AND (Column 2 condition).

We have a requirement where the user can specify multiple conditions on Columns and it could be either And, OR or combination on both.

IS there a way we can achieve this.Appreciate your help..


Regards
Vikram
Pavlina
Telerik team
 answered on 27 Jul 2009
1 answer
189 views
I am using a RadComboBox to display the list that is fetched using web service based on whatever text has been entered.

I want to put a validation on the text that it should allow only letters, numbers, spaces, hyphen or apostrophe.

The regular expression I am using is

var regex = new RegExp("[^a-zA-Z0-9\s`,-]+");

But the problem is that when I enter apostrophe and read the text of the combo box using get_text(), I get %60 instead of ` (hexadecimal representation of apostrophe).

Why is this happening? Is there any other function that I can use to get the exact text (in ASCII characters) that has been entered.
Abhay Jain
Top achievements
Rank 1
 answered on 27 Jul 2009
3 answers
151 views
I'm having a strange problem with the z-indexes on either the tooltip or the raddock. something is causing the dock to be on top of the tooltip instead of the opposite.

Can anyone clarify the hierarchy of how z-indexes are set for the tooltips? Does the script (tooltip.js?) override the skin, or the style? I would think that setting the style="z-index: 10000" at the tooltip level would override everything, but that doesnt seem to be the case.

Thanks in advance.

Svetlina Anati
Telerik team
 answered on 27 Jul 2009
1 answer
133 views
Hello.
        I am  using a RadToolTipManager for displaying the full size image of thumb nail image in my form.It is not working when I am loading the image from the database using a binary image control.But it is working perfectly when I am loading image from a folder.
The web service  code I have used  is given below
 public string GetFullSizeImage(object context)
    {
        cApplicationSettings oAppSettings = new cApplicationSettings();  
        Telerik.Web.UI.RadBinaryImage img = new RadBinaryImage();   
        img.DataValue = (byte[])oAppSettings.GetDefaultPhoto(1).Rows[0][0];//This function will return the image from my table

        StringWriter sw = new StringWriter();
        HtmlTextWriter writer = new HtmlTextWriter(sw);     
        img.RenderControl(writer);
        writer.Flush();
        return sw.ToString();                 
    }
When I replace the DataValue field of the binary image with ImageUrl as below it is working without any problem.
  img.ImageUrl = "~/images/noimage.png";
Svetlina Anati
Telerik team
 answered on 27 Jul 2009
1 answer
88 views
hi telerik

when i am working on telerik rad controls in my project,
and after try to change some thing like datasource configuration or radgrid columns ,..  i get this error :

http://i29.tinypic.com/2ztdb4l.jpg

my changes will not be applied , but if i reload my page every things is ok.

do u have ideas?

tnx
Sebastian
Telerik team
 answered on 27 Jul 2009
1 answer
113 views
Hello using the same graph template, the YAxis AxisLabel seems to be displayed in a different places on a bar graph.
Please look at the image, to see what I mean.
http://i839.photobucket.com/albums/zz316/dev2009_2009/y_axis_align_problem.jpg

As you can see from the code Position-Auto is set to false.

<

 

telerik:RadChart ID="rctGraph" runat="server" DefaultType="Bar" Width="500px" Height="300px">

 

 

<PlotArea>

 

 

<EmptySeriesMessage Visible="True" TextBlock-Text="No Information Found!" Appearance-FillStyle-MainColor="ControlLight">

 

 

<Appearance Visible="True">

 

 

</Appearance>

 

 

</EmptySeriesMessage>

 

 

<XAxis>

 

 

<AxisLabel>

 

 

<Appearance Position-X="225" Position-Y="275" Position-Auto="false" />

 

 

<TextBlock>

 

 

</TextBlock>

 

 

</AxisLabel>

 

 

</XAxis>

 

 

<YAxis>

 

 

<AxisLabel>

 

 

<Appearance Position-X="-10" Position-Y="200" Position-Auto="false" />

 

 

<TextBlock>

 

 

</TextBlock>

 

 

</AxisLabel>

 

 

</YAxis>

 

 

<Appearance Dimensions-Margins="30%, 10px, 60px, 80px">

 

 

</Appearance>

 

 

</PlotArea>

 

 

<ChartTitle>

 

 

<Appearance Dimensions-Margins="4%, 10px, 14px, 6%">

 

 

</Appearance>

 

 

<TextBlock>

 

 

</TextBlock>

 

 

</ChartTitle>

 

 

<Legend>

 

 

<Appearance

 

 

Dimensions-Margins="5px, 5px, 12%, 1px">

 

 

</Appearance>

 

 

<TextBlock>

 

 

<Appearance Position-AlignedPosition="Top">

 

 

</Appearance>

 

 

</TextBlock>

 

 

</Legend>

 

</

 

telerik:RadChart>

 




Ves
Telerik team
 answered on 27 Jul 2009
1 answer
173 views
I have a linkbutton in which I need to add a radconfirm to it.  The behavior of the LinkButton is the postback is triggered and the page is refreshed and adding a return false with customizing the radconfirm resolves this and works great.

The issue I am having is if you need to customize the LinkButton with CSS such as having a link button with the tags <b> used.  (My real example uses more css to create a css compliant button) this causes an issue with RadConfirm.

I followed the example from the link attachment and just added the tag "<b>"
http://www.telerik.com/community/forums/aspnet-ajax/window/radconfirm-closes-immediately-after-popup.aspx

asp:LinkButton ID="linkBtn" runat="Server" OnClientClick="return radconfirm('Are you sure?', event, 400, 200,'','Custom title');" Text="Delete Item" OnClick="linkBtn_Click"><b>This does not</b></asp:LinkButton>

Taking the attachment and just adding the tags <b> in the example causes the RadConfirm to not work.  The issue is the caller object being sent to the radconfirm is not the LinkButton "<A>" tag but the "<b>" tag so this results in no post back via the href call.

How can this be fixed or what's a work around with the javascript radconfirm function?
Georgi Tunev
Telerik team
 answered on 27 Jul 2009
1 answer
191 views
Hi
 I used the DataList. herewith i used the pageindex using panel container... It is working fine.. Herewith i used the dynamic controls (link button) for paging. I dont know how can i bind the Ajax for this dynamic control. Herewith i have attached the sample paging coding here...



        private void bindDataWithPaging(DataList bindControl, DataTable propertyDataTable) //you can pass either DatList or Repeater to this function
        {
            if (propertyDataTable.Rows.Count > 0) // if the datset contains data
            {
                DataView dv = propertyDataTable.DefaultView;

                PagedDataSource dsP = new PagedDataSource();
                dsP.AllowPaging = true;
                dsP.DataSource = dv;
                dsP.CurrentPageIndex = CurrentPageIndex;
                dsP.PageSize = PageSize;

                //Binding data to the controls
                if (bindControl is DataList)
                {
                    ((DataList)bindControl).DataSource = dsP;
                    ((DataList)bindControl).DataBind();
                }

                //saving the total page count in Viewstate for later use
                PageCount = dsP.PageCount;

                //create the linkbuttons for pagination
                BuildPagination();
            }
        }

        private int CurrentPageIndex //to store the current page index
        {
            get { return ViewState["CurrentPageIndex"] == null ? 0 : int.Parse(ViewState["CurrentPageIndex"].ToString()); }
            set { ViewState["CurrentPageIndex"] = value; }
        }
        private int PageCount  //total number of pages needed to display the data
        {
            get { return ViewState["PageCount"] == null ? 0 : int.Parse(ViewState["PageCount"].ToString()); }
            set { ViewState["PageCount"] = value; }
        }

        private LinkButton createButton(string title, int index)
        {
            LinkButton lnk = new LinkButton();
            lnk.ID = index.ToString();
            lnk.Text = title;
            lnk.CommandArgument = index.ToString();
            lnk.Click += new EventHandler(lnkPager_Click);
            return lnk;
        }

        //Top Create Button
        private LinkButton topcreateButton(string title, int index)
        {
            LinkButton toplnk = new LinkButton();
            toplnk.ID = "toplink"+index.ToString();
            toplnk.Text = title;
            toplnk.CommandArgument = index.ToString();
            toplnk.Click += new EventHandler(toplnkPager_Click);
            return toplnk;
        }


        //create the linkbuttons for pagination
        protected void BuildPagination()
        {
            pnlPager.Controls.Clear(); //
            pnlTopPager.Controls.Clear();

            if (PageCount <= 1) return; // at least two pages should be there to show the pagination

            //finding the first linkbutton to be shown in the current display
            int start = CurrentPageIndex - (CurrentPageIndex % ButtonsCount);

            //finding the last linkbutton to be shown in the current display
            int end = CurrentPageIndex + (ButtonsCount - (CurrentPageIndex % ButtonsCount));

            //if the start button is more than the number of buttons. If the start button is 11 we have to show the <<First link
            if (start > ButtonsCount - 1)
            {
                pnlPager.Controls.Add(createButton(propertyDetailData.FirstPageText, 0));
                pnlPager.Controls.Add(createButton("..", start - 1));

                //Top View
                pnlTopPager.Controls.Add(topcreateButton(propertyDetailData.FirstPageText, 0));
                pnlTopPager.Controls.Add(topcreateButton("..", start - 1));
            }

            int i = 0, j = 0;

            for (i = start; i < end; i++)
            {
                LinkButton lnk;
                if (i < PageCount)
                {
                    if (i == CurrentPageIndex) //if its the current page
                    {
                        Label lbl = new Label();
                        Label lbltop = new Label();
                        //  lbl.Text = (i + 1).ToString();

                        if (i == 0)
                        {
                            lbl.Text = (i + 1).ToString() + "-" + (((i + 1) * PageSize));
                            lbltop.Text = (i + 1).ToString() + "-" + (((i + 1) * PageSize));
                        }
                        else
                        {
                            lbl.Text = (((i) * (PageSize)) + 1 + "-" + (((i + 1) * PageSize)));                            
                            lbltop.Text = (((i) * (PageSize)) + 1 + "-" + (((i + 1) * PageSize)));
                        }

                        pnlPager.Controls.Add(lbl);
                        pnlTopPager.Controls.Add(lbltop);
                    }
                    else
                    {
                        if (i == 0)
                        {
                            pnlPager.Controls.Add(createButton((i + 1).ToString() + "-" + (((i + 1) * PageSize)), i));                            
                            pnlTopPager.Controls.Add(topcreateButton((i + 1).ToString() + "-" + (((i + 1) * PageSize)), i));
                        }
                        else
                        {
                            pnlPager.Controls.Add(createButton((i) * (PageSize) + 1 + "-" + (((i + 1) * PageSize)), i));
                            pnlTopPager.Controls.Add(topcreateButton((i) * (PageSize) + 1 + "-" + (((i + 1) * PageSize)), i));
                        }
                    }
                }
                j++;
            }

            //If the total number of pages are greaer than the end page we have to show Last>> link
            if (PageCount > end)
            {
                pnlPager.Controls.Add(createButton("..", i));
                pnlPager.Controls.Add(createButton("&gt;&gt;", PageCount - 1));

                pnlTopPager.Controls.Add(topcreateButton("..", i));
                pnlTopPager.Controls.Add(topcreateButton("&gt;&gt;", PageCount - 1));
            }


        }


        // DataList Page Size Changed

        protected void cmbDataListPageSizeChange_OnSelectedIndexChanged(object sender, EventArgs e)
        {
            
            PageSize = Convert.ToInt32(cmbDataListPageSizeChange.SelectedValue);
            DataTable propertyDataTable = (DataTable)JSSessionHandler.GetSessionValue("propertyData");
            bindDataWithPaging(imageAreaLanding, propertyDataTable);
            cmbTopDataListPageSizeChange.SelectedValue = cmbDataListPageSizeChange.SelectedValue;
        }

        protected void cmbTopDataListPageSizeChange_OnSelectedIndexChanged(object sender, EventArgs e)
        {

            PageSize = Convert.ToInt32(cmbTopDataListPageSizeChange.SelectedValue);
            DataTable propertyDataTable = (DataTable)JSSessionHandler.GetSessionValue("propertyData");
            cmbDataListPageSizeChange.SelectedValue = cmbTopDataListPageSizeChange.SelectedValue;
            bindDataWithPaging(imageAreaLanding, propertyDataTable);
        }
 

<JetSoft:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
            <JetSoft:AjaxSetting AjaxControlID="cmbPropertySearchDestination">
                <UpdatedControls>
                    <JetSoft:AjaxUpdatedControl ControlID="cmbPropertySearchArea" LoadingPanelID="loadingPanelDetails" />
                </UpdatedControls>
            </JetSoft:AjaxSetting>
        </AjaxSettings>
        
         <AjaxSettings>
            <JetSoft:AjaxSetting AjaxControlID="cmbPropertySearchArea">
                <UpdatedControls>
                    <JetSoft:AjaxUpdatedControl ControlID="cmbPropertySearchLocation" LoadingPanelID="loadingPanelDetails" />
                </UpdatedControls>
            </JetSoft:AjaxSetting>
        </AjaxSettings>
        
          <AjaxSettings>
            <JetSoft:AjaxSetting AjaxControlID="cmbDataListPageSizeChange">
                <UpdatedControls>
                    <JetSoft:AjaxUpdatedControl ControlID="imageAreaLanding" LoadingPanelID="loadingPanelDetails" />
                </UpdatedControls>
            </JetSoft:AjaxSetting>
            
             <JetSoft:AjaxSetting AjaxControlID="cmbDataListPageSizeChange">
                <UpdatedControls>
                    <JetSoft:AjaxUpdatedControl ControlID="cmbTopDataListPageSizeChange" LoadingPanelID="loadingPanelDetails" />
                </UpdatedControls>
            </JetSoft:AjaxSetting>
        </AjaxSettings>
        
          <AjaxSettings>
            <JetSoft:AjaxSetting AjaxControlID="cmbTopDataListPageSizeChange">
                <UpdatedControls>
                    <JetSoft:AjaxUpdatedControl ControlID="imageAreaLanding" LoadingPanelID="loadingPanelDetails" />
                </UpdatedControls>
            </JetSoft:AjaxSetting>
             <JetSoft:AjaxSetting AjaxControlID="cmbTopDataListPageSizeChange">
                <UpdatedControls>
                    <JetSoft:AjaxUpdatedControl ControlID="cmbDataListPageSizeChange" LoadingPanelID="loadingPanelDetails" />
                </UpdatedControls>
            </JetSoft:AjaxSetting>            
        </AjaxSettings>
        
         <AjaxSettings>
            <JetSoft:AjaxSetting AjaxControlID="cmbPropertySearchArea">
                <UpdatedControls>
                    <JetSoft:AjaxUpdatedControl ControlID="cmbPropertySearchLocation" LoadingPanelID="loadingPanelDetails" />
                </UpdatedControls>
            </JetSoft:AjaxSetting>
        </AjaxSettings>
        
          <AjaxSettings>
            <JetSoft:AjaxSetting AjaxControlID="pnlTopPager">
                <UpdatedControls>
                    <JetSoft:AjaxUpdatedControl ControlID="imageAreaLanding" LoadingPanelID="loadingPanelDetails" />
                </UpdatedControls>
            </JetSoft:AjaxSetting>
        </AjaxSettings>
        
        <AjaxSettings>
            <JetSoft:AjaxSetting AjaxControlID="pnlPager">
                <UpdatedControls>
                    <JetSoft:AjaxUpdatedControl ControlID="imageAreaLanding" LoadingPanelID="loadingPanelDetails" />
                </UpdatedControls>
            </JetSoft:AjaxSetting>
        </AjaxSettings>
        
</JetSoft:RadAjaxManager>


Let me know how can i solved this problem

Regards
G. Manikandan




Pavlina
Telerik team
 answered on 27 Jul 2009
3 answers
222 views
After following settings listed here : http://www.telerik.com/help/aspnet-ajax/radcompression.html , only ScriptResource.axd files are being compressed by RadCompression .
Please let me know if there is something missing. Thanks. Regards.
Sebastian
Telerik team
 answered on 27 Jul 2009
1 answer
90 views

Hi Guys,

Wonderful controls but, what I have to do if i want delete only image content from my record ?

Any ideas?

Sebastian
Telerik team
 answered on 27 Jul 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?