Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
148 views
How is it possible for one to determine which automatic operation has been selected? I need to differentiate between insert ('Add new record') and edit ('update').
Princy
Top achievements
Rank 2
 answered on 19 Jun 2008
1 answer
97 views

I searched a little bit and didn't find much information. What I would like to do is an insert above or a below an item on the grid. About the only way I can think of doing it would be to have a table which counts the items and the order they're in. Then when you move them around it renumbers the rows in the table and does a refresh on the grid.

Then I'm pulling the information from the SQL database and putting it on a report with Telerik Reporting. So in the Report I could do just do a join and tell the SQL to order by ascending order.

Thanks,

Brett

Princy
Top achievements
Rank 2
 answered on 19 Jun 2008
5 answers
122 views
I am trying to get some cell data from a grid that is bound to an ObjectDataSource.

In the ItemCommand event, when the CommandName is RowClick, I am trying to access e.Item.OwnerTableView.DataKeyValues but there are no columns on the OwenerTableView and no values in DataKeyValues.

It really seems to me like the Telerik controls, great as they are, are not very well made for some scenarios - ie ObjectDataSource.

Thanks
Shinu
Top achievements
Rank 2
 answered on 19 Jun 2008
2 answers
158 views
I've a master table and 2 details table in my grid. In one of the detailtables, I want to disable the expand grid option(not show the details table) based on the value of grid bound column. In the following, when the detailtable questions is binded, I want to check the value of  the column "Type", if it's text box, I want to disable the expand column button. Could someone tell me how to do this?

<DetailTables>
<telerik:GridTableView DataKeyNames="QuestionID" Name="Questions" CommandItemDisplay="Top" Width="100%">
<Columns>
<telerik:GridBoundColumn DataField="QuestionID" HeaderText="ID" UniqueName="QuestionID" Display="false" ReadOnly="true" />
<telerik:GridBoundColumn DataField="Type" HeaderText="Type" UniqueName="Type" />
</Columns>
</telerik:GridTableView>
</DetailTables>
Shinu
Top achievements
Rank 2
 answered on 19 Jun 2008
1 answer
84 views
Is this possible?
For example:  A 4-tier hierarchy of Customers->Sites->Orders->Products.
There is an order under Site A for Customer ABC that needs to be moved to Site B for Customer ABC.

The current set up I have allows me to edit the Site ID from the Order table, but when I click the Update link for editing, no change is made.
Princy
Top achievements
Rank 2
 answered on 19 Jun 2008
7 answers
307 views
I'm adding a programatically created grid to a place holder - is it possible to export this grid (as a PDF or excel sheet)? Nothing I try seems to work, I've also tried recreating the grid and exporting that on a button click but I get an error stating 'RadGrid must be databound before exporting'.
Josh
Top achievements
Rank 1
 answered on 19 Jun 2008
2 answers
168 views
HI:
I have 3 RadGrids in a webform  to be refresh at the same time,and I Rebind they at the same function, but some one work( the AjaxRequest Handler) and the others do nothing at all. 

function

ShowMARC()

{

try

{

grdDetail.AjaxRequest(

"<%= grdDetail.UniqueID %>", "YES");

}

catch(x)

{

alert(x);

}

}




protected override void RaisePostBackEvent(IPostBackEventHandler sourceControl, string text)

{

base.RaisePostBackEvent(sourceControl, text);

bool showmarc = false;

if (SQL.ToString(text) == "")

showmarc =

SQL.ToBoolean(Session[WebConstant.Web_Global_ShowMARC]);

if (text == "YES")

showmarc =

true;

else if(text == "NO")

showmarc =

false;

int Itemid = SQL.ToInt(Session[WebConstant.Web_Global_ItemidForDetail]);

Session[

WebConstant.Web_Global_ShowMARC] = showmarc;

GridsDataBind(Itemid, showmarc);

}





protected void GridsDataBind(int intItemID, bool showmarc)

