Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
96 views
 can i use the command object or PreRender to set the cursor, so the user can just start typing if it's a text field rather than move the mouse and set the cursor?
 thanks again for all of your help
rik
for instance:

protected void RadFilter1_ItemCommand(object sender, RadFilterCommandEventArgs e)
{
    if (e.CommandName == RadFilter.AddExpressionCommandName )
    {
       SOMEWHERE IN HERE???
}
rik butcher
Top achievements
Rank 1
 answered on 16 Aug 2011
3 answers
142 views
how do you postion a model dialog?

i have radwindowmanager on page
i set the left and top property of the radwindowmanager to 50, 50
when user clicks button i call client side script that calls "radopen"
the dialog is always centered in the middle of the screen.
i would like to postion it about 50 pixes from the top of the page.

thanks in advance.

PS, i also tried setting OnClientBeforeShow on radWindowManager and calling the moveTo method.  That doesn't work either.
Marin Bratanov
Telerik team
 answered on 16 Aug 2011
3 answers
293 views
Hi,

I have a simple RadDatePicker for which i add special days on the server side code. I intentionally make couple of days to be IsDisabled - true. On the aspx side, i applied the DisabledDayStyle css. But this class gets applied only for the first time when we load the datetime control. If i check for different months that was kept disabled, this class wasn't getting applied. How can we achieve this?

I know we have to do something on clientevent - ondayrender event but how do i actually capture the element? Let me know how do i proceed on this. I somehow do not want to again check for special days on the client side. Any code example would help.

.ASPX page:
<head runat="server">
    <title></title>
    <style type="text/css">
        .RadCalendar_Default .rcMainTable tr .DisabledClass a
        {
            color: #ebe6ca;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager ID="ScriptManager" runat="server">
        </telerik:RadScriptManager>
        <telerik:RadDatePicker ID="radEffDate" runat="server" MinDate="1900-01-01" Culture="en-US">
            <Calendar runat="server">
                <ClientEvents />
                <DisabledDayStyle CssClass="DisabledClass" />
            </Calendar>
            <DateInput Enabled="false" runat="server">
            </DateInput>
        </telerik:RadDatePicker>
    </div>
    </form>
</body>

.CS
if (!IsPostBack)
            {
                radEffDate.SelectedDate = DateTime.Now;
 
                RadCalendarDay r = new RadCalendarDay();
                r.Date = DateTime.Parse("08/09/2011");
                r.IsSelectable = false;
                r.IsDisabled = true;
                radEffDate.Calendar.SpecialDays.Add(r);
                RadCalendarDay r2 = new RadCalendarDay();
                r2.Date = DateTime.Parse("07/09/2011");
                r2.IsSelectable = false;
                r2.IsDisabled = true;               
                radEffDate.Calendar.SpecialDays.Add(r2);
            }


Regards,
Kishan G K
Maria Ilieva
Telerik team
 answered on 16 Aug 2011
2 answers
121 views
Hello,

i am using radmenu bar for which i have used telerik image with some color changes but after  last menu bar it is not showing vertical bar  which i want .

i have atteched scrren shot and image which i have used for the same.

its very urgent :(

Below is my css.

/* <RadMenu / Default> */
  
.RadMenu_RadMenuCss .rmRootGroup,
.RadMenu_RadMenuCss a.rmLink,
.RadMenu_RadMenuCss .rmGroup .rmText,
.RadMenu_RadMenuCss .rmVertical .rmText,
.RadMenu_RadMenuCss .rmLeftArrow,
.RadMenu_RadMenuCss .rmRightArrow,
.RadMenu_RadMenuCss .rmTopArrow,
.RadMenu_RadMenuCss .rmBottomArrow
{
    background-image: url('Menu/rmSprite.png');
    background-color: transparent;
}
  
.RadMenu_RadMenuCss .rmRootGroup
{
    background-repeat: repeat-x;
    background-position: 0 -408px;
    background-color: #e6e6e6;
}
  
/* <Root items> */
  
.RadMenu_RadMenuCss,
.RadMenu_RadMenuCss a.rmLink
{
    font-size: 14px
    font-family :Calibri;
    font-style:normal;
    color:#fff;
    background-color:#dcdcdc;
    text-decoration: none;
}
  
.RadMenu_RadMenuCss a.rmLink
{
    background-position: 0 -72px;
}
  
.RadMenu_RadMenuCss .rmVertical .rmFirst,
.RadMenu_RadMenuCss .rmVertical .rmLast
{
    background: none;
}
  
.RadMenu_RadMenuCss a.rmLink:hover,
.RadMenu_RadMenuCss a.rmFocused,
.RadMenu_RadMenuCss a.rmSelected
{
    color : #dcdcdc !important;
    background-color: #dcdcdc !important;
}
  
.RadMenu_RadMenuCss .rmHorizontal .rmRootLink span.rmText
{
    display: inline;
    padding-left: 12px;
}
  
.RadMenu_RadMenuCss_rtl .rmRootLink span.rmText
{
    padding-right: 12px;
}
  
.RadMenu_RadMenuCss_Context_rtl .rmRootLink span.rmText
{
    padding-right: 28px;
}
  
.RadMenu_RadMenuCss .rmHorizontal a.rmRootLink
{
    padding-left: 0;
}
  
.RadMenu_RadMenuCss_rtl a.rmRootLink
{
    margin-left: 0;
    padding: 0;
}
  
.RadMenu_RadMenuCss .rmHorizontal .rmItem > a.rmRootLink /* IE6 doesn't like width: 100% on its items. */
{
    width: 100%;
}
  
.RadMenu_RadMenuCss ul.rmHorizontal .rmLeftImage
{
    margin: 4px -4px 0 6px;
}
  
.RadMenu_RadMenuCss_rtl ul.rmHorizontal .rmLeftImage
{
    margin: 4px 6px 0 -4px;
}
  
.RadMenu_RadMenuCss .rmVertical a.rmLink
{
    padding-top: 1px;
    padding-bottom: 1px;
}
  
.RadMenu_RadMenuCss .rmVertical a.rmLink:hover,
.RadMenu_RadMenuCss .rmVertical a.rmFocused,
.RadMenu_RadMenuCss .rmVertical a.rmSelected,
.RadMenu_RadMenuCss .rmVertical a.rmExpanded,
.RadMenu_RadMenuCss .rmVertical a.rmExpanded:hover
{
    padding-top: 0;
    padding-bottom: 0;
}
  
.RadMenu_RadMenuCss .rmVertical .rmFirst a.rmLink:hover,
.RadMenu_RadMenuCss .rmVertical .rmFirst a.rmFocused,
.RadMenu_RadMenuCss .rmVertical .rmFirst a.rmSelected,
.RadMenu_RadMenuCss .rmVertical .rmFirst a.rmExpanded,
.RadMenu_RadMenuCss .rmVertical .rmFirst a.rmExpanded:hover
{
    padding-top: 1px;
    padding-bottom: 0;
    border-top-width: 0;
}
  
.RadMenu_RadMenuCss .rmVertical .rmLast a.rmLink:hover,
.RadMenu_RadMenuCss .rmVertical .rmLast a.rmFocused,
.RadMenu_RadMenuCss .rmVertical .rmLast a.rmSelected,
.RadMenu_RadMenuCss .rmVertical .rmLast a.rmExpanded,
.RadMenu_RadMenuCss .rmVertical .rmLast a.rmExpanded:hover
{
    padding-bottom: 1px;
    padding-top: 0;
    border-bottom-width: 0;
}
  
.RadMenu_RadMenuCss .rmVertical .rmItem a.rmDisabled:hover
{
    padding-top: 1px;
    padding-bottom: 1px;
    border-width: 0;
}
  
.RadMenu_RadMenuCss a.rmExpanded,
.RadMenu_RadMenuCss a.rmExpanded:hover
{
    background-color: #fff;
}
  
  
/* </Root items> */
  
  
/* <Submenu items> */
  
.RadMenu_RadMenuCss .rmGroup,
.RadMenu_RadMenuCss .rmMultiColumn,
.RadMenu_RadMenuCss .rmGroup .rmVertical
{
    background: #fff url('Menu/rmVSprite.png') repeat-y 0 0;
}
  
.RadMenu_RadMenuCss .rmTopFix,
.RadMenu_RadMenuCss .rmBottomFix,
.RadMenu_RadMenuCss .rmRoundedCorners .rmGroup .rmItem,
.RadMenu_RadMenuCss .rmRoundedCorners li.rmFirstGroupColumn .rmItem,
.RadMenu_RadMenuCss .rmRoundedCorners .rmFirstGroupColumn li.rmFirstGroupColumn .rmItem,
.RadMenu_RadMenuCss .rmRoundedCorners ul.rmHorizontal .rmFirst,
.RadMenu_RadMenuCss_Context.rmRoundedCorners .rmGroup .rmItem,
.RadMenu_RadMenuCss_Context.rmRoundedCorners ul.rmHorizontal .rmFirst
{
    background-image: url('Menu/rmVSprite.png');
    background-color: #fff
    background-repeat: repeat-y;
}
  
* html .rmRoundedCorners_RadMenuCss .rmGroup .rmItem,
* html .rmRoundedCorners_RadMenuCss ul.rmHorizontal .rmFirst
{
    background-image: url('Menu/rmVSprite.png');
    background-color: #fff
    background-repeat: repeat-y;
}
  
.RadMenu_RadMenuCss .rmRoundedCorners .rmScrollWrapContainer .rmGroup,
.RadMenu_RadMenuCss .rmRoundedCorners .rmScrollWrap .rmItem,
.RadMenu_RadMenuCss .rmRoundedCorners .rmGroupColumn .rmItem,
.RadMenu_RadMenuCss .rmRoundedCorners .rmGroupColumn .rmGroupColumn .rmItem,
.RadMenu_RadMenuCss .rmRoundedCorners .rmHorizontal .rmItem,
.RadMenu_RadMenuCss .rmRoundedCorners .rmScrollWrap .rmVertical,
.RadMenu_RadMenuCss_Context.rmRoundedCorners .rmScrollWrapContainer .rmGroup,
.RadMenu_RadMenuCss_Context.rmRoundedCorners .rmScrollWrap .rmItem,
.RadMenu_RadMenuCss_Context.rmRoundedCorners .rmHorizontal .rmItem,
.RadMenu_RadMenuCss_Context.rmRoundedCorners .rmScrollWrap .rmVertical
{
    background-image: none;
}
  
* html .rmRoundedCorners_RadMenuCss .rmScrollWrapContainer .rmGroup,
* html .rmRoundedCorners_RadMenuCss .rmScrollWrap .rmItem,
* html .rmRoundedCorners_RadMenuCss .rmHorizontal .rmItem,
* html .rmRoundedCorners_RadMenuCss .rmScrollWrap .rmVertical
{
    background-image: none;
}
  
.RadMenu_RadMenuCss .rmRoundedCorners .rmGroupColumn
{
    background-color: #fff;
}
  
.RadMenu_RadMenuCss .rmBottomLeft,
.RadMenu_RadMenuCss .rmRoundedCorners .rmScrollWrapContainer,
.RadMenu_RadMenuCss_Context.rmRoundedCorners .rmScrollWrapContainer,
.RadMenu_RadMenuCss_Context.rmRoundedCorners ul.rmGroup,
.RadMenu_RadMenuCss .rmRoundedCorners ul.rmGroup,
.RadMenu_RadMenuCss .rmRoundedCorners .rmMultiColumn
{
    background-imageurl('Menu/rmRoundedLeft.png');
    background-color: transparent
    background-repeat: no-repeat;
}
  
* html .rmRoundedCorners_RadMenuCss .rmScrollWrapContainer,
* html .rmRoundedCorners_RadMenuCss .rmGroup ul.rmGroup,
* html .rmRoundedCorners_RadMenuCss ul.rmGroup
{
    background-imageurl('Menu/rmRoundedLeft.png');
    background-color: transparent
    background-repeat: no-repeat;
}
  
.RadMenu_RadMenuCss .rmTopRight,
.RadMenu_RadMenuCss .rmBottomRight
{
    background-imageurl('Menu/rmRoundedRight.png');
    background-color: transparent
    background-repeat: no-repeat;
}
  
  
.RadMenu_RadMenuCss .rmRoundedCorners .rmScrollWrapContainer .rmTopFix,
.RadMenu_RadMenuCss .rmRoundedCorners .rmScrollWrapContainer .rmBottomFix,
.RadMenu_RadMenuCss_Context.rmRoundedCorners .rmScrollWrapContainer .rmTopFix,
.RadMenu_RadMenuCss_Context.rmRoundedCorners .rmScrollWrapContainer .rmBottomFix
{
    background: #FFF;
}
  
* html .rmRoundedCorners_RadMenuCss .rmScrollWrapContainer .rmTopFix,
* html .rmRoundedCorners_RadMenuCss .rmScrollWrapContainer .rmBottomFix
{
    background: #FFF;
}
  
.RadMenu_RadMenuCss .rmRoundedCorners .rmScrollWrapContainer .rmTopArrow,
.RadMenu_RadMenuCss .rmRoundedCorners .rmScrollWrapContainer .rmBottomArrow,
.RadMenu_RadMenuCss .rmRoundedCorners .rmScrollWrapContainer .rmLeftArrow,
.RadMenu_RadMenuCss .rmRoundedCorners .rmScrollWrapContainer .rmRightArrow,
.RadMenu_RadMenuCss_Context.rmRoundedCorners .rmScrollWrapContainer .rmTopArrow,
.RadMenu_RadMenuCss_Context.rmRoundedCorners .rmScrollWrapContainer .rmBottomArrow,
.RadMenu_RadMenuCss_Context.rmRoundedCorners .rmScrollWrapContainer .rmLeftArrow,
.RadMenu_RadMenuCss_Context.rmRoundedCorners .rmScrollWrapContainer .rmRightArrow
{
    background-color: #FFF;
    border: 0;
}
  
* html .rmRoundedCorners_RadMenuCss .rmScrollWrapContainer .rmTopArrow,
* html .rmRoundedCorners_RadMenuCss .rmScrollWrapContainer .rmBottomArrow,
* html .rmRoundedCorners_RadMenuCss .rmScrollWrapContainer .rmLeftArrow,
* html .rmRoundedCorners_RadMenuCss .rmScrollWrapContainer .rmRightArrow
{
    background-color: #FFF;
    border: 0;
}
  
  
.RadMenu_RadMenuCss_rtl li.rmTopFix,
.RadMenu_RadMenuCss_rtl li.rmBottomFix,
.RadMenu_RadMenuCss_rtl .rmRoundedCorners .rmGroup .rmItem,
.rmRoundedCorners.RadMenu_RadMenuCss_Context_rtl .rmGroup .rmItem
{
    background-position: 101% 0;
}
  
.RadMenu_RadMenuCss .rmSlide .rmScrollWrap
{
    background-image: none;
}
  
.RadMenu_RadMenuCss_rtl .rmGroup,
.RadMenu_RadMenuCss_rtl .rmMultiColumn,
.RadMenu_RadMenuCss_rtl .rmGroup .rmVertical
{
    background-position: 100% 0;
}
  
.RadMenu_RadMenuCss .rmRootGroup li.rmItem .rmGroup
{
    padding-bottom: 0;
}
  
.RadMenu_RadMenuCss .rmRootGroup .rmHorizontal
{
    background-image: none;
}
  
.RadMenu_RadMenuCss .rmScrollWrap .rmVertical
{
    border: 0;
}
  
.RadMenu_RadMenuCss .rmRoundedCorners .rmScrollWrapContainer li.rmItem,
.RadMenu_RadMenuCss_Context.rmRoundedCorners .rmScrollWrapContainer li.rmItem,
.rmRoundedCorners_RadMenuCss .rmScrollWrapContainer li.rmItem
{
    background: none;
}
  
.RadMenu_RadMenuCss .rmGroup .rmItem a.rmLink,
.RadMenu_RadMenuCss .rmGroup .rmItem a.rmLink:hover,
.RadMenu_RadMenuCss .rmGroup .rmItem a.rmFocused,
.RadMenu_RadMenuCss .rmGroup .rmItem a.rmSelected,
.RadMenu_RadMenuCss .rmGroup .rmItem a.rmExpanded
{
    padding-top: 0;
    padding-bottom: 0;
    border: 0;
}
  
  
  
.RadMenu_RadMenuCss .rmGroup a.rmLink,
.RadMenu_RadMenuCss .rmGroup .rmText,
.RadMenu_RadMenuCss .rmGroup .rmItem a.rmDisabled,
.RadMenu_RadMenuCss .rmGroup .rmItem a.rmDisabled:hover,
.RadMenu_RadMenuCss .rmGroup .rmItem a.rmDisabled .rmText,
.RadMenu_RadMenuCss .rmGroup .rmItem a.rmDisabled:hover .rmText
{
    background-position: 0 500px;
    background-repeat: no-repeat;
    background-color: transparent;
}
  
.RadMenu_RadMenuCss .rmGroup a.rmLink:hover,
.RadMenu_RadMenuCss .rmGroup a.rmFocused,
.RadMenu_RadMenuCss .rmGroup a.rmSelected,
.RadMenu_RadMenuCss .rmGroup a.rmExpanded
{
    background-position: 0 -168px;
}
  
.RadMenu_RadMenuCss .rmGroup a.rmLink:hover .rmText,
.RadMenu_RadMenuCss .rmGroup a.rmFocused .rmText,
.RadMenu_RadMenuCss .rmGroup a.rmSelected .rmText,
.RadMenu_RadMenuCss .rmGroup a.rmExpanded .rmText
{
    color : #28638f
    background-position: 100% -192px;
}
  
  
/* </rtl> */
  
/* </Submenu items> */
  
/* <Submenu offsets (Default - specific, overlapping submenus)> */
  
.RadMenu_RadMenuCss .rmSlide
{
    margin: 0 0 0 -1px;
}
  
.RadMenu_RadMenuCss .rmVertical .rmSlide,
.RadMenu_RadMenuCss .rmSlide .rmSlide,
.RadMenu_RadMenuCss_Context .rmGroup .rmSlide
{
    margin: 0 0 0 -5px;
}
  
.RadMenu_RadMenuCss_rtl .rmSlide
{
    margin: 0 0 0 0;
}
  
.RadMenu_RadMenuCss_rtl .rmFirst .rmSlide
{
    margin-left: 1px;
}
  
.RadMenu_RadMenuCss_rtl .rmVertical .rmSlide,
.RadMenu_RadMenuCss_rtl .rmSlide .rmSlide,
.RadMenu_RadMenuCss_Context_rtl .rmGroup .rmSlide
{
    margin: 0 0 0 5px;
}
  
  
/* </Scrolling arrows> */
  
/* <Separators> */
  
.RadMenu_RadMenuCss .rmHorizontal .rmSeparator .rmText,
.RadMenu_RadMenuCss .rmVertical .rmHorizontal .rmSeparator .rmText
{
    height: 22px;
    margin: 1px 0 0;
    width: 1px;
    background-color: #A8A8A8;
}
  
.RadMenu_RadMenuCss_Context .rmSeparator .rmText,
.RadMenu_RadMenuCss .rmHorizontal .rmGroup .rmSeparator .rmText,
.RadMenu_RadMenuCss .rmVertical .rmHorizontal .rmGroup .rmSeparator .rmText
{
    background-color: transparent;
    background-position: 0 -406px;
}
  
/* </Separators> */
  
/* </RadMenu / Default> */
  
  
.RadMenu_RadMenuCss .rmVertical 
    background-color#28638f;
}
  
 .RadMenu_RadMenuCss .rmGroup .rmItem .rmLink
{
    TEXT-ALIGN: left;
    LINE-HEIGHT: 22px;
    FONT-STYLE: normal;
    TEXT-INDENT: -21px;
    font-size: 13px;
    PADDING-LEFT: 2px;
    MARGIN-LEFT: 2px;
    PADDING-RIGHT: 1px;
    MARGIN-RIGHT: 1px;
    PADDING-BOTTOM: 1px;
    MARGIN-BOTTOM: 1px;
}


Mugdha Aditya
Top achievements
Rank 1
 answered on 16 Aug 2011
3 answers
154 views
I'm using a radgrid right now, and I want to include some specific functionality.  I want to use the skin icons as for my custom imagebuttons.

How would I get the webresource url to use as the image url for any of the icons listed in the link below?

http://www.telerik.com/help/aspnet-ajax/grid-appearance-skins.html


I came across this thread

http://www.telerik.com/community/forums/aspnet-ajax/grid/how-to-use-the-telerik-icons-in-html.aspx

but the technique listed here doesn't work for me.  I'm just getting a broken image link.

Thanks,
Javier
Tsvetina
Telerik team
 answered on 16 Aug 2011
4 answers
1.1K+ views
Hi,
First of all, I am using a RadGrid control from the Q3 2009 package, Windows XP, IE...

I have a page which has a master grid which is linked to another table by datakeynames.  The problem is that this child grid, which works perfectly fine, shares the same space on the web (a table cell actually) with another grid (import grid).  The reason is when a user does something else on the page, this child grid hides and the other appears until the user selects a row on the master again. 

What I find is that if the import grid is visible and I click the master grid, the import grid doesn't hide as the code requests, and the child grid appears, but just as a bunch of text with no datagrid look to it at all.  I find though that if I click a button the postback kicks in properly and suddenly the import grid vanishes and the child table (with the same data as before) appears all nice and pretty.  So, after a lot of testing and research it seems the postback just isn't doing it's job.




This is my table for the child grid and the import grid in my aspx page:



 

<table style="width:100%;">

 

 

<tr>

 

 

<td class="style1" width="50%" align="left" valign="top">

 

 

 

<telerik:RadGrid ID="rgIngredients" runat="server" DataSourceID="odsIngredients"

 

 

AllowPaging="True" GridLines="None" Skin="WebBlue" PageSize="15"

 

 

AutoGenerateColumns="False" >

 

 

 

<PagerStyle Mode="NextPrevNumericAndAdvanced" />

 

 

 

<MasterTableView DataKeyNames="trx-num" CommandItemDisplay="Top" >

 

 

 

<CommandItemTemplate>

 

 

<table width="100%" >

 

 

<tr >

 

 

 

<td style="text-align:center">

 

 

<asp:Label ID="OEHeaderType" Text="Ingredient List"

 

 

runat="server">

 

 

</asp:Label>

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

</CommandItemTemplate>

 

 

 

<Columns>

 

 

 

<telerik:GridBoundColumn DataField="sequence-no" HeaderText="Seq No." SortExpression="sequence-no"

 

 

UniqueName="sequence-no">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="line-item-type" HeaderText="Type" SortExpression="Type"

 

 

UniqueName="Type">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="product-no" HeaderText="Product No" SortExpression="product-no"

 

 

UniqueName="product-no">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="product-name" HeaderText="Description" SortExpression="product-name"

 

 

UniqueName="product-name">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="crop-yr" HeaderText="Crop Yr" SortExpression="crop-yr"

 

 

UniqueName="crop-yr">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="quantity" HeaderText="Quantity" SortExpression="quantity"

 

 

UniqueName="quantity">

 

 

</telerik:GridBoundColumn>

 

 

 

 

</Columns>

 

 

 

</MasterTableView>

 

 

</telerik:RadGrid>

 

 

 

<telerik:RadGrid ID="rgImportedItems" runat="server"

 

 

GridLines="None" ShowFooter="false"

 

 

AutoGenerateColumns="false" Skin="Sunset"

 

 

ShowHeader="true" Width="85%" >

 

 

 

<PagerStyle Mode="NextPrevNumericAndAdvanced" />

 

 

 

<MasterTableView CommandItemDisplay="Top" DataKeyNames="Type,ProductCode,Qty,CropYr,UOM,Amount,Account,PCCtr" >

 

 

 

<CommandItemTemplate>

 

 

<table width="100%" >

 

 

<tr >

 

 

 

<td style="text-align:center">

 

 

<asp:Label ID="OEHeaderType" Text="Imported File"

 

 

runat="server">

 

 

</asp:Label>

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

</CommandItemTemplate>

 

 

<Columns>

 

 

<telerik:GridBoundColumn DataField="Type" HeaderText="Type">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="ProductCode" HeaderText="Product Code">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Qty" HeaderText="Qty">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="CropYr" HeaderText="Crop Yr">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="UOM" HeaderText="UOM">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Amount" HeaderText="Amount">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Account" HeaderText="Account">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="PCCtr" HeaderText="PCCtr">

 

 

</telerik:GridBoundColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

</telerik:RadGrid>

 

 

 

</td>


And this is what I've tried to do to fix this:

>this executes and nothing on the page changes until I click a button)

 

 

protected void rgCustomFormulas_ItemCommand(object source, GridCommandEventArgs e)

 

{

 

if (e.CommandName == "RowClick")

 

{

rgIngredients.Visible =

true;

 

btnUpload.Text =

"Upload File";

 

lblUpdate.Text =

"";

 

btnPostback_Click(

null, null);

 

}

}

 


>I also tried the __postback javascript thing

 

 

 

function selectAndPostBack() {

 

__doPostBack(

"<%= rgCustomFormulas.UniqueID %>", "RowClicked");

 

}

 

....

 

 

 

protected override void RaisePostBackEvent(IPostBackEventHandler source, string eventArgument)

 

{

 

base.RaisePostBackEvent(source, eventArgument);

 

 

if (source == this.rgCustomFormulas && eventArgument.IndexOf("RowClicked") != -1)

 

{

rgImportedItems.Visible =

false;

 

rgIngredients.Visible =

true;

 

btnUpload.Text =

"Upload File";

 

lblUpdate.Text =

"";

 

}

}

So, I've tried a few things.  I am just wondering why clicking a button (which has no code behind, just merely to trigger a postback) corrects the display, and nothing else I've tried so that it's automatic works.  Any suggestions would be appreciated :(

Iana Tsolova
Telerik team
 answered on 16 Aug 2011
1 answer
106 views
Hi guys I have a radgrid with AllowPostBackOnFilter = true and a FilterDelay=250, this works good if I type something  in the filter textbox, but if I erase the text I have to hit enter to make the postback, is this a normal behavior? How can I do an automaticpostback after I erase the text?
Please hope you could help me.
Iana Tsolova
Telerik team
 answered on 16 Aug 2011
6 answers
359 views
I have a RadGrid that populates its data via a Subprocedure, which calls a SQL Stored Procedure to bind the data.

Private Sub PopulateMyData()
    ' initialize variables
    Dim sqlConn As New SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings("SQLConn2010").ToString)
    Dim sqlCmd As New SqlCommand("", sqlConn)
 
    ' open sql connection
    sqlConn.Open()
 
    With sqlCmd
        .CommandType = CommandType.StoredProcedure
 
        If ThisVariable.Length > 0 Then
            ' passed array search
            .CommandText = "prRunThisProcedure"
            .Parameters.AddWithValue("@VariableList", ThisVariable)
        Else
            ' standard search
            .CommandText = "prRunThatProcedureInstead"
            .Parameters.AddWithValue("@someVariable", NullString(SomeParameter))
            .Parameters.AddWithValue("@anotherVariable", NullString(AnotherParameter))
        End If
    End With
 
    ' execute query and read into sql data adapter
    Dim daTestObject As New SqlDataAdapter(sqlCmd)
 
    ' fill datatable with results from sql adapter
    Dim dtTestObject As New DataTable()
    dtTestObject.Columns.Add("Name", Type.GetType("System.String"))
    dtTestObject.Columns.Add("ReportInfoID", Type.GetType("System.String"))
    daTestObject.Fill(dtTestObject)
 
    ' retrieve rowcount
    Dim RowCount As Integer = dtTestObject.Rows.Count
 
    ' set datasource and bind if records were returned from stored procedure
    If (RowCount > 0) Then
        ' bind datasource
        rgTestGrid.DataSource = dtTestObject
        rgTestGrid.DataBind()
    End If
