Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
201 views
I have a RadGrid which has a label, a combobox and a check box. I fill up the combobox on ItemDatabound Event of the RadGrid. What i do is create a new row on CheckedChange event of the row's CheckBox. When the grid is loaded for the first time I am storing the datasource in a session variable. When the row's checkbox is checked I am manipulating the datatable stored in session variable to add the new row in the session's datatable . I then bind the datasource of the RadGrid with the new Session Variable. I get the required RadGrid with the new row but  I am losing the selected value of all combo boxes in which a value had been selected before the checkbox was checked . I know this is the standard behaviour and there is nothing wrong with it but what i need to know is a way I can retain all the previously selected values of the comboboxes of RadGrid after the databind.

Thanks in advance.
Eyup
Telerik team
 answered on 07 Aug 2012
3 answers
115 views
I am developing line charts. I have two chart series items. One of the chart series style is Line another one is Dashed line. I want  the legend appearance exactly like how the series item is appeared in the chart. (like ----------- and -  -  -  -  -  - )
Evgenia
Telerik team
 answered on 07 Aug 2012
3 answers
888 views
I have formatted the headers and column widths to align properly when using static headers, scrolling, filtering and column resizing set to true (grid lines = none). Upon initial load the grid does not have a horizontal scroll, however, upon widening a column the horizontal scroll appears (desired functionality). All is fine until I scroll all the way to the right. The headers and table columns are not aligned.

I noticed that before horizontal scroll appears on the grid the header has additional space for the vertical scroll, this additional space disappears when horizontal scroll appears. Is there a way to fix this? I have attached screenshots to help visualize my issue.
Pavlina
Telerik team
 answered on 07 Aug 2012
2 answers
147 views

