Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
188 views
In my page, I have 7 radgrid with edit formtemplate.
In the edit formtemplate I used several radcontrols like radcombobox, raddatetimepicker and radtextbox.
All are funtioning properly.
But when I click on edit on radgrid,  the edit template section, radcombobox and raddatetimepicker's skin
do not work. sometimes it comes and sometimes these don't. Then I used radstylesheetmanager...although
I face similar problem...skin is not working here.

NB: If I use it without ajaxified then this design is ok...but I need to be ajaxified...like your controls.

I wanted to use ajaxcontroltoolkit datetimepicker...I could not able to use that in the radgrid edit formtemplate section...

Please suggest me what are the possible cause...need urgent.

Code snippet:

 

<Telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

 

 

<AjaxSettings>

 

 

<Telerik:AjaxSetting AjaxControlID ="dgvDevelopmentActivity">

 

 

<UpdatedControls>

 

 

<Telerik:AjaxUpdatedControl ControlID ="dgvDevelopmentActivity" LoadingPanelID ="Radajaxloadingpanel1" />

 

 

<telerik:AjaxUpdatedControl ControlID="RadWindowManager1" />

 

 

</UpdatedControls>

 

 

</Telerik:AjaxSetting>

 

 

<Telerik:AjaxSetting AjaxControlID ="dgvFunctionalStrength">

 

 

 

 

 

<UpdatedControls>

 

 

 

 

 

<Telerik:AjaxUpdatedControl ControlID ="dgvFunctionalStrength" LoadingPanelID ="Radajaxloadingpanel1" />

 

 

 

 

 

<telerik:AjaxUpdatedControl ControlID="RadWindowManager1" />

 

 

 

 

 

</UpdatedControls>

 

 

 

 

 

</Telerik:AjaxSetting>

 

 

 

 

</AjaxSettings>

 

 

</Telerik:RadAjaxManager>

 

 

<Telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">

 

 

</Telerik:RadStyleSheetManager>

 

<

 

Telerik:RadGrid ID="dgvLeadershipStrength" runat="server"

 

 

AllowMultiRowEdit="true" AllowPaging="True" AllowSorting="True"

 

 

AutoGenerateColumns="False" GridLines="None"

 

 

OnItemCommand="dgvLeadershipStrength_ItemCommand"

 

 

OnItemCreated="dgvLeadershipStrength_ItemCreated"

 

 

OnItemDataBound="dgvLeadershipStrength_ItemDataBound"

 

 

OnNeedDataSource="dgvLeadershipStrength_NeedDataSource" PageSize="7"

 

 

ShowStatusBar="true" Skin="Outlook" Width="750px">

 

 

<headercontextmenu enableautoscroll="True">

 

 

</headercontextmenu>

 

 

<mastertableview commanditemdisplay="Top" datakeynames="DetailID" dir="LTR" editmode="EditForms" >

 

 

<commanditemsettings addnewrecordtext="Leadership Strength" ShowRefreshButton ="false" />

 

 

<Columns>

 

 

<Telerik:GridEditCommandColumn ButtonType="ImageButton" HeaderText="Edit">

 

 

<ItemStyle Width="20px" />

 

 

</Telerik:GridEditCommandColumn>

 

 

<Telerik:GridBoundColumn AutoPostBackOnFilter="true" ColumnEditorID="txtVanish"

 

 

DataField="DetailID" HeaderText="Vanish" UniqueName="colVanished"

 

 

Visible="false">

 

 

</Telerik:GridBoundColumn>

 

 

<Telerik:GridBoundColumn AutoPostBackOnFilter="true"

 

 

ColumnEditorID="ddlCompetency" DataField="Competency" HeaderText="Competency"

 

 

UniqueName="colCompetency">

 

 

</Telerik:GridBoundColumn>

 

 

<Telerik:GridBoundColumn AutoPostBackOnFilter="true"

 

 

ColumnEditorID="ddlCompetencyArea" DataField="area" HeaderText="areas"

 

 

SortExpression="area" UniqueName="colCompetencyArea">

 

 

</Telerik:GridBoundColumn>

 

 

<Telerik:GridBoundColumn AutoPostBackOnFilter="true" ColumnEditorID="ddlLevel"

 

 

DataField="level" HeaderText="Level" SortExpression="level"

 

 

UniqueName="colLevel">

 

 