End Sub

I want to enable paging on this RadGrid but for some reason as soon as I attempt to move to the next page it seems to post back and do nothing.

<telerik:RadGrid ID="rgTestGrid" runat="server" GridLines="None" Width="700px" AllowPaging="true" PageSize="25" EnableViewState="true">
  <MasterTableView Caption="This is the data" CommandItemDisplay="Top" CommandItemSettings-ShowAddNewRecordButton="false" DataKeyNames="ReportInfoID" AllowPaging="true" NoDetailRecordsText="Nothing Found.">
    <PagerStyle Mode="NumericPages"  />
    <CommandItemSettings ShowExportToExcelButton="true" ShowExportToPdfButton="true" />                       
    <Columns>
    <telerik:GridTemplateColumn>
        <ItemTemplate>
        <asp:Label ID="lblRowCount" runat="server" Width="30px" />
        </ItemTemplate>
        <HeaderStyle Width="30px" />
    </telerik:GridTemplateColumn>
    <telerik:GridButtonColumn UniqueName="ReportURL" DataTextField="Name" CommandName="Select"></telerik:GridButtonColumn>
    </Columns>                         
  </MasterTableView>                           
</telerik:RadGrid>

If I return to my initial search page and essentially force it to rerun the Sub that calls the SQL Stored Proc (which forces a databind) then I can see it has the correct page selected, but this is not practical at all.

