Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
196 views
Hello!

I get the date from get_start in a javascript function, but I get English format there? I have set Culture to Sweden.
            function ViewSubjectIfNotClickable(sender, eventArgs) {  
                var currentlySelectedAppoitment = eventArgs.get_appointment();  
                var AllowEdit = currentlySelectedAppoitment.get_allowEdit();  
                if (AllowEdit == false) {  
                    // alert(currentlySelectedAppoitment.get_subject());  
                    // alert(currentlySelectedAppoitment.get_start());  
                    var myData = currentlySelectedAppoitment.get_start() + "<br><br>" + currentlySelectedAppoitment.get_subject();  
                    customFunctionCreateWindow(false, 300, 150, 300, 150, myData);  
                }  
            } 

Can I get the date format in Swedish like I get it in the code behind?

/Thanks
T. Tsonev
Telerik team
 answered on 18 May 2009
1 answer
143 views
Hello all,
I have written a short web application with a RadGrid bind to sqlDataSource. The select command of the sqldatasource is generated dynamically as a response to a button click event and than the RadGrid is refreshed. There is another button to perform CSV export of the RadGrid. But whenever I click on it, I see that something is doing, but no dialog box to save the csv file appears. I can see that the IE8 do something, unfortunately I cannot read the bottom status bar of IE8

The exporting code is very simply:

 

    protected void ButtonCsvExport_Click(object sender, EventArgs e)

 

    {

        RadGridCommandList.MasterTableView.ExportToCSV();

    }

The RadGrid is populated. Multirow selection is turned on and others functions like "delete selected" or "update selected" work fine, the both are also triggered by buttons.

Please can someone help me, a newbie to Telerik ?

Thanks in adavance.

Shinu
Top achievements
Rank 2
 answered on 18 May 2009
6 answers
197 views
Hi.

I'm trying to update a radgrid on my page1 after I close a radwindow containing page2 but I'm having some trouble. I attached my project. Can you help me?

Thanks in advance
Charles
Top achievements
Rank 1
 answered on 18 May 2009
3 answers
246 views
I am having problems with the width of the grid.

If I have a Radgrid with detailstable, when i expand the detailsTable, everything is ok, but, for example.
If i expand the second and the others records, always expand, but not expand with 100% of width the details table.

This is the code of RadGrid.

<

 

telerik:RadGrid ShowGroupPanel="false" AutoGenerateColumns="false" ID="RadGrid1" AllowFilteringByColumn="False" AllowSorting="true" ShowFooter="True" runat="server" AllowPaging="false" Skin="MyCustomSkin" EnableEmbeddedSkins="false" OnSortCommand="RadGrid1_SortCommand" OnItemDataBound="RadGrid1_ItemDataBound" OnDetailTableDataBind="RadGrid1_DetailTableDataBind" OnColumnCreated="RadGrid1_ColumnCreated" Width="100%">

 

 

 

 

<ExportSettings OpenInNewWindow="true" ExportOnlyData="true">

 

 

 

 

<Excel Format="Html" FileExtension="XLS"/>

 

 

 

 

<Pdf PaperSize="Legal" />

 

 

 

 

</ExportSettings>

 

 

 

 

<ClientSettings>

 

 

 

 

<Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="true">

 

 

 

 

</Scrolling>

 

 

 

 

<ClientEvents OnGridCreated="GridCreated" />

 

 

 

 

</ClientSettings>

 

 

 

 

<MasterTableView DataKeyNames="id_grupo,id_tipogrupo">

 

 

 

 

<DetailTables>

 

 

 

<telerik:GridTableView DataKeyNames="salto,nroserie" Width="100%">

 

 

 

<Columns>

 

 

 

<telerik:GridBoundColumn DataField="UID" HeaderText="UID" SortExpression="UID" UniqueName="UID" />

 

 

 

<telerik:GridBoundColumn DataField="Juego" HeaderText="Juego" SortExpression="Juego" UniqueName="Juego" />

 

 

 

<telerik:GridBoundColumn DataField="Fabricante" HeaderText="Fabricante" SortExpression="Fabricante" UniqueName="Fabricante" />

 

 