</Telerik:GridBoundColumn>

 

 

<Telerik:GridBoundColumn AutoPostBackOnFilter="true"

 

 

ColumnEditorID="ddlIndicator" DataField="Indicator" HeaderText="Indicator"

 

 

SortExpression="Name" UniqueName="colIndicator">

 

 

</Telerik:GridBoundColumn>

 

 

<Telerik:GridBoundColumn DataField="Evidence" HeaderText="Evidence"

 

 

SortExpression="Evidence" UniqueName="colEvidence" />

 

 

<Telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete"

 

 

HeaderText="Delete" UniqueName="DeleteColumn" />

 

 

</Columns>

 

 

 

<editformsettings editformtype="Template"

 

 

formstyle-backcolor="Transparent">

 

 

<editcolumn uniquename="EditCommandColumn1">

 

 

</editcolumn>

 

 

<formstyle backcolor="Transparent" />

 

 

<formtemplate>

 

 

<div style="width: 100%; height: 100%">

 

 

<table border="0" cellspacing="2" style="width: 100%; border-color: #99ccff">

 

 

<tr>

 

 

<td style="width: 10%; text-align: left; vertical-align: top;" visible="false">

 

 

<asp:Label ID="lblVanish" runat="server" CssClass="captionlbl" Visible="false"

 

 

Width="100px"><b>Vanish</b></asp:Label>

 

 

</td>

 

 

<td style="width: 60%; text-align: left;" visible="false">

 

 

<Telerik:RadTextBox ID="txtVanish" runat="Server" AutoPostBack="True"

 

 

Text='<%# Eval("DetailID") %>' Visible="false" Width="500px">

 

 

</Telerik:RadTextBox>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td style="width: 10%; text-align: left; vertical-align: top;">

 

 

<asp:Label ID="Competency" runat="server" CssClass="captionlbl" Width="100px"><b>Competency</b></asp:Label>

 

 

</td>

 

 

<td style="width: 60%; text-align: left;">

 

 

<Telerik:RadComboBox ID="ddlCompetency" runat="Server" AutoPostBack="True"

 

 

OnSelectedIndexChanged="ddlCompetency_SelectedIndexChanged" Skin="Outlook"

 

 

TabIndex="1" Width="500px">

 

 

</Telerik:RadComboBox>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td style="vertical-align: top; width: 10%; text-align: left;">

 

 

<asp:Label ID="CompetencyArea" runat="server" CssClass="captionlbl"

 

 

Height="15px"><b>Area</b></asp:Label>

 

 

</td>

 

 

<td style="width: 60%; text-align: left;">

 

 

<Telerik:RadComboBox ID="ddlCompetencyArea" runat="Server" AutoPostBack="True"

 

 

OnSelectedIndexChanged="ddlCompetencyArea_SelectedIndexChanged" Skin="Outlook"

 

 

TabIndex="2" Width="500px">

 

 

</Telerik:RadComboBox>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td style="width: 10%; text-align: left; height: 15px;">

 

 

<asp:Label ID="lblLevel" runat="server" CssClass="captionlbl"><b>Level</b></asp:Label>

 

 

</td>

 

 

<td style="width: 60%; text-align: left;">

 

 

<Telerik:RadComboBox ID="ddlLevel" runat="Server" AutoPostBack="True"

 

 

OnSelectedIndexChanged="ddlLevel_SelectedIndexChanged" Skin="Outlook"

 

 

TabIndex="3" Width="500px">

 

 

</Telerik:RadComboBox>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td style="vertical-align: top; width: 10%; text-align: left; height: 15px;">

 

 

<asp:Label ID="lblIndicator" runat="server" CssClass="captionlbl"><b>Indicator</b></asp:Label>

 

 

</td>

 

 

<td style="width: 60%; text-align: left;">

 

 

<Telerik:RadComboBox ID="ddlIndicator" runat="Server" AutoPostBack="True"

 

 

Skin="Outlook" TabIndex="4" Width="500px">

 

 

</Telerik:RadComboBox>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td style="vertical-align: top; width: 10%; text-align: left; height: 15px;">

 

 

<asp:Label ID="lblEvidance" runat="server" CssClass="captionlbl"><b>Evidance</b></asp:Label>

 

 

</td>

 

 

<td style="width: 60%; text-align: left;">

 

 

<Telerik:RadTextBox ID="txtEvidence" runat="server" AutoPostBack="true"

 

 

Skin="Outlook" Text='<%# Eval("Evidence", "{0:C}") %>' Width="500px">

 

 

</Telerik:RadTextBox>

 

 

</td>

 

 

</tr>

 

 

<tr style="width: 100%">

 

 

<td colspan="2" style="height: 15px; text-align: left;">

 

 

</td>

 

 

</tr>

 

 

 

<tr>

 

 

<td align="left" colspan="2">

 

 

<asp:Button ID="btnEmpKrainsert" runat="server" CommandName='<%# (Container is Telerik.Web.UI.GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'

 

 

 

Text='<%# (Container is Telerik.Web.UI.GridEditFormInsertItem) ? "Insert" : "Update" %>'

 

 

Width="70px" Font-Bold ="true" ForeColor ="Blue" EnableTheming ="true" BorderStyle ="Solid"/>

 

 

 

<asp:Label ID="Label6" runat="server"

 

 

Text="Please Click to Perform the Operation" CssClass="captionlbl"

 

 

Style="color: #0000cc" />

 

 

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td align="left" colspan="2">

 

 

<asp:Button ID="btnEmpKraCancel" runat="server" BackColor="AliceBlue" BorderWidth="1px" CausesValidation="False" CommandName="Cancel"

 

 

Text="Cancel" Width="70px" Font-Bold ="true" ForeColor ="Blue" EnableTheming ="true" BorderStyle ="Solid" />

 

 

<asp:Label ID="Label7" runat="server" Text="Please Click Cancel to Perform" CssClass="captionlbl" Style="color: #0000cc"></asp:Label>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td colspan="2" style="height: 15px; text-align: left;">

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

</div>

 

 

</formtemplate>

 

 

</editformsettings>

 

 

</mastertableview><clientsettings>

 

 

<clientevents onrowdblclick="RowDblClick" />

 

 

</clientsettings>

 

 

</Telerik:RadGrid>

 

<

 

Telerik:RadGrid ID="dgvDevelopmentActivity" runat="server"

 

 

AllowMultiRowEdit="true" AllowPaging="True" AllowSorting="True"

 

 

AutoGenerateColumns="False" GridLines="None"

 

 

OnItemCommand="dgvDevelopmentActivity_ItemCommand"

 

 

OnItemCreated="dgvDevelopmentActivity_ItemCreated"

 

 

OnItemDataBound="dgvDevelopmentActivity_ItemDataBound"

 

 

OnNeedDataSource="dgvDevelopmentActivity_NeedDataSource" PageSize="7"

 

 

ShowStatusBar="true" Skin="Outlook" Width="750px">

 

 

<headercontextmenu enableautoscroll="True">

 

 

</headercontextmenu>

 

 

<mastertableview commanditemdisplay="Top" datakeynames="ID" dir="LTR"

 

 

editmode="EditForms">

 

 

<commanditemsettings addnewrecordtext="Development Activity" ShowRefreshButton ="false" />

 

 

<Columns>

 

 

<Telerik:GridEditCommandColumn ButtonType="ImageButton" HeaderText="Edit">

 

 

<ItemStyle Width="20px" />

 

 

</Telerik:GridEditCommandColumn>

 

 

<Telerik:GridBoundColumn AutoPostBackOnFilter="true" ColumnEditorID="txtVanish"

 

 

DataField="ID" HeaderText="Vanish" UniqueName="Vanish" Visible="false">

 

 

</Telerik:GridBoundColumn>

 

 

<Telerik:GridBoundColumn AutoPostBackOnFilter="true" ColumnEditorID="What"

 

 

DataField="What" HeaderText="What" UniqueName="What">

 

 

</Telerik:GridBoundColumn>

 

 

<Telerik:GridBoundColumn AutoPostBackOnFilter="true" ColumnEditorID="How"

 

 

DataField="How" HeaderText="How" SortExpression="How" UniqueName="How">

 

 

</Telerik:GridBoundColumn>

 

 

<Telerik:GridBoundColumn AutoPostBackOnFilter="true" ColumnEditorID="Whenn"

 

 

DataField="Whenn" HeaderText="When" SortExpression="Whenn" UniqueName="Whenn">

 

 

</Telerik:GridBoundColumn>

 

 

<Telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete"

 

 

HeaderText="Delete" ItemStyle-Width="20px" Text="Delete"

 

 

UniqueName="DeleteColumn">

 

 

<ItemStyle Width="20px" />

 

 

</Telerik:GridButtonColumn>

 

 

</Columns>

 

 

 

<editformsettings editformtype="Template"

 

 

formstyle-backcolor="Transparent">

 

 

<editcolumn uniquename="EditCommandColumn1">

 

 

</editcolumn>

 

 

<formstyle backcolor="Transparent" />

 

 

<formtemplate>

 

 

<div style="width: 100%; height: 100%">

 

 

<table border="0" cellspacing="2" style="width: 100%; border-color: #99ccff">

 

 

<tr>

 

 

<td style="width: 10%; text-align: left; vertical-align: top;" visible="false">

 

 

<asp:Label ID="lblVanish" runat="server" CssClass="captionlbl" Visible="false"

 

 

Width="100px"><b>Vanish</b></asp:Label>

 

 

</td>

 

 

<td style="width: 60%; text-align: left;" visible="false">

 

 

<Telerik:RadTextBox ID="txtVanish" runat="Server" AutoPostBack="True"

 

 

Skin="Web20" Text='<%# Eval("ID") %>' Visible="false" Width="500px">

 

 

</Telerik:RadTextBox>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td style="width: 10%; text-align: left; vertical-align: top;">

 

 

<asp:Label ID="What" runat="server" CssClass="captionlbl" Width="100px"><b>What</b></asp:Label>

 

 

</td>

 

 

<td style="width: 60%; text-align: left;">

 

 

<Telerik:RadTextBox ID="txtWhat" runat="Server" AutoPostBack="True"

 

 

Skin="Web20" TabIndex="1" Text='<%# Eval("What")%>' Width="500px">

 

 

</Telerik:RadTextBox>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td style="vertical-align: top; width: 10%; text-align: left;">

 

 

<asp:Label ID="How" runat="server" CssClass="captionlbl" Height="15px"><b>How</b></asp:Label>

 

 

</td>

 

 

<td style="width: 60%; text-align: left;">

 

 

<Telerik:RadTextBox ID="txtHow" runat="Server" AutoPostBack="True" Skin="Web20"

 

 

TabIndex="2" Text='<%# Eval("How")%>' Width="500px">

 

 

</Telerik:RadTextBox>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td style="width: 10%; text-align: left; height: 15px;">

 

 

<asp:Label ID="lblWhen" runat="server" CssClass="captionlbl"><b>When</b></asp:Label>

 

 

</td>

 

 

<td style="width: 60%; text-align: left;">

 

 

<Telerik:RadDateTimePicker ID="dtpwhen" runat="Server" AutoPostBack="True"

 

 

Skin="Outlook" TabIndex="3" Width="200px">

 

<%

-- <calendar skin="Outlook" usecolumnheadersasselectors="False"

 

userowheadersasselectors="False" viewselectortext="x">

</calendar>

<timeview cellspacing="-1">

</timeview>

<timepopupbutton hoverimageurl="" imageurl="" />

<datepopupbutton hoverimageurl="" imageurl="" tabindex="3" />

<dateinput autopostback="True" dateformat="dd MMM yyyy"

displaydateformat="dd MMM yyyy" tabindex="3">

</dateinput>--

 

%>

 

 

</Telerik:RadDateTimePicker>

 

 

</td>

 

 

</tr>

 

 

<tr style="width: 100%">

 

 

<td colspan="2" style="height: 15px; text-align: left;">

 

 

</td>

 

 

</tr>

 

 

 

<tr>

 

 

<td align="left" colspan="2">

 

 

<asp:Button ID="btnEmpKrainsert" runat="server" CommandName='<%# (Container is Telerik.Web.UI.GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'

 

 

 

Text='<%# (Container is Telerik.Web.UI.GridEditFormInsertItem) ? "Insert" : "Update" %>'

 

 

Width="70px" Font-Bold ="true" ForeColor ="Blue" EnableTheming ="true" BorderStyle ="Solid"/>

 

 

 

<asp:Label ID="Label6" runat="server"

 

 

Text="Please Click to Perform the Operation" CssClass="captionlbl"

 

 

Style="color: #0000cc" />

 

 

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td align="left" colspan="2">

 

 

