Good day,
Maybe I'm wrong read, but I never found the opportunity, how to name columns by the column names in the SQL table.
SQL table I used as a source of data and need to exit in the first row contains the column names.
The result should look like the attached image.
Thank you for your help and example source code.
public override List<Worksheet> GetSheets() { var result = new List<Worksheet>(); DataTable data = GetData(); var sheet = new Worksheet(); sheet.Name = "Srpen 2016"; int rowIndex = 1; foreach (DataRow dataRow in data.Rows) { var row = new Row() { Index = rowIndex++ }; int columnIndex = 0; foreach(DataColumn dataColumn in data.Columns) { if (dataColumn.ColumnName == "DochazkaID") continue; string cellValue = dataRow[dataColumn.ColumnName].ToString(); var cell = new Cell() { Index = columnIndex++, Value = cellValue }; row.AddCell(cell); } sheet.AddRow(row); } result.Add(sheet); return result; } public DataTable GetData() { using (SqlConnection conn = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString)) { conn.Open(); string query = "SELECT Dochazka.DochazkaID,Zamestnanci.Prijmeni,Zamestnanci.Jmeno,Zakazky.Zkratka,Dochazka.MesicID,Dochazka.Den1,Dochazka.Den2,Dochazka.Den3,Dochazka.Den4,Dochazka.Den5,Dochazka.Den6,Dochazka.Den7,Dochazka.Den8,Dochazka.Den9,Dochazka.Den10,Dochazka.Den11,Dochazka.Den12,Dochazka.Den13,Dochazka.Den14,Dochazka.Den15,Dochazka.Den16,Dochazka.Den17,Dochazka.Den18,Dochazka.Den19,Dochazka.Den20,Dochazka.Den21,Dochazka.Den22,Dochazka.Den23,Dochazka.Den24,Dochazka.Den25,Dochazka.Den26,Dochazka.Den27,Dochazka.Den28,Dochazka.Den29,Dochazka.Den30,Dochazka.Den31 FROM dbo.Dochazka INNER JOIN dbo.Zamestnanci ON Dochazka.ZamestnanecID = Zamestnanci.ZamestnanecID INNER JOIN dbo.Zakazky ON Dochazka.ZakazkaID = Zakazky.ZakazkaID WHERE Dochazka.MesicID = DATEPART(MONTH, GETDATE()) ORDER BY Zamestnanci.Prijmeni"; SqlCommand cmd = new SqlCommand(query, conn); DataTable dt = new DataTable(); dt.Load(cmd.ExecuteReader()); return dt; } }

Hi, I am currently working on a multi-step form and i am using RadTabStrip for the same.
I am placing the tabs in vertical orientation. Now I would like to give a background color to the tabs.
My issue is that that background color would apply only till the tabs, but rather i would want the background to apply till the height the page view.
Like shown in the pic.
Also, just to note that all the page view have different height. and also the height will change dynamically as many controls are added dynamically.
thanks in advance for all kinds for inputs...
I have the following coded for my grid:
<telerik:RadGrid ID="grdShoppingCart" runat="server" Width="100%" RenderMode="Auto" Height="100%">
<HeaderStyle Height="30px" />
<MasterTableView Width="100%" Height="100%" AutoGenerateColumns="false" Font-Size="1.25em" TableLayout="Auto" NoMasterRecordsText="No courses selected" NoDetailRecordsText="No courses selected">
<Columns>
<telerik:GridBoundColumn HeaderStyle-Wrap="false" DataField="NameOfCourse" HeaderText="Course Name" />
<telerik:GridBoundColumn HeaderStyle-Wrap="false" DataField="IndustryName" HeaderText="Profession" />
<telerik:GridBoundColumn HeaderStyle-Wrap="false" DataField="StateCd" HeaderText="State" />
<telerik:GridBoundColumn HeaderStyle-Wrap="false" DataField="CourseHours" HeaderText="Hours" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right" />
<telerik:GridBoundColumn HeaderStyle-Wrap="false" DataField="CoursePrice" HeaderText="Price" ItemStyle-HorizontalAlign="right" DataFormatString="{0:c}" HeaderStyle-HorizontalAlign="right" />
<telerik:GridTemplateColumn HeaderText="Remove" ItemStyle-HorizontalAlign="right" HeaderStyle-HorizontalAlign="Right" ItemStyle-Wrap="false" HeaderStyle-Wrap="false">
<ItemTemplate>
<asp:LinkButton ID="RemoveItem" Text="Remove" runat="server" CommandName="DeleteRecord" ForeColor="red" CausesValidation="false" />
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn DataField="CourseItemId" Display="false" />
<telerik:GridBoundColumn DataField="CourseCode" Display="false" />
</Columns>
</MasterTableView>
</telerik:RadGrid>
When looking at it on a mobile phone, the grid gets cut off and there is no scroll bar to see the other half. Am I missing something?
Hi everyone.
Can I redirect to page in same window using AjaxNS.AR function ?
When I try, it' s opening a popup window.
Hi,
I have the submit button with RadSchedulerRecurrenceEditor. I want to know if the Recurrence checkbox is checked or not checked when the submit click event is fired in the code behind.
Thanks,
Brew
I built a really simple UserControl using the SocialShare control, just creating by creating a .ascx and registering the Telerik type.
It works fine as a widget on a Sitefinity website, but is causing DCom 10016 errors to be thrown.
The webserver was complaining that the account NetworkServices didn't have permissions to activate the specified application, and although it was easy enough to grant permissions (dcomcnfg) I was dubious about why I should need to do that.
However, I am also getting a similar DCom error being thrown on the client if I am using IE11 and need to use the developer tools to debug IE.
This is obviously a bit more disconcerting, as there shouldn't be a need to grant permissions for this type of scenario.
What am I doing wrong?
Hello,
Recently I have experienced issue with Rich Text Editor in Sitecore which is based on Telerik Editor. Sometimes creating numbered/non-numbered list from RTE caues problems.
I have attached link to RTE_edit.swf - in 1:07 there is showed how the issue looks.
http://www6.zippyshare.com/v/KjSb879E/file.html
Guys from Sitecore support provided me with some resolution, but it does not work well :(
http://pastebin.com/9QcS7n4n
Do you have any clue how it can be resolved? Or maybe you can provide the code for InsertOrderedList and InsertUnorderedList commands?
Hi
In below link, i can see clear all (x button) in drop down
but in below link i don't have see the option (normal checkbox drop down), can i have that is that doable.
http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/checkboxes/defaultcs.aspx
Senthil
Good Day All,
I am looking into changing the default color of the Radtexbox when either hovered or clicked on.
You will see in Picture 1 that it is just a normal input box, now in Picture two you will see it highlights blue when clicked on, I wane change that color
to something else, how would i accomplish this?