iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hi
I have a Webgrid with a RowChecker and a button to run an action on the checked rows.
However getCheckedRows always returs empty and on clickikg the button all the checkboxes in the grid are cleared.
I have coopied the code posted on this forum before but it still returns 0. I am using WebGrid 7
This is the op of my grid
<ISWebGrid:WebGrid ID="wgArchive" runat="server" DataSourceID="sdsAppointments">
<RootTable Caption="Visits" DataKeyField="EntityId">
<Columns>
<ISWebGrid:WebGridColumn ColumnType="CheckBox" IsRowChecker="True" Name="RowChecker">
</ISWebGrid:WebGridColumn>
And this is the code the button runs
protected void btnArchive_Click(object sender, EventArgs e)
{
lbMsg.Text = wgArchive.RootTable.Rows.Length.ToString() + " rows affected ";
foreach (string keyValue in wgArchive.RootTable.GetCheckedRows())
lbMsg.Text += keyValue + " ; \n";
}
So I've managed to get a really basic version to return the count of checked rows using GetCheckedRows but that seems to return an arraylist of undefined strings.
Could someon let me know how to use what GetCheckedRows returns
Hi,
Have you set the PersistRowChecker to True in the LayoutSetting of your WebGrid? You need to set that property like this:
<LayoutSettings PersistRowChecker="True"> </LayoutSettings>
You can refer to our WebGrid sample named RowCheckerColumn as a reference.
Hope it helps.
Regards,
Lili
Could you give me a url for the WebGrid sample named RowCheckerColumn?
I couldn't find it in the samples
Here's the link to the sample in our live sample:
http://live.intersoftpt.com/cs/WebGrid/RowCheckerColumn.aspx?noframe=1&path=/WebGrid/Multiple%20Row%20Selection
Or, you can find the samples in our offline sample From Start Menu:
Intersoft WebUI Studio 2011 > WebUI Studio For ASP.NET > WebGrid 7 > C# Samples. Open the sample, find the ASPX page named RowCheckerColumn.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname