Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
163 views

I had enabled checkbox feature in radlistbox,
i had checked selected item in Source Listbox, but the transfer button still disable.
i need to click either row in SourceListbox, and then the transfer button will be enable.

how can i simply checked the checkbox and then click transfer button ? thanks

     <table>
           <tr>
 
<td>
Unselect
<br />
<telerik:RadListBox runat="server" ID="RadListBox_unselect" Height="200px" Width="230px"
    AllowTransfer="True" TransferToID="RadListBox_select"
         AutoPostBack="True" CheckBoxes="True"
        style="top: 0px; left: 0px" DataSourceID="ODS_Unselect"
        DataTextField="employee_display_name" DataValueField="employee_id" OnClientTransferring="clientTransfering">
 
</telerik:RadListBox>
    <asp:ObjectDataSource ID="ODS_Unselect" runat="server"
        SelectMethod="GetEmployeeArrayByListByCourseID" TypeName="LRDB">
        <SelectParameters>
            <asp:SessionParameter DefaultValue="0" Name="id" SessionField="EmpList"
                Type="String" />
        <asp:QueryStringParameter Name="CID" QueryStringField="CourseID"
                Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
               </td>
<td></td>
<td>
Selected
<br />   
<telerik:RadListBox runat="server" ID="RadListBox_select" Height="200px"
        Width="200px" TransferToID="RadListBox_unselect"
         AutoPostBack="True" CheckBoxes="True"              
        style="top: 0px; left: 0px">   
</telerik:RadListBox>
    </td>
</tr>
</table>
Shinu
Top achievements
Rank 2
 answered on 25 Jun 2013
1 answer
83 views
Hi,
       I often have the error(Error Creating Control - RadGrid1Could not load file or assembly 'Telerik.Web.UI, Version=2013.1.220.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. The system cannot find the file specified.) .When I use the rad grid control,But the control is showing in the browser when i run the application.Please give me the solution.


Thanks,
Arun.
Viktor Tachev
Telerik team
 answered on 25 Jun 2013
4 answers
728 views
Hello sir/mam

  I have radnumeric textboxes with autopostback false on a page .
  i want to assign total of two textboxes to third textbox , but the textchange event does not fires.

  it fires when autopostback of textbox is set to true and the page gets refresh each time i type in textbox and it also take some time because pageload gets call

 please help me to solve this problem.
  
  
Kishor
Top achievements
Rank 2
 answered on 25 Jun 2013
2 answers
59 views
Hi,
A time ago i have updated my project with new Q1 2013, came from Q2 2012. After this version i have a strange bug with all controls. I have a big collection with radcontrols in one page (grid, toolbar, combo, treeview, tabstrip, windows etc), after some update/add/delete of my data in several radwindows, there will a huge error occur in your libraries but i cannot debug it. 

What i will get after this error: 
- All buttons in toolbar will lost their visibility state
- RadMenu will be hidden
- All columns in RadGrid will lost their widths
- Some combos will lost their values (which were bound in page load)

When this is occured, forcing a simple postback will occur a 500 server error without any message....
Have tried to turn off the RadCompression and RadAjax but with no result.

It seems RadScriptManager.registerclientscript will causes this, replacing this with normal clientscript have fixed my problem for a big part. But when i upload a image with async upload module will cause this again.

Happens with Q2 2013 as well, i'm working in Visual Studio 2012. 

Do you know this problem?
Plamen
Telerik team
 answered on 25 Jun 2013
4 answers
289 views
I am using RadGrid with excel spreadsheet as the datasource, the data is displaying correctly in my grid.
But, while Adding new record/inserting data to excel spreadheet. I am not sure how to do that.
I have seen few examples but they are all showing exporting data to excel. But my requirement is just to add data to speadsheet from RadGrid

I am pulling data from the spreadsheet using the following code
   

 

Protected Sub uxRGMembersCleanup_NeedDataSource(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles uxRGMembersCleanup.NeedDataSource
      Dim cnstr As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Server.MapPath("~/App_Data/Test_Members.xlsx") & ";" & "Extended Properties=Excel 12.0"
      Dim oledbConn As New OleDbConnection(cnstr)
      Dim strSQL As String = "SELECT * FROM [Test_Members$]"
      Dim cmd As New OleDbCommand(strSQL, oledbConn)
      Dim ds As New DataSet()
      Dim da As New OleDbDataAdapter(cmd)
      da.Fill(ds)
      uxRGMembersCleanup.DataSource = ds
      'uxRGMembersCleanup.DataBind()
  End Sub

 

 

Daniel
Telerik team
 answered on 25 Jun 2013
1 answer
89 views
I want to display a chart that binds to a sqldatasource.
The select query of sqldatasource returns records where the first column is of type datetime (records of samples acquired every 5 minutes) and the remaning columns are of type  float (select query with a where clause that let me retrive data for a selected day).
I want to show the records returned by sqldatasource in a chart of type spline with two y axis where on x axis I have datetime in a custom format  showing only hours for the day selected (majortick xaxis set every hour).
Below is my code:

 
<telerik:RadChart ID="RadChart2" runat="server" Width="970px" AutoLayout="True" Skin="Vista" Height="500px" DefaultType="Spline" DataSourceID="SqlDataSource1" OnDataBinding="RadChart2_DataBinding" OnDataBound="RadChart2_DataBound">
      <Appearance Corners="Round, Round, Round, Round, 7">
          <FillStyle FillType="ComplexGradient">
              <FillSettings>
                  <ComplexGradient>
                      <telerik:GradientElement Color="243, 253, 255" />
                      <telerik:GradientElement Color="White" Position="0.5" />
                      <telerik:GradientElement Color="243, 253, 255" Position="1" />
                  </ComplexGradient>
              </FillSettings>
          </FillStyle>
          <Border Color="212, 221, 222" />
      </Appearance>
      <Series>
          <telerik:ChartSeries Name="Pac"  DefaultLabelValue="#Y{F1}"  Type="Spline"  DataYColumn="PAC" Appearance-ShowLabels="false">
              <Appearance>
                  <FillStyle MainColor="186, 207, 141" SecondColor="146, 176, 83">
                      <FillSettings GradientMode="Vertical">
                          <ComplexGradient>
                              <telerik:GradientElement Color="213, 247, 255" />
                              <telerik:GradientElement Color="193, 239, 252" Position="0.5" />
                              <telerik:GradientElement Color="157, 217, 238" Position="1" />
                          </ComplexGradient>
                      </FillSettings>
                  </FillStyle>
                  <TextAppearance TextProperties-Color="89, 89, 89">
                  </TextAppearance>
                  <Border Color="" />
              </Appearance>
          </telerik:ChartSeries>
          <telerik:ChartSeries Name="Pdc" Type="Spline"  DataYColumn="PDC" Appearance-ShowLabels="false">
              <Appearance>
                  <FillStyle MainColor="235, 140, 104" SecondColor="214, 110, 90">
                      <FillSettings GradientMode="Vertical">
                          <ComplexGradient>
                              <telerik:GradientElement Color="218, 254, 122" />
                              <telerik:GradientElement Color="198, 244, 80" Position="0.5" />
                              <telerik:GradientElement Color="153, 205, 46" Position="1" />
                          </ComplexGradient>
                      </FillSettings>
                  </FillStyle>
                  <TextAppearance TextProperties-Color="89, 89, 89">
                  </TextAppearance>
                  <Border Color="" />
              </Appearance>
          </telerik:ChartSeries>
 
          <telerik:ChartSeries DataYColumn="D_Mtrk"   Name="D_Mtrk" Type="Spline" YAxisType="Secondary" Appearance-ShowLabels="false">
              <Appearance>
                  <FillStyle MainColor="129, 192, 225" SecondColor="79, 129, 189">
                      <FillSettings GradientMode="Vertical">
                          <ComplexGradient>
                              <telerik:GradientElement Color="136, 221, 246" />
                              <telerik:GradientElement Color="97, 203, 234" Position="0.5" />
                              <telerik:GradientElement Color="59, 161, 197" Position="1" />
                          </ComplexGradient>
                      </FillSettings>
                  </FillStyle>
                  <TextAppearance TextProperties-Color="89, 89, 89">
                  </TextAppearance>
                  <Border Color="" />
              </Appearance>
          </telerik:ChartSeries>
 
      </Series>
      <Legend  Appearance-ItemAppearance-Position-AlignedPosition="BottomRight">
          <Appearance Dimensions-Margins="1px, 1%, 10%, 1px">
               
              <ItemTextAppearance TextProperties-Color="86, 88, 89">
              </ItemTextAppearance>
              <ItemMarkerAppearance Figure="Rectangle">
              </ItemMarkerAppearance>
              <FillStyle MainColor="">
              </FillStyle>
              <Border Color="" />
          </Appearance>
          <TextBlock>
              <Appearance  TextProperties-Color="86, 88, 89">
              </Appearance>
          </TextBlock>
      </Legend>
      <PlotArea>
            <DataTable Visible="true"  >
                 
              <Appearance    Dimensions-AutoSize="true"  Position-AlignedPosition="BottomRight" RenderType="AutoSize" ></Appearance>
          </DataTable>
          <XAxis >
              <Appearance Color="134, 134, 134" MajorTick-Color="134, 134, 134">
                  <MajorGridLines Color="196, 196, 196" Width="0" />
                  <TextAppearance TextProperties-Color="89, 89, 89">
                  </TextAppearance>
              </Appearance>
              <AxisLabel   Appearance-Visible="true">
                  <Appearance Visible="True" Dimensions-Paddings="1px, 1px, 10%, 1px"></Appearance>
 
                  <TextBlock Text="Time">
                      <Appearance TextProperties-Color="51, 51, 51">
                      </Appearance>
                  </TextBlock>
              </AxisLabel>
          </XAxis>
          <YAxis IsZeroBased="false" >
              <Appearance Color="134, 134, 134" MajorTick-Color="196, 196, 196" MinorTick-Color="196, 196, 196">
                  <MajorGridLines Color="196, 196, 196" />
                  <MinorGridLines Color="196, 196, 196" Width="0" />
                  <TextAppearance TextProperties-Color="89, 89, 89">
                  </TextAppearance>
              </Appearance>
              <AxisLabel Appearance-Visible="true" >
                  <Appearance Visible="True"></Appearance>
 
                  <TextBlock Text="Pac & Pdc [kW]"  >
                      <Appearance TextProperties-Color="220, 158, 119">
                      </Appearance>
                  </TextBlock>
              </AxisLabel>
          </YAxis>
          <YAxis2>
                <AxisLabel Appearance-Visible="true" >
                  <Appearance Visible="True"></Appearance>
 
                  <TextBlock Text="D_Mtrk [W/m^2]"  >
                      <Appearance TextProperties-Color="220, 158, 119">
                      </Appearance>
                  </TextBlock>
              </AxisLabel>
          </YAxis2>
          <Appearance Dimensions-Margins="19%, 90px, 12%, 9%">
              <FillStyle MainColor="Transparent" SecondColor="Transparent">
              </FillStyle>
              <Border Color="WhiteSmoke" />
          </Appearance>
      </PlotArea>
      <ChartTitle>
          <Appearance Dimensions-Margins="3%, 1px, 1px, 6%">
              <FillStyle MainColor="">
              </FillStyle>
          </Appearance>
          <TextBlock Text="">
              <Appearance TextProperties-Color="86, 88, 89" TextProperties-Font="Verdana, 22px">
              </Appearance>
          </TextBlock>
      </ChartTitle>
  </telerik:RadChart>
With the code above I obtain a chart as in the attached file, it does not show hour on x axis.

If I use DataXColumn="date_time" (first column of my sqldatasource query of type datetime) I obtain the following error:
"The type of column with name  date_time is not numeric" I tried:
if (!IsPostBack)
            {
 
                // select a date for which I want to show data
                DateTime ds = RadDatePickerStart.SelectedDate.Value;
                
                RadChart2.PlotArea.XAxis.AutoScale = false;
                RadChart2.PlotArea.XAxis.IsZeroBased = false;
                RadChart2.PlotArea.XAxis.Appearance.ValueFormat = Telerik.Charting.Styles.ChartValueFormat.ShortTime;
                RadChart2.PlotArea.XAxis.Appearance.MinorTick.Visible = false;
                   
                RadChart2.PlotArea.XAxis.Appearance.CustomFormat = "HH";
                RadChart2.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = -90;
                RadChart2.PlotArea.XAxis.AddRange(RadDatePickerStart.SelectedDate.Value.ToOADate(), RadDatePickerStart.SelectedDate.Value.AddHours(24).ToOADate(), 0.004);
}
but this does not still work. What's wrong? Best regards.
Rosko
Telerik team
 answered on 25 Jun 2013
1 answer
66 views
Hello,

I want to add a column that works like a GridEditCommandColumn but using a GridButtonColumn. This works but with one problem. The editor opens like in insert mode, but it should open below the current row where the user clicked the command.
Here is my approach:

In the GriItemCommand event handler, I check if my command was clicked and save the internal id (of the database record) of the row:
private void GridItemCommand(object sender, GridCommandEventArgs e)
      {
          if (e.CommandName == "MyCommand")
         {
            this.mycommand = true;
            this.currentSelection = int.Parse(((GridDataItem)(e.Item)).EditFormItem.ParentItem[Grid.IdColumnUniqueName].Text);
            this.parentItem = ((GridDataItem)(e.Item)).EditFormItem.ParentItem;
         }
      }

In the ItemDataBound event, I initialize the control which should be displayed (it gets the id of the row I saved to this.currentSelection.
In OnPreRender I call this code to display the editor:

Grid.MasterTableView.IsItemInserted = true;
Grid.Rebind();

While the editor is opened with the correct object, it is opened like insert mode (at top) and not below the clicked row. How can I tell the GridItem to open below the correct row?

Thanks!

Edit: I'm using GridEditFormType.Template as EditFormType
And I have already a GridEditCommandColumn in my grid and since you can only have one, I have to use a different apporach like above.
Shinu
Top achievements
Rank 2
 answered on 25 Jun 2013
11 answers
412 views
hi guys
i am trying the editor recently, it is great ! BUT UNFORTUNATELY , you do not give the user control over the text flow direction (RTL & LTR) by placing control buttons in the tool bar !
if i import my text from word , it is perfectly placed in the editor contenet
i can even view html and type <p dir="rtl" /p> anywhere i need to change direction and the editor control response to that gracefully
so , if you can add that visual control or tell me if there is  way to do it myself

thanks
TJ
F187336
Top achievements
Rank 1
 answered on 25 Jun 2013
1 answer
169 views
I'm using a RadTooltipManager with AutoTooltipify set on a zone using ToolTipZoneID.  Within that zone, I'm changing one some of the tooltipped elements' titles in Javascript.  I'm not using UpdatePanels for this and am sticking with straight jQuery.  Since the TooltipManager removes the title of the element when it "tooltipifies" it, and I'm now changing the title, it adds the title attribute back onto the element and I end up with two tooltips.  The RadTooltip shows the old title, and the browser pops up the new one.  Is there a way to signal the TooltipManager to update itself and reset the tooltips to current values (and remove the new title attribute as it did on initial load)?  Any guidance would be appreciated.

--
Ken
Marin Bratanov
Telerik team
 answered on 25 Jun 2013
5 answers
957 views
Hello!

I'm having problems with accessing a radgrids columns manually added from source code, I have loads of columns, and I don't want to repeat myself, adding the Width and change the headertext, according to my algorithm manually on each column.

Therefore I've been trying to find a way to set them automatically in the codebehind, however I am having problems accessing all the columns and settings. 

The columns is as said not generated automatically.

Any idea?

Before When I have had the columns auto generated I have easily achieved this by using the Event ColumnCreated

protected void radGrid_ColumnCreated(object sender, GridColumnCreatedEventArgse)
{
                e.Column.HeaderStyle.Width = 200;
                e.Column.ItemStyle.Width = 200;
                e.Column.HeaderText = "test";
               e.Column.UniqueName = "test2"
}

Now I want to do the same but with manually added columns? (The ColumnCreated event is only triggered when the columns are auto generated, sadly =()

So something like this, by what I assume listening to the ItemDataBound event?

protected void radGrid_ItemDataBound(object sender, GridItemEventArgs e)
{
      //Set column Width and Height and also the columns Header text and Unique name.
 }



Appreciate any help :) Hope I made it clear enough to understand :) 

Thanks in advance! ( Couldnt find any threads similair that accessed the HeaderStyle nor the UniqueName properties of a column)
Nicklas
Top achievements
Rank 1
 answered on 25 Jun 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?