Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
60 views
Im trying to figure something out here with my RadGrid, but cant seem to find it. Basically, I need to have a rad grid, where when the pages loads, I go off to the DB to grab 3 things, with the 3rd object being what populates the grid. This object will be a generic DataSet, because the return fields will always be different, depending on some passed in fields.

So the way I have it now, is on the Page_Load, it goes off to the database to get what I need and then stores the 3rd object in a Session variable. Then when the gridView's NeedDataSource event fires, I grab the variable from the Session.Key and then set the datasource to this dataset.

When I click on edit, it fires up the NeedDataSource event again and grabs it from the Session.Key and sets the DataSource again. The fields are then displayed to me, I edit them and hit update, then it again fires the NeedDataSource, and sets the DataSource and my changes to the grid are gone (where and how are these changes saved and stored?). How can I set it so I save these changes to the grids datasource and eventually save/update them to that object I have in the Session, which I can then use a Save button to send it all to the DB and save it.

Basically here is what I want to do. Go to the database and grab my dynamic dataset. When it comes back, bind this to the datagrid and use one of my other objects from the original call to make some fields editable, maxfield length, min field length, numeric only etc. Then when they click update, I want it to update the grid, but not have to make a trip to the database to save it row by row. I want to be able to make a bunch of changes to the grid and then save them all to the database at once by clicking a button.

I have tried setting the EditMode to batch, but its not recognized so it doesnt work. The only options I get are EditForms, InPlace, Popup.

Any help of any kind is appreciated. Examples would be best, but again anything is helpful.
Andrey
Telerik team
 answered on 01 Jul 2013
1 answer
57 views
I am trying to add radchart of stacked type to aspx page. The chart is bound with following data in code behind file as follows.

   ChartSeries cSeries = new ChartSeries();
            ChartSeries cSeries2 = new ChartSeries();
            cSeries.Type = ChartSeriesType.StackedBar;
            cSeries2.Type = ChartSeriesType.StackedBar;
            cSeries.Name = "Blocks Covered";
            cSeries2.Name = "Blocks not covered";

            Dictionary<string, int> dict = new Dictionary<string, int>();
            dict.Add("Common", 20);
            dict.Add("A1", 30);
            dict.Add("A2", 40);
            dict.Add("A3", 50);
            dict.Add("A4", 60);
            int j = 0;
            foreach (string key in dict.Keys)
            {
                j++;

                cSeries.AddItem(dict[key], dict[key].ToString());
                cSeries2.AddItem(dict[key], j.ToString());
                chtCodeCoverage.PlotArea.XAxis.Items.Add(new ChartAxisItem(key, Color.Black));
            }
            chtCodeCoverage.Series.Add(cSeries);
            chtCodeCoverage.Series.Add(cSeries2);

Required out: x-axis should have key values in dictionary.  Y axis values will be values in dictionary and loop counter values.

But x-axis lables are not displayed. please help me. Refer screen shot for more details.

Thanks,
Srikar.

Rosko
Telerik team
 answered on 01 Jul 2013
1 answer
40 views
I am building a hierarchy grid... with Some internal Data structure... having multiple data key fields...
the hierachy works perfectly .. but  a place holder for each data key are created.. and  if they are not added to the column then,
the class.tostring() is called and displayed...

How do make sure the properties/datakeys doesnt get displayed...

The attached PNG will show what i am talking about...

here are the aspx file and cs file needed to understand what i am saying...

DataAccess.cs file..
https://docs.google.com/file/d/0B8irPIpOgH_mNEZjcmhIQkNPQk0/edit?usp=sharing

TestGrid_new.aspx.cs file (this dynamically adds the datasource to the grid... this creates the hierarchy dynamically)
https://docs.google.com/file/d/0B8irPIpOgH_maVQ4T1hvNXU5UE0/edit?usp=sharing

TestGrid_New.aspx (all this has the definition of the Radgrid)
https://docs.google.com/file/d/0B8irPIpOgH_meV9Mc3lyUEprdXc/edit?usp=sharing


Andrey
Telerik team
 answered on 01 Jul 2013