Problem 1: My requirement is to show 4 spline area series in one chart, and whenever two chart overlap to other series should be transparent (ex. In attached image Investment chart is overlapping the Home chart, but due to transparency in Investment chart Home Chart is visible.
Problem 2: How to show the Rad circled Legends in the Chart (refer chart.jpg )

My code to create the Spline Area series is as below

 

ASPX Code is

<telerik:RadChart ID="RadChart1" runat="server"></telerik:RadChart>

 

And code is as below

   protected void BindChart()

        {

 

            RadChart1.Height = System.Web.UI.WebControls.Unit.Pixel(1000);

            RadChart1.Width = System.Web.UI.WebControls.Unit.Pixel(1000);

 

            ChartSeries series1 = new ChartSeries("Series 1");

            series1.Appearance.LineSeriesAppearance.Color = System.Drawing.Color.Pink;

            series1.Type = ChartSeriesType.SplineArea;

           

            foreach (GraphDetail data in DebtGraph)

            {

                ChartSeriesItem item = new ChartSeriesItem();

                item.XValue = data.Age;

                item.YValue = data.Dollar;

                item.Label.Appearance.Visible = false;

                series1.Items.Add(item);

            }

 

            RadChart1.Series.Add(series1);

 

            ChartSeries series2 = new ChartSeries("Series 2");

            series2.Appearance.LineSeriesAppearance.Color = System.Drawing.Color.Green;

            series2.Type = ChartSeriesType.SplineArea;

            foreach (GraphDetail data in HomeGraph)

            {

                ChartSeriesItem item = new ChartSeriesItem();

 

                item.XValue = data.Age;

                item.YValue = data.Dollar;

                item.Label.Appearance.Visible = false;

                series2.Items.Add(item);

            }

 

            RadChart1.Series.Add(series2);

 

            ChartSeries series3 = new ChartSeries("Series 3");

            series3.Appearance.LineSeriesAppearance.Color = System.Drawing.Color.Red;

            series3.Type = ChartSeriesType.SplineArea;

            foreach (GraphDetail data in InvestmentGraph)

            {

                ChartSeriesItem item = new ChartSeriesItem();

                item.XValue = data.Age;

                item.YValue = data.Dollar;

                item.Label.Appearance.Visible = false;

                series3.Items.Add(item);

            }

 

            RadChart1.Series.Add(series3);

          

        }

this code gives me the Out put attached in myimplementation.jpg

 

Petar Marchev
Telerik team
 answered on 07 Aug 2012
3 answers
115 views
Hi everyone,

i Just installed Sharepoint Acceleration Kit SAK ,
and i was looking at this documentation
http://www.telerik.com/help/aspnet-ajax/moss-installing_radeditor__radgrid_web_parts_on_sharepoint_2010.html
"Sharepoint 2010" .
Well done, installed and i was able to use the webParts in my Sharepoint!, ok! that´s great !

But now i tried to create a Web Part using RadControls, because the SAK says RadControls ASP.NET Ajax are include !
i Create a Web Part and added the reference to
C:\Windows\assembly\GAC_MSIL\Telerik.Web.UI\2012.1.215.35__121fae78165ba3d4\Telerik.Web.UI.dll
Then i added Telerik.Web.UI.dll from GAC to my ToolBox ! and he added

<%@ Register Assembly="Telerik.Web.UI, Version=2012.1.215.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"
    Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

Great!, than i added a simple numeric box
<telerik:RadNumericTextBox ID="tbxParcela" runat="server"  class="s40" ></telerik:RadNumericTextBox>

And i deployed the WebPart,! Well done!, its works, but in design mode DOES NOT ! I believe because i dont have the "Telerik.Web.Design.dll"
Why this DLL are not include ?
Why there is no documentation refering how to use the RadControls in SAK Package?
I believe the documentation about creating WebParts using SAK are missing.

Thank you very much

Tsvetoslav
Telerik team
 answered on 07 Aug 2012
1 answer
94 views
I have a template column on my RadGrid with just a textbox in it.  I want the user to be able to enter text into the box as normal without the grid being in edit mode.  By default, the textbox seems to be read only and won't allow input.  I can't find any settings to allow the user to type into it.

<telerik:GridTemplateColumn HeaderText="Position" ItemStyle-CssClass="position">
  <ItemTemplate>
     <asp:TextBox ID="txtPosition" runat="server" Width="40" CssClass="txt" MaxLength="5" />
   </ItemTemplate>
</telerik:GridTemplateColumn>
Vasil
Telerik team
 answered on 07 Aug 2012
6 answers
611 views

I am trying to have a combo box that stays fixed at at the bottom of the screen.
The drop down itself stays fixed when I put the combobox inside a div tag with a position:fixed, but the items of the drop down do not stay in a fixed position when I scoll the page.

I also tried to put the combobox inside a pinned RadDock, and I get the same effect. The drop down stays pinned, but the list items move when I scroll the page.
<telerik:RadDockZone ID="RadDockZone1" runat="server" Height="300px" Width="300px"
        <telerik:RadDock ID="RadDock1" runat="server"  
                    Width="300px" height="150px"  
                    Pinned="true" > 
        <ContentTemplate> 
            <telerik:RadComboBox ID="comboEmployees" runat="server"  
                Width="300"  
                Height="350" 
                AutoPostBack="True" 
                OnSelectedIndexChanged="comboEmployees_SelectedIndexChanged" 
                >  
            </telerik:RadComboBox> 
        </ContentTemplate> 
        </telerik:RadDock> 
    </telerik:RadDockZone> 

Is there some way to make the items stay fixed or pinned?

Thanks,

Kolbjørn


Plamen
Telerik team
 answered on 07 Aug 2012
3 answers
250 views

Hello,
This may have been answered many times, but after hours of googling I'm still in the dark.
I have a details table within a MasterRadGrid.MasterTableView - the details table databinds with the main grid ondetailtabledatabind and the detail table[s] display data just fine.

I need to read values from any or all of these detail tableviews, and in codebehind I have:

foreach (GridDataItem mRow in rGrd_recentAlbums.Items)  
    {  
    GridTableView licDet = (GridTableView)mRow.ChildItem.NestedTableViews[0];  
            foreach (GridDataItem dRow in licDet.Items)  
              { 
                ...code...
              }
    }

Now, what has me completely confused: I see the detailtableview databound/ the correct data when expanding any of the master grid rows. Debugging, looking at the GridTableView licDet, I see the expected name of it, I see the expected datakey values from both tableviews - yet, when I try to iterate the 
        foreach (GridDataItem dRow in licDet.Items)  
licDet has 0 items!?

Can someone please help me get past this?
Thanks,
knutb
suman
Top achievements
Rank 1
 answered on 07 Aug 2012
1 answer
72 views
Hi,
I have a Radgrid inside userControl.
I have a select column, and a "delete selected" link.
When user click on "delete selected" --> delete all items selected.

But I have a problem, the items seleted are null.. I tried use AjaxPanel but does not work
thi. is my ascx code

 <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
            <telerik:RadGrid runat="server" ID="MyGrid" AutoGenerateColumns="false" Skin="Vista"
                RegisterWithScriptManager="false"  AllowMultiRowSelection="True" >
                <MasterTableView DataKeyNames="Id" CommandItemDisplay="Top" EditMode="InPlace">
                    <Columns>
                     <telerik:GridClientSelectColumn CommandName="Select" UniqueName="Select" HeaderStyle-Width="30px"
                        Resizable="false"  >
                               
                            </telerik:GridClientSelectColumn>
                        <telerik:GridEditCommandColumn HeaderStyle-Width="25px" UniqueName="EditCommandColumn"
                            ButtonType="ImageButton" EditImageUrl="/UI/Images/grid_edit.png" Resizable="false">
                        </telerik:GridEditCommandColumn>
                        <telerik:GridButtonColumn UniqueName="btnDelete" ConfirmDialogType="RadWindow" ButtonType="ImageButton"
                            CommandName="Delete" ConfirmDialogHeight="100px" ConfirmDialogWidth="300px" HeaderStyle-Width="25px"
                            Resizable="false" />
                        <telerik:GridTemplateColumn DataField="Id" HeaderText="Id" UniqueName="Id" Visible="false" ConvertEmptyStringToNull="true">
                            <InsertItemTemplate>
                                <telerik:RadTextBox ID="RadTextBox1" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Id") %> '
                                    Width="150px" ReadOnly="true" Enabled="false" CssClass="labelGrid" />
                            </InsertItemTemplate>
                            <EditItemTemplate>
                                <telerik:RadTextBox ID="RadTextBox1" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Id") %> '
                                    Width="150px" CssClass="labelGrid" ReadOnly="true" />
                            </EditItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn UniqueName="Value" DataField="Value">
                            <EditItemTemplate>
                                <asp:TextBox ID="txtValue" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Value") %>'
                                    CssClass="textBoxInline"></asp:TextBox>
                                <br />
                                <asp:RequiredFieldValidator ID="rfvValue" runat="server" ErrorMessage="*" Display="Dynamic"
                                    ControlToValidate="txtValue" CssClass="validator"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="reValue" ControlToValidate="txtValue" runat="server"
                                    ValidationExpression="^[0-9a-zA-Z]{1,125}$" CssClass="validator" Display="Dynamic"
                                    SetFocusOnError="true"></asp:RegularExpressionValidator>
                                <asp:CustomValidator ID="cvValue" runat="server" SetFocusOnError="true" CssClass="validator"
                                    OnServerValidate="cvValue_ServerValidate"></asp:CustomValidator>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="lblValue" runat="server" Width="200px" CssClass="labelGrid" Text='<%# DataBinder.Eval(Container.DataItem, "Value") %>'></asp:Label>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                    </Columns>
                    <CommandItemTemplate>
                        <div class="quickAdd">
                            <asp:LinkButton ID="lnkqQuitInsert" runat="server" CommandName="InitInsert">
                                <asp:ImageButton ID="imgQuickAdd" runat="server" ImageUrl="/UI/Images/add.png" />
                                <asp:Label ID="lblQuickAdd" runat="server" /></asp:LinkButton>&nbsp;&nbsp;
                            <asp:LinkButton ID="lnkImport" runat="server" CommandName="Import">
                                <asp:ImageButton ID="imgImportFromtxt" runat="server" ImageUrl="/UI/Images/import_to_grid.png" />
                                <asp:Label ID="lblImportFromFile" runat="server" /></asp:LinkButton>&nbsp;&nbsp;
                            <asp:LinkButton ID="lnkDeleteSelected" runat="server" CommandName="DeleteSelected">
                                <asp:ImageButton ID="imgDeleteSelected" runat="server" ImageUrl="/UI/Images/delete_selected.png" />
                                <asp:Label ID="lblDeleteSelected" runat="server" /></asp:LinkButton>&nbsp;&nbsp;
                            <asp:LinkButton ID="lnkDeleteAllValues" runat="server" CommandName="DeleteAllValues">
                                <asp:ImageButton ID="imgDeleteAllValues" runat="server" ImageUrl="/UI/Images/delete_all.png" />
                                <asp:Label ID="lblDeleteAllValues" runat="server" /></asp:LinkButton>&nbsp;&nbsp;
                        </div>
                    </CommandItemTemplate>
                </MasterTableView>
                 <ClientSettings>
                        <Selecting AllowRowSelect="true" />
                        </ClientSettings>
            </telerik:RadGrid>
            </telerik:RadAjaxPanel>


 ascx.cs

  protected void MyGrid_ItemCommand(object source, GridCommandEventArgs e)
        {

   case "DeleteSelected":
                    List<int> listValuesId= new List<int>();
                    List<smListValues> listValues = (List<smListValues>)Session["Data"];


                    foreach (GridDataItem item in MyGrid.MasterTableView.GetSelectedItems())
                    {
// this generate an error --> values is Null
                        // Hashtable values = new Hashtable();
                        //item.ExtractValues(values);



                         
                      
                        string strTxt = item["Id"].Text;  --> tthis return &nbsp 



                        //if (values["Id"].ToString() == "&nbsp;" || string.IsNullOrEmpty(values["Id"].ToString()))
                        //{
                        //     LogConfig.SaveInFile(Level.Debug, "Item does not exist in db", null, "ListMask.ascx.cs", "ItemCommand");
                        //     string valueKey = values["Value"].ToString();
                        //     listValues.Remove(listValues.Find(x => x.Value ==valueKey));  
                        //}else
                        //{
                        //    listValuesId.Add(Convert.ToInt32(values["Id"].ToString()));


                        //    listValues.Remove(listValues.Find(x => x.Id == Convert.ToInt32(values["Id"].ToString())));   
                        //}


                     
                    }
                    new smListValues().DeleteValues(listValuesId, Convert.ToInt64(Session["ListId"]));
                    Session["Data"] = listValues;
                    MyGrid.Rebind();
                    break;
          }


What I do wrong??
Shinu
Top achievements
Rank 2
 answered on 07 Aug 2012
6 answers
324 views
I have a radcombobox and values are populated in the OnItemsRequested event.
In this event ,Iam setting item.text as 'text to be displayed' and item.value as the Id of the field,which I can get using Radcombobox1.SelectedValue.Split(new char[] { ':' })[1].

1)if the user types a value in the combo box,then how can I get the Id of that field in the Textchanged event?
2)If the user types  something and no match is found,how can I make the loading table invisible?

Thanks,
Soumya.
Soumya
Top achievements
Rank 1
 answered on 07 Aug 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?