I was under the impression the Radgrid could query the data only once and then preserve the information in the RadGrid for use in offline paging?

I do not want to rebind the data each time they page through the Data-set since it never changes (it is statistical data nothing is input), and I do not understand from the examples I've read why I need to specify the paging information using the NeedDataSource since the data never changes, and I do not want it requerying the database (It already has grabbed all the records once on the initial page-load)

I am not defining a DataSource in the markup since I am doing that programmatically during the Subprocedure that references the SQL Stored Procedure (Which takes many parameters that need to be altered before used as parameters, hence why I have a Subprocedure to populate the initial Grid)

I have stripped out some of my excess code and tried  to put some illustration above in case it helps.  I would basically like this to function all client side so after the server intiially populates the RadGrid (which works fine), that further paging requests will simply page through that populated RadGrid and not require a post-back or rebind.

Hopefully there is something I am missing here that can be explained.

Thanks in advance
Tsvetina
Telerik team
 answered on 16 Aug 2011
1 answer
163 views
Hi guys I'm dealing with this problem i have a radgrid with allow postbackonfilter ="true" and a filterdelay  everything works fine if I type something in every textboxt a postback occurs and the grid is filtered, but when I erase the text of the textbox I have to hit enter to rebind the grid.
Is it possible to have the same behavior for both cases when typing and erasing text?, I mean, after erasing the text return the grid to it's normal state.
Here's the code of my grid:
<telerik:RadGrid ID="RadGrid2" runat="server" AutoGenerateColumns="False"  
                                GridLines="None" Skin="Sunset" onitemdatabound="RadGrid2_ItemDataBound" 
                                AllowPaging="True" AllowSorting="True" onitemcommand="RadGrid2_ItemCommand" 
                                onpageindexchanged="RadGrid2_PageIndexChanged" 
                                onselectedindexchanged="RadGrid2_SelectedIndexChanged" 
                                AllowFilteringByColumn="True" onneeddatasource="RadGrid2_NeedDataSource" 
                                EnableLinqExpressions="False" Culture="es-MX" 
                                onitemcreated="RadGrid2_ItemCreated" >
                                <GroupingSettings CaseSensitive="False" />
                                <ClientSettings EnablePostBackOnRowClick="True">
                                    <Selecting AllowRowSelect="True" />
                                </ClientSettings>
