I'm migrating a UltraWebGrid to webdatagrid v11.2 but I can not get the igtbl_getCellById of a cell of a webdatagrid infragistics v11. and link it to a similar reference is disabled help please
function ClickBTabla(gridName, cellId){
var cell = igtbl_getCellById(cellId); //aqui genera el error (Microsoft JScript runtime error: Object expected) var renglon = igtbl_getRowById(cellId);
switch(cell.Column.Key)
{
}
//mostrar otro formulario
Hello,
in the new WebDataGrid the following methods are available to use:
var gridRow = ig_controls.WebDataGrid1.get_rows().get_row(0);
var rowCell = gridRow.get_cell(2) // pass the index of the cell
var rowCell = gridRow.get_cellByColumnKey("Date") // pass the column key as string
var rowCell = gridRow.get_cell(column) // pass a grid's column object
Thank you very much for the prompt reply Hristo Araises the following question I hope you can help me thank you very much in advance
My code is as follows
it is a User Control and my board if loading data
<ig:WebDataGrid ID="TablaGrid" runat="server" Height="350px" Width="400px" HeaderCaptionCssClass="Header" AutoGenerateColumns="False"> <Behaviors> <ig:EditingCore AutoCRUD="false"><Behaviors><ig:RowAdding Enabled="false" AddNewRowCssClass="stylenewbox" /></Behaviors></ig:EditingCore></Behaviors><Behaviors><ig:Paging PagerMode="NumericFirstLast" PageSize="1000000000"></ig:Paging></Behaviors> <ClientEvents Click="ClickBTabla" DoubleClick="TablaGrid_DblClickHandler" /> </ig:WebDataGrid>
the columns to be loaded are specified from the server side.
the question is whether the<ClientEvents Click = "ClickBTabla" DoubleClick = "TablaGrid_DblClickHandler" />
in automatic corresponding values are sent to my function as probe you sent me in response and my value is null. or do I need to specify which columns should show from design. or that's what I need. not that I'm doing wrong my function remains the same
ClickBTabla function (gridname, cellid){
// add here that you sent me in a reply
switch (cell.Column.Key)
{}// show another form}
Hi Hristo AMy problem ... as such I want to get id, the key and so on the clickeada or selected cell (I hope I'm using the term correctly) that in order to send in another WebForm detail of that Schedule.It is noteworthy that previously UltraWebGrid v5 could get those data with this Function "ClickBTabla" also take into account that it uses ig_webgrid.js, ig_shared and ig_webgrid_domI appreciate your kind attention and hope to see been explicit.
And sorry for the inconvenience that might cause my question.
Hello Mary,
Thank you for clarifying. I believe this should work for you:
1) Attach to the click event of the WebDataGrid
<ClientEvents Click="WebDataGrid1_Grid_Click" />
2) You can get the clicked object ( it may be a cell, or header, footer, etc) from the eventArgs:
function WebDataGrid1_Grid_Click(sender, eventArgs){ var clickedObject = eventArgs.get_item(); var objectType = eventArgs.get_type();}
Please let me know if you have further questions on the matter.
Hello Hristo A
Thank you very much your code very well explainedbut I can not get only the Key to save my variable since it eg with Webdatamenu I get it so ...
var mykey = eventArgs.getItem () get_key ().;
using and crossing data clickedObject of the function that you recommended me to use if I can visualize this key but not how to remove ...Also similarly would get the getCellFromKey of eventArgs and get.value
I appreciate your kind attention and again apologize for any inconvenience this may generarte
Hello Garcia,
I am not sure what key you need to get. eventArgs.get_item() returns a cell, which does not has a key property. However this cell belongs to a column and you can get the column key like this:
var mykey = eventArgs.get_item().get_column().get_key();
Please let me know if this is what you need if I have misunderstood you.
I regret to inform you that sent me the following error
Microsoft JScript runtime error: Object doesn't support this property or method
eventArgs >
_newActiveCell >
_column >
_csm >
_items >
[0] >
[1] >
c
and c shows me the key to my cell
And that's what I get from eventArgs, but after all of the above desglozarI appreciate your attention ....regards
Thanks for the screen shared, however it did not make it any clearer to me what your issues is. What item's properties are on the image, at what event did you get them ?
Anyway, please try the attached sample and breakpoint with Firebug for example on the client side- click event. You will see how clicking on some cell (data cell or header cell) the suggested code will return the column key properly. Please let me know if I have misunderstood you or if you have any further questions on the matter.
Thank you very much, it was a great help that you sent me ...
I appreciate your kind attention and help :)
thank you very much, it was very helpful to me what you enclose code, I have another question regarding a Webtab, I start another discussion or I can add my question here?. Can you?
Infragistics' policy is about opening a new thread/case for the different issues customers have. This helps tracking and searching and enables us to provide better support.
So please go ahead and open a new thread/case and you will get a response there.