<telerik:GridBoundColumn DataField="Tipo" HeaderText="Tipo" SortExpression="Tipo" UniqueName="Tipo" />

 

 

<telerik:GridBoundColumn DataField="fechadesde" HeaderText="Desde" SortExpression="fechadesde" UniqueName="fechadesde" DataFormatString="{0:dd/MM/yyyy hh:mm:ss}" />

 

 

 

<telerik:GridBoundColumn DataField="fechahasta" HeaderText="Hasta" SortExpression="fechahasta" UniqueName="fechahasta" DataFormatString="{0:dd/MM/yyyy hh:mm:ss}" />

 

 

 

<telerik:GridBoundColumn DataField="dias" HeaderText="Días" SortExpression="dias" UniqueName="dias" />

 

 

 

<telerik:GridCalculatedColumn HeaderText="% Dev" DataType="System.Decimal" UniqueName="devolucion" DataFields="apuesta,ganancia" Expression="IIF({0}>0,(100)-({1}/{0}*100),0.00)" DataFormatString="{0:##0.00}" Aggregate="Avg" />

 

 

 

<telerik:GridBoundColumn DataField="apuesta" HeaderText="Apuesta" SortExpression="apuesta" UniqueName="apuesta" DataFormatString="{0:###,###,##0.00}" EmptyDataText="0,00" Aggregate="Sum" />

 

 

 

<telerik:GridBoundColumn DataField="ganancia" HeaderText="Ganancia" SortExpression="ganancia" UniqueName="ganancia" DataFormatString="{0:###,###,##0.00}" EmptyDataText="0,00" Aggregate="Sum"/>

 

 

 

<telerik:GridBoundColumn DataField="partidas" HeaderText="Partidas" SortExpression="partidas" UniqueName="partidas" EmptyDataText="0" DataFormatString="{0:######}" Aggregate="Sum" />

 

 

 

<telerik:GridCalculatedColumn HeaderText="Prm.Aptas" DataType="System.Decimal" DataFields="apuesta,dias" Expression="IIF({0}>0,{0}/{1},0.00)" DataFormatString="{0:###,###,##0.00}" Aggregate="Avg" UniqueName="promApuestas" />

 

 

 

<telerik:GridCalculatedColumn HeaderText="Prm.Gcia" DataType="System.Decimal" DataFields="ganancia,dias" Expression="IIF({0}>0,{0}/{1},0.00)" DataFormatString="{0:###,###,##0.00}" Aggregate="Avg" UniqueName="promGcia" />

 

 

 

<telerik:GridBoundColumn DataField="promediopartidas" HeaderText="Prm.Ptdas" SortExpression="promediopartidas" DataFormatString="{0:###,###,##0.00}" EmptyDataText="0,00" Aggregate="Avg" UniqueName="promPartidas" />

 

 

 

</Columns>

 

 

 

<GroupByExpressions>

 

 

 

<telerik:GridGroupByExpression>

 

 

 

<SelectFields>

 

 

 

<telerik:GridGroupByField FieldAlias="Fabricante" FieldName="Fabricante"></telerik:GridGroupByField>

 

 

 

</SelectFields>

 

 

 

<GroupByFields>

 

 

 

<telerik:GridGroupByField FieldName="Fabricante"></telerik:GridGroupByField>

 

 

 

</GroupByFields>

 

 

 

</telerik:GridGroupByExpression>

 

 

 

</GroupByExpressions>

 

 

 

</telerik:GridTableView>

 

 

 

</DetailTables>

 

 

 

<Columns>

 

 

 

<telerik:GridBoundColumn DataField="Grupo" HeaderText="Grupo" SortExpression="Grupo" UniqueName="Grupo"></telerik:GridBoundColumn>

 

 

 

</Columns>

 

 

 

</MasterTableView>

 

 

 

</telerik:RadGrid>


And this is the example:
First Picture

Second Picture

Third Picture

Thank´s if you can Help me.

 

 

 

 

 

 

 

Sebastian
Telerik team
 answered on 18 May 2009
9 answers
825 views
Hi group,

we want to use ExcelML style exports in all of our grids. However, we have the problem that decimal values lose their decimal seperator. So a displayed value of 2000,00 (german format) is exported as 200000 or larger values even result in something like 2E+[number].

This affects various specific columns in the grids. So how can we force those columns to be exported as they are displayed in the browser?

Thanks

Daniel
Arnstein
Top achievements
Rank 2
 answered on 18 May 2009
3 answers
202 views
Hi all, 

can someone please assist, or direct me to a working example 

I am using RADChart in an ASP.NET page, as a horizontal Gannt chart
along the bottom axis i would like lables that appear as follows
APR        MAY
09            09


Telerik.Charting.ChartAxisItem cai = new Telerik.Charting.ChartAxisItem();  
// add 15 days so that label appears in middle of month  
cai.Value = Convert.ToDecimal(thisDate.AddDays(15).ToOADate());  
// create text for label  
cai.TextBlock.Text = thisDate.ToString("MMM yy");  
// attempt to force linefeed in label - also tried char(10)  
cai.TextBlock.Text = cai.TextBlock.Text.Replace(' ', Convert.ToChar(13));  
// set autowrap on - in desperation !!  
cai.TextBlock.Appearance.AutoTextWrap = Telerik.Charting.Styles.AutoTextWrap.True;  
// set label alignment to center  
cai.TextBlock.Appearance.Position.AlignedPosition = Telerik.Charting.Styles.AlignedPositions.Center;  
// add label to Axis objects  
radChart.PlotArea.YAxis.Items.Add(cai); 

unfortunately - Labels Still appear as APR 09      May 09     .....
Any ideas - suggestions gratefully accepted
  
Giuseppe
Telerik team
 answered on 18 May 2009
1 answer
133 views
Please answer my question,  as how to accomplish the below items.

1.) For the grid below, I don't allow the user to select Master table items, only select (via clientsidecheckbox) the detail table items. When the Master is expanded I select the detail items, then I do  a postback, the items are persisted and still checked. BUT, when I unexpand the items, do the postback, and then expand the items, the items are no longer checked. WHY? How can I make sure that the DETAIL Table items are selected after the master has been expanded, closed, postback occurs, then expanded again.


 2.) I believe Telerik should correct this issue. You should be able to click a row without it affecting the rest of the other rows.

If the row clicked is already selected, the it should deselect that row (only), and vice versa, if it's deselected already then it should select that row only.

I CAN'T STAND IT when I have selected 20 rows and then when I accidently click outside a checkbox, I loose all my selections. I have the following radgrid, please show me if there is a way, how to achieve this. I already tried the ToggleSelection.js solution, but I get alot of errors because it was not designed for Heirarchy Grid.


var

 

rccoc_selected = {};

 

 

function rgChildObjects_GridCreated(sender, args) {

 

 

var scrollArea = sender.GridDataDiv;

 

 

var dataHeight = sender.get_masterTableView().get_element().clientHeight;

 

 

if (dataHeight < 200) {

 

scrollArea.style.height = dataHeight +

"px";

 

}

 

else {

 

 

//sender.get_masterTableView().get_element().style.width = "620px";

 

}

}

 

function rgChildObjects_RowSelected(sender, args) {

 

 

var customeID = args.getDataKeyValue("ReportingColumnID");

 

 

 

if (!rccoc_selected[customeID]) {

 

rccoc_selected[customeID] =

true;

 

}

}

 

function rgChildObjects_RowDeselected(sender, args) {

 

 

var customeID = args.getDataKeyValue("ReportingColumnID");

 

 

if (rccoc_selected[customeID]) {

 

rccoc_selected[customeID] =

null;

 

}

}

 

function rgChildObjects_RowCreated(sender, args) {

 

 

var customeID = args.getDataKeyValue("ReportingColumnID");

 

 

if (rccoc_selected[customeID]) {

 

 

alert(args.get_gridDataItem());

args.get_gridDataItem().set_selected(

true);

 

}

}

 

//***************************************//

 

 