<asp:Button ID="btnEmpKraCancel" runat="server" BackColor="AliceBlue" BorderWidth="1px" CausesValidation="False" CommandName="Cancel"

 

 

Text="Cancel" Width="70px" Font-Bold ="true" ForeColor ="Blue" EnableTheming ="true" BorderStyle ="Solid" />

 

 

<asp:Label ID="Label7" runat="server" Text="Please Click Cancel to Perform" CssClass="captionlbl" Style="color: #0000cc"></asp:Label>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td colspan="2" style="height: 15px; text-align: left;">

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

</div>

 

 

</formtemplate>

 

 

</editformsettings>

 

 

</mastertableview>

 

 

<clientsettings>

 

 

<clientevents onrowdblclick="RowDblClick" />

 

 

</clientsettings>

 

 

</Telerik:RadGrid>

 


Kiara
Top achievements
Rank 1
 answered on 05 Aug 2010
1 answer
79 views
Hi.
I have scenario similar to master-detail grid on your demos (like: http://demos.telerik.com/aspnet-ajax/grid/examples/programming/selectedvalue/defaultcs.aspx). How can I store the state of all grids, after selecting a row in a first one, leaving the page, and then returning to it? I want to have a selection in first grid and subsets of rows in other grids preserved.
Greetings:
Pawel
Mira
Telerik team
 answered on 05 Aug 2010
1 answer
90 views
hi

Very urgent please help me


i have implemented custom search in itemCommed event in my grid. but i could not execute that its getting error in "Expression expected" i checked all the possibility but i could not correct it. At the same time i implemented grouping that grouping working fine there is no issue. But searching only i have problem. please check it and let me know as soon as possible
below i pasted my c# code as well as  asp.net code

c#

 protected void RadGridMsgInbox_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
    {
        e.Canceled = true;
        Button btnG = (Button)e.Item.FindControl("btnGeneral");
        Button btnI = (Button)e.Item.FindControl("btnGeneral");
        Button btnN = (Button)e.Item.FindControl("btnGeneral");
        switch (e.CommandName)
        {
                // THIS CASE FIRE WHEN GRID SEARCH EVENT ACCOUR
            case "SearchUsersBy":
                    TextBox txtSearch = (TextBox)e.Item.FindControl("txtSearch");
                    RadioButton rdbtnFrom = (RadioButton)e.Item.FindControl("rdbtnFrom");
                    RadioButton rdbtnSubject = (RadioButton)e.Item.FindControl("rdbtnSubject");
                    ObjCC_Msg.MsgSearchStr = "";
                    if (rdbtnFrom.Checked)
                        this.RadGridMsgInbox.MasterTableView.FilterExpression = "([SentEmail] LIKE '%" + txtSearch.Text + "%')";
                    else if(rdbtnSubject .Checked )
                        this.RadGridMsgInbox.MasterTableView.FilterExpression = "( [MessageSubject] LIKE '%" + txtSearch.Text + "%' )";
                    else
                        this.RadGridMsgInbox.MasterTableView.FilterExpression = "(([MessageSubject] LIKE '%" + txtSearch.Text + "%') OR ([SENTEMAIL] LIKE '%" + txtSearch.Text + "%'))";
                  
                    if (RTbMessageMenu.SelectedIndex == 1)
                      ObjCC_Msg.GetMessage = FromMessage.Sent;
                    
                    //RadGridMsgInbox.MasterTableView.GroupByExpressions.Clear();
                    //RadGridMsgInbox.MasterTableView.Rebind();
                    RadGridMsgInbox.Rebind();
               break;
}
}

ASP.NET Code

 <CommandItemTemplate>
                                                <table cellpadding="0" cellspacing="0" border="0" width="98%">
                                                    <tr>
                                                        <td style ="width :30%">
                                                            <table border="0" cellpadding="0" cellspacing="0" width ="100%">
                                                                <tr>
                                                                    <td style ="width :90%">
                                                                        <asp:TextBox ID="txtSearch" runat="server" Width ="90%"></asp:TextBox>&nbsp;</td>
                                                                    <td style ="width :10%">
                                                                        <asp:Button ID="lnkBtnSearch" CssClass="mainSearchBtn" runat="server" Text="" CommandName ="SearchUsersBy"></asp:Button>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td colspan ="2">
                                                                        <asp:RadioButton ID="btnAll" runat ="server" Text ="All" GroupName ="Search" Checked ="true" />&nbsp;
                                                                        <asp:RadioButton ID="rdbtnFrom" runat ="server" Text ="From" GroupName ="Search" />&nbsp;
                                                                        <asp:RadioButton ID="rdbtnSubject" runat ="server" Text ="Subject" GroupName ="Search" />
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </CommandItemTemplate>

*Note: Here i attached my error screen please go through that

i am waiting for your reply


Pavlina
Telerik team
 answered on 05 Aug 2010
1 answer
72 views
I have a scrollable grid that I am using to get input from the user (uses a GridClientSeledColumn to do so):

<telerik:RadGrid ID="gridEntitiesAndCCs" runat="server" AllowSorting="True" AllowMultiRowSelection="true" 
        AutoGenerateColumns="False" GridLines="None" Height="150" Width="100%" EnableViewState="false">
        <MasterTableView DataKeyNames="FacilityID,CostCtr" AllowMultiColumnSorting="true">
          <Columns>
            <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" >
              <HeaderStyle Width="25" />
              <ItemStyle Width="25" />
            </telerik:GridClientSelectColumn>
            <telerik:GridBoundColumn DataField="FacilityName" HeaderText="Facility" 
              SortExpression="FacilityName" UniqueName="FacilityName">
              <HeaderStyle Width="150" />
              <ItemStyle Width="150" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="CostCtr" HeaderText="Cost Center" 
              SortExpression="CostCtr" UniqueName="CostCtr">
              <HeaderStyle Width="100" />
              <ItemStyle Width="100" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="DeptName" HeaderText="Dept Name" 
              SortExpression="DeptName" UniqueName="DeptName">
            </telerik:GridBoundColumn>
          </Columns>
        </MasterTableView>
        <ClientSettings EnablePostBackOnRowClick="false">
          <Scrolling AllowScroll="true" UseStaticHeaders="true" />
          <Selecting AllowRowSelect="true" UseClientSelectColumnOnly="true" />
        </ClientSettings>
      </telerik:RadGrid>

but what happens is that if the database query returns 10 rows,  grid is scrollable, but the page itself is not.  However, if I increase the number of rows returned (select top ?? ...) from the database, the grid stays the same size, but the page itself becomes scrollable.  As the number of rows that are returned from the query increases, so does the physical page size.

The attached screen images show what happens when the database query returns 10, 30 and 60 rows.

I have set EnableViewState = false in the grid.  It seems to me that the number of rows returned should not impact the dimensions of the page itself, especially since the grid size does not change.

Is there a way to eliminate this?

Tsvetina
Telerik team
 answered on 05 Aug 2010
3 answers
297 views
Hello:

I've implemented JavaScript so that the data in the first column of the RadGrid is a clickable link, clicking the link loads an informaiton form for whatever cell is clicked.

Is there a way to change the font of this cell so that it is obvious it is a clickable link? Change color, underline, or whatever?

So instead of

Col 1           Col 2         Col 3
Data            Data          Data
Data            Data          Data

I would have

Col 1           Col 2         Col 3
Data            Data          Data
Data            Data          Data

Or the cell text could be underlined.

Please note the grid is populated by a dynamic search at runtime, a datatable is built and bound to the grid.

John.
Pavlina
Telerik team
 answered on 05 Aug 2010
1 answer
81 views
Hi telerik team,

Does the example given in the below link works with the (Q3 2009).
http://demos.telerik.com/aspnet-ajax/chart/examples/silverlight/defaultcs.aspx

Actually i go the error
"Could not load file or assembly 'System.Web.Silverlight' or one of its dependencies. The system cannot find the file specified."

then i installed the silverlight in my system, and add the reference to the project.
finally i got the error

"BC32206: Indirect reference is being made to assembly System.Web.Extensions version 3.5.0.0, which contains 'System.Web.UI.SilverlightControls.Silverlight'. This Project references a prior version of System.Web.Extensions version 1.0.61025.0. To use 'System.Web.UI.SilverlightControls.Silverlight', you must replace the reference to System.Web.Extensions with version 3.5.0.0 or higher."

Plz help aspd..

Thanks
K²

Vladimir Milev
Telerik team
 answered on 05 Aug 2010
1 answer
119 views
Good Day All

My Radgrid is defined as follows

<telerik:RadGrid ID="RadGrid1" 
                        AllowPaging="True" PageSize="5"
                runat="server" GridLines="None" Width="100%" OnItemCreated="RadGrid1_ItemCreated"
                OnItemCommand="RadGrid1_ItemCommand" Skin="Black">
                <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true" />
                <ItemStyle HorizontalAlign="Center" />
                                  
                  <MasterTableView>
                      <CommandItemSettings ExportToPdfText="Export to Pdf" />
                      <RowIndicatorColumn>
                          <HeaderStyle Width="20px" />
                      </RowIndicatorColumn>
                      <ExpandCollapseColumn>
                          <HeaderStyle Width="20px" />
                      </ExpandCollapseColumn>
                      <PagerStyle AlwaysVisible="True" />
                  </MasterTableView>
                                  
                <HeaderStyle HorizontalAlign="Center" />
                <AlternatingItemStyle HorizontalAlign="Center" />
            </telerik:RadGrid>

and i m getting data from XMl and i have a Function that returns the dataset and i am trying to do paging like this

//Paging
 private DataSet CreateDataSetFilterPaging(String Filter)
 {
 
     //Subject Filter
     string SubjectstrExpr = "SUBSTRING(DESCR,1,1) ='" + Filter + "'";
     //Staff Filter
     string StaffsstrExpr = "SUBSTRING(DESCR,1,1) ='" + Filter + "'";
 
     //Venue Filter
     string VenuestrExpr = "SUBSTRING(DESCR,1,1) ='" + Filter + "'";
     //Timetable Filter
     string TimetablestrExpr = "SUBSTRING(Code,1,1) ='" + Filter + "'";
 
     DataColumn[] keys = new DataColumn[1];
     DataSet dsFinalTimeTable = new DataSet();
     DataTable tbldt;
 
     tbldt = new DataTable("Subjects");
     //Add Staff Table
     XmlDataDocument xmlDatadocStaff = new XmlDataDocument();
     xmlDatadocStaff.DataSet.ReadXml(@"C:\Pilot Project\App_Data\Subjects.xml");
     tbldt = xmlDatadocStaff.DataSet.Tables["Subjects"];
     keys = new DataColumn[1];
     keys[0] = tbldt.Columns["ID"];
     tbldt.PrimaryKey = keys;
     DataView dvSubjects = tbldt.DefaultView;
     dvSubjects.RowFilter = StaffsstrExpr;
     DataTable tbldtFinal = dvSubjects.Table;
     dsFinalTimeTable.Tables.Add(tbldtFinal.Copy());
 
      
     //Add Venue Table
     tbldt = new DataTable("Venues");
     XmlDataDocument xmlDatadocVenue = new XmlDataDocument();
     xmlDatadocVenue.DataSet.ReadXml(@"C:\Pilot Project\App_Data\XML_Venue.xml");
     tbldt = xmlDatadocVenue.DataSet.Tables["VENUES"];
     keys = new DataColumn[1];
     keys[0] = tbldt.Columns["ID"];
     tbldt.PrimaryKey = keys;
     //DataView dvVenues = tbldt.DefaultView;
     //dvVenues.RowFilter = VenuestrExpr;
     //tbldt.Clear();
     //tbldt = dvVenues.Table;
     dsFinalTimeTable.Tables.Add(tbldt.Copy());
 
     //TimeTable
     tbldt = new DataTable("TimeTable");
     XmlDataDocument xmlDatadocTimeTable = new XmlDataDocument();
     xmlDatadocTimeTable.DataSet.ReadXml(@"C:\Pilot Project\App_Data\TimeTableFull.xml");
     tbldt = xmlDatadocTimeTable.DataSet.Tables[0];
     keys = new DataColumn[1];
     keys[0] = tbldt.Columns["ID"];
     tbldt.PrimaryKey = keys;
     DataView dvTimeTable = tbldt.DefaultView;
     dvTimeTable.RowFilter = TimetablestrExpr;
     DataTable tbldtfinaltime = dvTimeTable.Table;
     dsFinalTimeTable.Tables.Add(tbldtfinaltime.Copy());
 
     //Setup RelationsTimeTable//
     DataRelation VenuesRelations = new DataRelation("VenuesRel", dsFinalTimeTable.Tables["Appointment"].Columns["ID"], dsFinalTimeTable.Tables["Venues"].Columns["ID"]);
     DataRelation ModuleRelations = new DataRelation("SubjectRel", dsFinalTimeTable.Tables["Subjects"].Columns["ID"], dsFinalTimeTable.Tables["Appointment"].Columns["subjectid"]);
     dsFinalTimeTable.Relations.Add(VenuesRelations);
     dsFinalTimeTable.Relations.Add(ModuleRelations);
     return dsFinalTimeTable;
 }

and my ItemCreated Events looks like this

protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
  {
 
 
      if (e.Item is GridPagerItem)
      {
          GridPagerItem pagerItem = (e.Item as GridPagerItem);
          pagerItem.PagerContentCell.Controls.Clear();
 
          for (int i = 65; i <= 65 + 25; i++)
          {
              LinkButton linkButton1 = new LinkButton();
              LiteralControl lc = new LiteralControl("  ");
 
              linkButton1.Text = "" + (char)i;
 
              linkButton1.CommandName = "alpha";
              linkButton1.CommandArgument = "" + (char)i;
 
              pagerItem.PagerContentCell.Controls.Add(linkButton1);
              pagerItem.PagerContentCell.Controls.Add(lc);
          }
 
          LiteralControl lcLast = new LiteralControl(" ");
          pagerItem.PagerContentCell.Controls.Add(lcLast);
 
          LinkButton linkButtonAll = new LinkButton();
          linkButtonAll.Text = "All";
          linkButtonAll.CommandName = "NoFilter";
          pagerItem.PagerContentCell.Controls.Add(linkButtonAll);
      }
 
  }

and my ItemCommand event looks like this

protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)
  {
      String value = null;
      switch (e.CommandName)
      {
          case ("alpha"):
              {
                  value = string.Format("{0}", e.CommandArgument);
                  break;
              }
          case ("NoFilter"):
              {
                  value = "%";
                  break;
              }
      }
 
      RadGrid1.DataSource = CreateDataSetFilterPaging(value);
      RadGrid1.Rebind();
 
  }