<MasterTableView>
<CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
  
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
  
<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
    <Columns>
        <telerik:GridBoundColumn DataField="fiCircuito" HeaderText="Circuito" 
            UniqueName="columnCirc"  AutoPostBackOnFilter="true" ShowFilterIcon="false" FilterDelay="500" 
  
  
            <HeaderStyle HorizontalAlign="Center" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="nom_edo" HeaderText="Estado" 
            UniqueName="columnEdo" AutoPostBackOnFilter="true" ShowFilterIcon="false" FilterDelay="500">
            <HeaderStyle HorizontalAlign="Center" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="nom_cd" HeaderText="Ciudad" 
            UniqueName="columnCd" AutoPostBackOnFilter="true" ShowFilterIcon="false" FilterDelay="500">
            <HeaderStyle HorizontalAlign="Center" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="fiIdSolicitud" HeaderText="Folio" 
            UniqueName="columnFolio"  AutoPostBackOnFilter="true" ShowFilterIcon="false" FilterDelay="250" >
            <HeaderStyle HorizontalAlign="Center"  />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="nom_padre" 
            HeaderText="Nombre Madre/Padre" UniqueName="columnPadre" AutoPostBackOnFilter="true" ShowFilterIcon="false" FilterDelay="500">
            <HeaderStyle HorizontalAlign="Center" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="nom_menor" HeaderText="Nombre del Menor" 
            UniqueName="column1" AutoPostBackOnFilter="true" ShowFilterIcon="false" FilterDelay="500">
            <HeaderStyle HorizontalAlign="Center" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn 
            UniqueName="columnIdM" DataField="fiIdMenor" Visible="False">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn HeaderText="Fecha" UniqueName="column4" 
            DataField="fech_baja" AllowFiltering="false">
            <HeaderStyle HorizontalAlign="Center" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="ind_baja" HeaderText="Estatus Empleado" 
            UniqueName="columnEstatus" AllowFiltering="false">
            <HeaderStyle HorizontalAlign="Center" />
        </telerik:GridBoundColumn>
        <telerik:GridButtonColumn ButtonType="ImageButton" HeaderText="Avisos" 
            UniqueName="column2"  ImageUrl= "~/imgs/new-message-icon.png" 
            CommandName="Avisos">
            <HeaderStyle HorizontalAlign="Center" />
        </telerik:GridButtonColumn>
        <telerik:GridButtonColumn ButtonType="ImageButton" 
            HeaderText="Actualiza Estado" UniqueName="column3" 
            ImageUrl="~/imgs/refresh_document-icon.gif" CommandName="Actualiza">
            <HeaderStyle HorizontalAlign="Center" />
        </telerik:GridButtonColumn>
         <telerik:GridBoundColumn HeaderStyle-HorizontalAlign="Center" 
                                            HeaderText="Estatus"  DataField="fcDescEdoSol"  
                                            UniqueName="fcDescEdoSol" Visible="False">
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                        </telerik:GridBoundColumn>
  
                                          <telerik:GridBoundColumn HeaderText="Adscripción Actual" 
            UniqueName="columnAdscAct" DataField="area_Nueva" Visible="false">
            <HeaderStyle HorizontalAlign="Center"  />
        </telerik:GridBoundColumn>
  
         <telerik:GridBoundColumn HeaderStyle-HorizontalAlign="Center"  
                                            HeaderText="Expediente "  DataField="fiExpEmpleado"  
                                            UniqueName="EXPEDIENTE" Visible="False">
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                        </telerik:GridBoundColumn>
         
    </Columns>
</MasterTableView>
                            </telerik:RadGrid>
 
Iana Tsolova
Telerik team
 answered on 16 Aug 2011
1 answer
565 views

Afternoon folks.

I am using a radgrid as this has lots of functionality that I wish to keep (exporting, line selection, scrolling, etc) but I have come across a request I'm not sure how to handle and as such, I'd like some advice!

I have a radgrid attached to an object datasource implementing a SelectMethod of GetProductList and a SelectCountMethod of CountProductItems.This would return something along the lines of:

enter image description here

With CountProductItems returning 9.

What I need to do with this is dynamically set the radgrid so that the paging is defined by the guid i.e. one page for each guid present.

So in the above example, we'd have 3 pages.

On page load you'd be shown Page 1:

enter image description here

With the pager items displaying 1, 2, 3.

Click on page 2 and you'd see:

enter image description here

and clicking on page 3:

enter image description here

Does that makes sense? Is it possible and if so, any pointers greatly appreciated.

Iana Tsolova
Telerik team
 answered on 16 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?