function rgChildObjects_RowSelecting(sender, args) {

 

 

var e = args.get_domEvent();

 

 

//IE - srcElement, Others - target

 

 

var targetElement = e.srcElement || e.target;

 

 

 

//this condition is needed if multi row selection is enabled for the grid

 

 

if (typeof (targetElement) != "undefined") {

 

 

//is the clicked element an input checkbox? <input type="checkbox"...>

 

 

if (targetElement.tagName.toLowerCase() != "input" &&

 

(!targetElement.type || targetElement.type.toLowerCase() !=

"checkbox"))// && currentClickEvent)

 

{

 

//cancel the event

 

args.set_cancel(

true);

 

}

}

 

else

 

 

args.set_cancel(

true);

 

}

 

function rgChildObjects_RowDeselecting(sender, args) {

 

 

var e = args.get_domEvent();

 

 

//IE - srcElement, Others - target

 

 

var targetElement = e.srcElement || e.target;

 

 

 

//this condition is needed if multi row selection is enabled for the grid

 

 

if (typeof (targetElement) != "undefined") {

 

 

//is the clicked element an input checkbox? <input type="checkbox"...>

 

 

if (targetElement.tagName.toLowerCase() != "input" &&

 

(!targetElement.type || targetElement.type.toLowerCase() !=

"checkbox"))// && currentClickEvent)

 

{

 

//cancel the event

 

args.set_cancel(

true);

 

}

}

 

else

 

args.set_cancel(

true);

 

}



 

<telerik:RadGrid ID="rgChildObjects" AllowMultiRowSelection="true" AutoGenerateColumns="false" Width="295px" runat="server">

 

 

 

 

<MasterTableView HierarchyDefaultExpanded="false" HierarchyLoadMode="client" Name="ChildObjects" DataKeyNames="ReportingChildObjectID">

 

 

 

 

<DetailTables>

 

 

 

 

<telerik:GridTableView Name="Columns" Width="100%" ShowHeader="true" DataKeyNames="ReportingColumnID">

 

 

 

 

<Columns>

 

 

 

 

<telerik:GridClientSelectColumn />

 

 

 

 

<telerik:GridBoundColumn HeaderStyle-Font-Bold="true" itemstyle-wrap="false" UniqueName="DefaultDescription" DataField="DefaultDescription" HeaderText="Child Report Column(s)" />

 

 

 

 

</Columns>

 

 

 

 

</telerik:GridTableView>

 

 

 

 

</DetailTables>

 

 

 

 

<Columns>

 

 

 

 

<telerik:GridBoundColumn ItemStyle-font-bold="true" HeaderStyle-Font-Bold="true" HeaderStyle-wrap="false" UniqueName="ChildObjectName" DataField="ChildObjectName" HeaderText="Child Reports" />

 

 

 

 

</Columns>

 

 

 

 

</MasterTableView>

 

 

 

 

<ClientSettings AllowExpandCollapse="true">

 

 

 

 

 

<Selecting EnableDragToSelectRows="false" AllowRowSelect="true" />

 

 

 

 

</ClientSettings>

 

 

 

 

</telerik:RadGrid>

Sebastian
Telerik team
 answered on 18 May 2009
1 answer
140 views
Hello i have a GridDropDownColumn with a ObjectDataSource, now the data are not sorted alphabetical, how to sort this data??
Sebastian
Telerik team
 answered on 18 May 2009
4 answers
66 views
Hi Folks.
I Would like to know is there any possibility of customizing rad menu controls in accordance with the required styles. like background color image border style and so on
For instance




Paul
Telerik team
 answered on 18 May 2009
3 answers
243 views
I am getting an error in the below code........what am I doing wrong ? 
-- error with this because of the conditional statement <telerik:RadDatePicker ID="radBillPeriodStartDate1" Skin="Office2007" Style="vertical-align: middle;" runat="server" DbSelectedDate='<%# Bind("END_BILLING_PERIOD","{0:D}") == DBNull.Value ? radBillPeriodEndDate.SelectedDate : Bind("END_BILLING_PERIOD","{0:D}") %>' > -- this works fine when there is no conditional statement <telerik:RadDatePicker ID="radBillPeriodEndDate1" Skin="Office2007" Style="vertical-align: middle;" runat="server" DbSelectedDate='<%# Bind("END_BILLING_PERIOD", "{0:d}") %>' >
Sebastian
Telerik team
 answered on 18 May 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
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
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?