and when a User clicks on alphabet it must filter the data according to the Filter. Now my Problem here is that even i select any Alphabet i still receive "A" Records , which will be a Default.  I am looking at the demo
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/alphabeticpaging/defaultcs.aspx


Thanks



Pavlina
Telerik team
 answered on 05 Aug 2010
1 answer
73 views
Hi,
I would like to show the number in my YAxis with the point separator '.' and don't show the decimal.
How can I do that?
Tnx
Vladimir Milev
Telerik team
 answered on 05 Aug 2010
3 answers
159 views
I want to export the contents of a gridview to an excel document However the problems is
my telerik grid contains the time formate.
e.g:

Service                        AvgST            AvgWT
=================================================
Customer Services        00:04:35      00:43:30
Account Holder             00:02:37      00:11:36
Corporate Service        00:02:05      00:13:03
Sales Services              00:18:25     01:57:18
VIP                                00:02:54     05:02:59
Credit Card Services    00:00:00     00:00:00
Personal Loans            00:00:00     00:00:00
Services Details            00:16:58    04:34:56     
=================================================
TOTAL:                         00:47:34    12:43:22


When i tried to exporting it into excel, it will give me the wrong result(Time formate is wrong)

RESULT

Service                             AvgST            AvgWT
=================================================
Customer Services          12:04:35AM    12:43:30AM
Account Holder                12:02:37AM    12:11:36AM
Corporate Service           12:02:05AM    12:13:03AM
Sales Services                 12:18:25AM    01:57:18AM
VIP                                   12:02:54AM    05:02:59AM
Credit Card Services        12:00:00AM    12:00:00AM
Personal Loans                12:00:00AM    12:00:00AM
Services Details                12:16:58AM    04:34:56AM

and also grid footer not showing me

My Code is :

    protected void imgExcel_Click(object sender, ImageClickEventArgs e)
    {
         grdReport.ExportSettings.ExportOnlyData = true;
        grdReport.MasterTableView.ExportToExcel();
    }

can anyone help me?

My Telerik dll version is :2010.1.406.35

Dharmesh
Daniel
Telerik team
 answered on 05 Aug 2010
1 answer
140 views
Hi,
I am trying to make an application that on the delete button will first insert that selected row into a new table and after it was inserted, then delete it from the previous table.

I am having difficulties, any suggestions?

Thank you.
Tsvetoslav
Telerik team
 answered on 05 Aug 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?