{

grdDetail.DataSource =

null;

grdDetail.Rebind();

grdDetail.DataSource = ShowMarc(showmarc);

grdDetail.Rebind();

 

string strSQLTmp = @" Select t03Identifier, t09LibraryName, t09NickName, t03Location,

t03CallNo as t03CallNo, t03CallNoNormalized, t03CopyBarcode, t03Status, t03DueDate,

Case When t03issueidentifier <= 0 Then t03Volume Else Case

When t72VolumeNo IS NOT NULL AND LTRIM(t72VolumeNo) <> '' Then 'Vol. ' + t72VolumeNo Else '' End +

ISNULL(' Iss. ' + t72IssueNo, '') + ' ' + CONVERT(nvarchar(10), t72MagazineDate, 20) End

As t03Volume, t03issueidentifier , t04FirstName + ' ' + t04LastName CheckoutBy From Copies_t03,libraries_t09,Issue_t72,Patrons_t04

Where t03CheckoutBy *= t04Key And t03IssueIdentifier *= t72Identifier And t09LibraryId = t03LibraryID and t03ItemIdentifier = "

+ intItemID;

string Libraries = "'" + (SQL.ToString(Session[WebConstant.Web_Global_LibraryID])).Replace(",", "','") + "'";

if ((Libraries.EndsWith("'0'")))

{

strSQLTmp = strSQLTmp +

" and t03LibraryID in (" + Libraries + ")";

}

strSQLTmp = strSQLTmp +

@"Order by

ISNULL(Replicate(' ',10-len(ISNULL(t72VolumeNo,''))),'') + ISNULL(t72VolumeNo,''), ISNULL(Replicate('

',10-len(ISNULL(t72IssueNo,''))),'') + ISNULL(t72IssueNo,''), t03Volume "

;

DataTable dt = SQL.ExecuteSQL_fill(strSQLTmp);

grdCopyInformation.DataSource =

null;

grdCopyInformation.Rebind();

grdCopyInformation.DataSource = dt;

grdCopyInformation.Rebind();

Session[

WebConstant.Web_Global_Iteminfomation] = dt;

string PatronKey = (string)Session[WebConstant.Web_Global_PatronKey];

string Sqlstr = @"Select t65ItemIdentifier, t65FileTitle as Title, t65FileType

as FileType, t65AttachFileName as Location, ISNULL(t65CoverImage,0)

t65CoverImage from ItemAttach_t65 where t65ItemIdentifier="

+ intItemID;

dt =

SQL.ExecuteSQL_fill(Sqlstr);

grdMultimedia.DataSource =

null;

grdMultimedia.Rebind();

grdMultimedia.DataSource = dt;

grdMultimedia.Rebind();

Session[

WebConstant.Web_Global_ItemMultimedia] = dt;

}

Jack
Top achievements
Rank 1
 answered on 19 Jun 2008
4 answers
555 views
Getting this error whenever accessing the grid, this is basically the code, I get an error on both enumerations... I've alse tried using e. DestinationGrid instead of this.radGrid...

protected void radGrid_RowDrop(object sender, GridDragDropEventArgs e)
{
    foreach(GridDataItem gridItem in this.radGrid.MasterTableView.Items)
    {
        //do stuff...
    }

foreach (GridDataItem draggedItem in e.DraggedItems)
    {
           //do stuff
    }

}


 Edit - this grid is in a radajax panel if it makes any difference -

Josh
Top achievements
Rank 1
 answered on 19 Jun 2008
5 answers
309 views
Hi. I am saving an appointment with recurrence in my database. The field has the following value:

DTSTART:20080609T120000Z
DTEND:20080609T180000Z
RRULE:FREQ=WEEKLY;UNTIL=20081231T040000Z;INTERVAL=1;BYDAY=MO

And when i load the appointments my method return a List of CalendarioMedicoList that it is a subclass of Appointment. My code is
For Each rowData In ds.Tables(0).Rows 
   cm = New CalendarioMedico() 
 
   cm.ID = rowData("IdeSeq") 
   Dim s As String = rowData("FECINI").ToString().Substring(0, 10) + " " + rowData("HORAINI").ToString() 
   cm.StartTime = DateTime.Parse(rowData("FECINI").ToString().Substring(0, 10) + " " + rowData("HORAINI").ToString()) 
   cm.EndTime = DateTime.Parse(rowData("FECFIN").ToString().Substring(0, 10) + " " + rowData("HORAFIN").ToString()) 
   cm.RecurrenceRule = rowData("RECURRENCERULE").ToString() 
 
  cm.CodPais = rowData("CODPAIS").ToString() 
  cm.CodCia = rowData("CODCIA").ToString() 
  cm.CodOfi = rowData("CODOFI").ToString() 
  cm.CodId = rowData("CODID").ToString() 
  cm.NumId = rowData("NUMID").ToString() 
 
  If rowData("INDTIPOHORARIO").ToString() = "01" Then 
    cm.TipoInfo = CalendarioMedico.TipoInfoCalendario.Especialidad 
    cm.Subject = rowData("NOMESPECIALIDAD").ToString() 
    cm.IdeEspecialidad = rowData("IDEESPECIALIDAD") 
  Else 
    cm.TipoInfo = CalendarioMedico.TipoInfoCalendario.NoDisponible 
    cm.Subject = "Feriado:" + rowData("DESMOTIVO").ToString() 
    cm.IdeEspecialidad = rowData("CODMOTIVO") 
  End If 
 lista.Add(cm) 
 

Note that I do cm.RecurrenceRule = recurrence string from my table, however when I saw the RadScheduler I don't get any recurrence dates and there is no visual clue on my starting date that it is recurrence.

Any clue ?

Yamil
Top achievements
Rank 1
 answered on 18 Jun 2008
5 answers
256 views
Hi there,

I have a page with 2 pop-ups. Lets call them window1 and window2. window1 is non-modal and window2 is modal. If window1 is already displayed and I invoke window2 via server side code window2 displays behind window1 even though window2 is modal and window1 is non-modal.

If I click on window2  then window1 and main page now become disabled till I close window2. This is expected behavior since window2 is modal however this behavior does not work till window2 manually receives focus via a mouse click.

1) How to get window2 as top-most window (window2,window1,page)?
2) Is there a way to control the display order of pop-up windows?

I have read the I cannot set hte z-index of the actual windows but only the window manager. I did try adding another window manager to the page. And then setting z-index of the 2 window managers. Window Mgr 1 for Window 1 and Window Mgr 2 for Window 2. Set z-index of Window Mgr 2 to higher value than Window Mgr 1. This did not solve the problem.

Let me know if you need more information.

Thanks for the help.
Mark.
MarkInTexas
Top achievements
Rank 1
 answered on 18 Jun 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?