3 answers
79 views
We need to customize these elements to the new theme created using Telerik Visual Style Builder which is not listed in the current list of Controls...

  1. Fieldset
  2. H1 H2 H3 and H4
  3. Window Title Bar Image etc.
(This is already in the VS Builder but cant change its skin according to the theme we designed)
Please help its very urgent .
Bozhidar
Telerik team
 answered on 01 Jul 2013
8 answers
268 views
Good morning, I have a problem with a multiple file upload. 1. Is it true that with multiple file selection there is no way to limit a user to say 10 files. 2. Which event should fire when a file is over the MaxFileSize. 3. Is there a way to limit an overall upload size? Ie can you set a max of 2Mbs so a user can only upload 4 x 500Kb files? Thanks in advance, Kevin
Shinu
Top achievements
Rank 2
 answered on 01 Jul 2013
1 answer
583 views

i insert a item to the radcombobox by code behind.

<telerik:RadComboBox runat="server" ID="RadComboBox_Project" EnableOverlay="true"
                      DataTextField="DisplayName"  DataValueField="ProjectID" Skin="Sunset"
                              EnableLoadOnDemand="True" DataSourceID="ObjectDataSource2"
                      OnSelectedIndexChanged="RadComboBox_Project_SelectedIndexChanged" AutoPostBack="True"
                              HighlightTemplatedItems="true" Label="" Width="100%" NoWrap="True">
                              <HeaderTemplate>
                                   <ul>
                                        <li class="col1">Project Number | Project Name</li>
                                        <%--<li class="col2"></li>--%>
                                   </ul>
                              </HeaderTemplate>
                              <ItemTemplate>
                                   <ul>
                                        <li class="col1"><%# Eval("ProjectNumber") + " | " + Eval("ProjectName")%></li>
                                        <%--<li class="col2"><%# Eval("ProjectName") %></li>--%>
                                   </ul>
                              </ItemTemplate>
<%--                              <Items>
                                            <telerik:RadComboBoxItem Text="Select a Project" Value="0" />
                                </Items>--%>
                         </telerik:RadComboBox>

Code Behind:

Protected Sub RadComboBox_Project_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadComboBox_Project.DataBound
    Dim combo As RadComboBox = DirectCast(sender, RadComboBox)
    If combo.Items.Count > 1 Then
        combo.Items.Insert(0, New RadComboBoxItem("Select a Project", String.Empty))
    End If
End Sub

but it display a empty row in the combobox, how to remove it ? thanks



Nencho
Telerik team
 answered on 01 Jul 2013
2 answers
57 views
Hi,

I am trying to add the the editor to a SharePoint 2010 web part in design mode.  When the RadEditor is displayed on the page you are unable to scroll the page in IE unless you double click on the scroll bar?  This is a very strange issue and I can't seem to find a fix.
my code to create the editor is:
if (this.WebPartManager.DisplayMode == WebPartManager.DesignDisplayMode)
{
    Telerik.Web.UI.RadEditor editor = new RadEditor();                   
    editor.Width = 250;
    editor.ToolbarMode = EditorToolbarMode.ShowOnFocus;
    editor.Content = this.BoxContent;
    editor.ToolsWidth = 250;
    editor.BackColor = myColor;
    Controls.Add(editor)
 
}


Any help with this issue would be appreciated.
Andrew
Top achievements
Rank 1
 answered on 01 Jul 2013
13 answers
1.0K+ views
Hi All,

How do I disable grid editing if I am adding a new record and how do I disable adding a new record if I am editing in the grid? only one function at a time until you click on Insert, Update, or cancle button.

Thank you in Advance,
Shehab
Princy
Top achievements
Rank 2
 answered on 01 Jul 2013
3 answers
140 views
Hi

How can I shift the drop down according to the cursor position in the autocomplete box input?

Regards
Shahi
Princy
Top achievements
Rank 2
 answered on 01 Jul 2013
1 answer
235 views
Hi Telerik,

This is not a telerik specific question still I believe I would get a valuable solution from here. I want to disable the browser back button in IE. I tried some samples found in net but it didnt helped.

Regards,
Shahi.
Shinu
Top achievements
Rank 2
 answered on 01 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?